See the attached file, where I've changed the book/menus/main_menu example in the Gtkmm tutorial
(http://developer.gnome.org/gtkmm-tutorial/stable/sec-menus-examples.html.en).I've derived the class MenuToolAction from Gtk::Action. Instead of changing toolbar_item_type, which is not easily reachable from a gtkmm class, I've overridden the virtual function create_tool_item_vfunc().
I'm surprised that there is no GtkMenuToolAction class. (Or should it be called GtkToolMenuAction?)
I've found two bugs that discuss this matter. https://bugzilla.gnome.org/show_bug.cgi?id=558154 https://bugzilla.gnome.org/show_bug.cgi?id=590335 Kjell 2012-01-05 01:09, Krzysztof Kosiński skrev:
Hello all I found a post that describes how to create toolbar menubuttons (GtkMenuToolButton) on toolbars with GTK's GtkUIManager. http://www.gtkforums.com/viewtopic.php?t=4215 The solution is rather messy and involves deriving a new GType from GtkAction and setting the toolbar_item_type member of its GtkActionClass to a different value. Now my question is: is this possible at all with gtkmm? Regards, Krzysztof _______________________________________________ gtkmm-list mailing list gtkmm-list gnome org http://mail.gnome.org/mailman/listinfo/gtkmm-list
Attachment:
menutoolaction.tar.gz
Description: GNU Zip compressed data