Re: dynamic accelerators



Hi John,
Thanks for the code and link.  This was definitely a step in the right
direction.  One issue though is you're using a GtkUIManager and
loading in structure via strings.  I'm generating the entire menu
procedurally depending on user input so I can't do this.  From looking
at your code, this leaves a gap between a GtkActionGroup and a
GtkAccelGroup that I don't know how to mediate.

Let's say I already have a window with a menu bar and menus with
submenus attached to them.  How can I use the GtkActionGroup and
GtkAccelGroup classes to generate accelerators for the menu?  I'm
still not seeing any straightforward way of doing this.

For example, I have a GtkMenuItem object and I know it should have the
accelerator Control+q.  I also have a GtkWindow which the menu item is
attached to via the menu bar.  What API call(s) can I use to say "For
this window with this menu item, attach the accelerator control+q"?
It seems there are only very roundabout ways of doing this and I'm not
familiar enough with how the GTK system is structured to see that path
yet.  Any pointers on this one?

best,
wes


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]