Dynamic menus with Glade



I am building an application with one main frame displaying various "child
windows"
that I show on different notebook pages by re-parenting the global container
with the objects. 

every "child window" has it's own menubar with exactly one item (the page
menu) and has it's own gladefile due to project reasons.

I add this menubar dynamically to the main-menubar, when the page is
selected 
by clicking the notebook pages. the previous shown menu is removed before.

everything works fine except the accelerator keys, that I define in the
gladefile, 
they are not working.

additionally to the adding (by reparenting the "child window" menuitem) and
the removal, I tried this in the mainframe:

Glib::RefPtr<Gtk::AccelGroup> group =
menuitem_page_menu->get_submenu()->get_accel_group();
add_accel_group(group);

->group is always non-exisitent.

maybe I have to check every menuitem in the submenu and add it's accelerator
key manually to a accelgroup and afterwards the group to the mainframe?

any ideas by experts? thanxx in advance!

-- 
View this message in context: http://www.nabble.com/Dynamic-menus-with-Glade-tf4689299.html#a13402235
Sent from the Gtkmm mailing list archive at Nabble.com.



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