Hi,
I’m playing around with the new (to me) UIManager class to build
application menus, and I was wondering how you can access each of the
menu items to add a handler for the “selected” signal.
If I have to walk the menu items after getting the top-level menus with
uimanager[“/MenuBar”], that’s fine, but I’m actually not sure which
methods I’m supposed to use to traverse the children. Using
uimanager[…].each
doesn’t seem to give me the menu items as I would expect. I get things
like:
#<Gtk::ImageMenuItem:0x7fe166e4abc0 ptr=0xc500c0>
#<Gtk::AccelLabel:0x7fe166e4a878 ptr=0xd37130>
#<Gtk::Image:0x7fe166e4a800 ptr=0xc50170>
What I’m actually trying to do is add a selected handler to each menu
item so that I can update the status bar with additional information.
Anyone with a better idea on how to do this (code would be nice! :),
please feel free to adjust my thinking.
I don’t seem to find any examples for this anywhere. I know I could do
it if I added the menu items manually, but I’m trying to use the new
tools (and the merge stuff will be handy for my app too).
Thanks in advance,
ast
Andrew S. Townley [email protected]
http://atownley.org