2013-07-23 11:42, Murray Cumming skrev:
The new Gio::ActionMap::add_action(name,slot) method creates a new SimpleAction, but it does not add the SimpleAction to the ActionMap.Can anyone figure out why the popup menu items are disabled in this C++ example, in the gmenu branch of gtkmm-documentation: https://git.gnome.org/browse/gtkmm-documentation/tree/examples/book/menus/popup/examplewindow.cc but not in the attached C example. Glib::RefPtr<SimpleAction> ActionMap::add_action(const Glib::ustring& name, const ActivateSlot& slot) { Glib::RefPtr<SimpleAction> action = ""> action->signal_activate().connect(slot); add_action(action); // Missing return action; } Kjell |