2013-07-23 11:42, Murray Cumming skrev:
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.


The new Gio::ActionMap::add_action(name,slot) method creates a new SimpleAction, but it does not add the SimpleAction to the ActionMap.

Glib::RefPtr<SimpleAction> ActionMap::add_action(const Glib::ustring& name, const ActivateSlot& slot)
{
  Glib::RefPtr<SimpleAction> action = SimpleAction::create(name);
  action->signal_activate().connect(slot);
*add_action(action);**// Missing*
  return action;
}

Kjell

_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to