Chris, 

Thanks for your response!

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?
 
> 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.

> > I also tried obtaining the get_accel_group() of the present menu, which  
> > returns None. I probably should add here that the whole menu hierarchy  
> > was created in glade and parsed using libglade. I want to just create  
> > this little submenu from the python code.
> 
> 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!
 
> *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?

Thanks,
Alex

-- 
Alexander Roitman   http://ebner.neuroscience.umn.edu/people/alex.html
Dept. of Neuroscience, Lions Research Building
2001 6th Street SE, Minneapolis, MN  55455
Tel (612) 625-7566   FAX (612) 626-9201

Attachment: signature.asc
Description: Digital signature

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to