On Mon, Oct 06, 2003 at 03:03:42PM -0500, Alex Roitman wrote:
> On Mon, Oct 06, 2003 at 03:28:51PM -0300, Christian Reis wrote:
> > Hmmm. You should save a reference to your AccelGroup, but I'm curious as
> > to what happens when you set pass in group to add_accelerator().
>
> I apologize, but I'm clueless as to how to save a reference to my
> AccelGroup. What is my AccelGroup?
Well, I meant saving a reference as a python variable:
group = gtk.AccelGroup()
But I'm still curious about the warning issued.
> > Have you looked at the GTK+ documentation for AccelGroups? It should be
> > simple to translate examples to PyGTK from that.
>
> I have some reference in front of me right now:
> http://developer.gnome.org/doc/API/gtk/gtk-keyboard-accelerators.html
> but I would not call it documentation in its usual sense.
> All descriptions and explanations seem yet to be filled. If you could
> refer me to a better doc I would be most grateful.
That's the old 1.0 documentation. Try
http://developer.gnome.org/doc/API/2.0/gtk/gtk-Keyboard-Accelerators.html
(and keep the 2.0 API docs handy)
> > I talked to James over IRC about this once; there's an issue that (in a
> > similar situation as signals connected via libglade) there isn't an easy
> > way to reach accelerator groups that are created during the libglade
> > parse for most/some of the GTK+ widgets.
>
> What puzzles me is that the glade file gets away with the following XML
> which is enough for a fully functional accelerators:
>
> <widget class="GtkImageMenuItem" id="the_id">
> <property name="visible">True</property>
> <property name="label" translatable="yes">The Label</property>
> <signal name="activate" handler="on_activate"/>
> <accelerator key="the_key" modifiers="the_mod" signal="activate"/>
>
> This does not seem to ever worry about accel group at all!
But I assure you that libglade, internally, *does* consider them :-)
> > *However*, when I asked him, I was referring to keyboard accelerators in
> > widgets *other* than GtkMenu, and since GtkMenu *does* provide an API to
> > get to its accel_group, I'm as to why get_accel_group() is returning
> > None. It may very well be a bug.
>
> Should I make a testcase and file it with Gnome bugzilla then?
I'm not sure; let's see if anybody else has a comment, and if not, I'd
say yes.
Take care,
--
Christian Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/