[pygtk] Questions about accelerators.

2000-09-28 Thread Dave Belfer-Shevett

Hey folks.  I sent this to glade-users, and perhaps its more appropriate
for this list.  Any ideas?

---.   Web-based problem management: www.stonekeep.com
Dave Belfer-Shevett .
[EMAIL PROTECTED]  /My idea of an agreeable person is a person who\
--  agrees with me. (Benjamin Disreali)   |
   \__/

-- Forwarded message --
Date: Thu, 28 Sep 2000 16:09:38 -0400 (EDT)
From: Dave Belfer-Shevett [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Questions about accelerators.


Hi folks.  I'm writing a GTK app using libglade in Python.  So far thinks
are going okay, but I'm having some difficulty connecting accelerators and
trapping signals from them.

I've defined an accelerator within a GtkText widget (call it 'ctrl-f1'),
and bound it to the key.  I save it, and in the Glade file, I have:

[shevett@cheetah]:~/python/spanker/proj1$ ./spanker.py

Gtk-WARNING **: gtk_accel_group_add(): could not find signal "ctrl-f1"in
the `GtkText' class ancestry

Gtk-WARNING **: gtk_signal_connect_full(): could not find signal
"enter" in the `GtkText' class ancestry

Okay, fine, that means I need to use a signal that exists.  (I
think).  But what I -rally- want to do is link 'Ctrl-f1' to the 'clicked'
signal on a button elsewhere.  

How do I do this - specifically in python/Glade.  :)

Thanks!


---.   Web-based problem management: www.stonekeep.com
Dave Belfer-Shevett .
[EMAIL PROTECTED]  /   32. Never do card tricks for the group you play\
--  poker with.   |
   \__/



___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] Questions about accelerators.

2000-09-28 Thread James Henstridge

On Thu, 28 Sep 2000, Dave Belfer-Shevett wrote:

 Hey folks.  I sent this to glade-users, and perhaps its more appropriate
 for this list.  Any ideas?
 
 ---.   Web-based problem management: www.stonekeep.com
 Dave Belfer-Shevett .
 [EMAIL PROTECTED]  /My idea of an agreeable person is a person who\
 --  agrees with me. (Benjamin Disreali)   |
\__/
 
 -- Forwarded message --
 Date: Thu, 28 Sep 2000 16:09:38 -0400 (EDT)
 From: Dave Belfer-Shevett [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Questions about accelerators.
 
 
 Hi folks.  I'm writing a GTK app using libglade in Python.  So far thinks
 are going okay, but I'm having some difficulty connecting accelerators and
 trapping signals from them.
 
 I've defined an accelerator within a GtkText widget (call it 'ctrl-f1'),
 and bound it to the key.  I save it, and in the Glade file, I have:
 
 [shevett@cheetah]:~/python/spanker/proj1$ ./spanker.py
 
 Gtk-WARNING **: gtk_accel_group_add(): could not find signal "ctrl-f1"in
 the `GtkText' class ancestry
 
 Gtk-WARNING **: gtk_signal_connect_full(): could not find signal
 "enter" in the `GtkText' class ancestry
 
 Okay, fine, that means I need to use a signal that exists.  (I
 think).  But what I -rally- want to do is link 'Ctrl-f1' to the 'clicked'
 signal on a button elsewhere.  
 
 How do I do this - specifically in python/Glade.  :)

This is not pygtk problem.  You can't just invent signal names like
that.  Accelerators have to activate an existing signal on an object.  If
you just want to catch some other key presses on a particular widget, then
connect to its key_press_event signal, and handle the key presses there.

 
 Thanks!

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/



___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk