Yet another difference between window managers!
It works as expected on Ubuntu Flashback, but the accelerators are lost
from the menus on Ubuntu Unity. Which operating system and window
manager do you use?
For another discussion of differences between the flavours of Ubuntu,
see the thread on gtkmm-list starting at
https://mail.gnome.org/archives/gtkmm-list/2014-November/msg00017.html.
Kjell
Den 2015-01-09 02:08, Phil Wolff skrev:
In
gtkmm-documentation-master/examples/book/application/app_and_win_menus/exampleapplication.cc
is this:
Glib::RefPtr<Gio::MenuItem> item = Gio::MenuItem::create("_Copy",
"win.copy");
//Setting "accel" works, but might be deprecated soon: See
https://bugzilla.gnome.org/show_bug.cgi?id=708908
//When it is deprecated, use
Gtk::Application::set_accel_for_action() instead.
item->set_attribute_value("accel",
Glib::Variant<Glib::ustring>::create("<Primary>c"));
submenu_edit->append_item(item);
This code displays "Ctrl+c" in the menu item and the accelerator works
as expected. However, when the suggested change is made:
Glib::RefPtr<Gio::MenuItem> item = Gio::MenuItem::create("_Copy",
"win.copy");
set_accel_for_action("win.copy", "<Primary>c");
submenu_edit->append_item(item);
the accelerator still works but the key combination hint is no longer
shown in the menu.
Is there something else that needs to be done to restore the "Ctrl+c"
part of the menu display?
_______________________________________________
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list