Re: Gio::Menu and Gtk::Builder



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 = "">   action->signal_activate().connect(slot);
  add_action(action); // Missing
  return action;
}

Kjell



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