From c8745c6975c6173d08957c4a16bf8b95831ec05a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 18 Nov 2012 05:10:24 +0000 Subject: Simple keyboard navigation for plugin menu. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4834 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/GraphCanvas.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/gui') diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp index 4eba15db..6dfb9175 100644 --- a/src/gui/GraphCanvas.cpp +++ b/src/gui/GraphCanvas.cpp @@ -187,7 +187,7 @@ GraphCanvas::build_menus() if (_classless_menu) { _classless_menu->items().clear(); } else { - _plugin_menu->items().push_back(Gtk::Menu_Helpers::MenuElem("Uncategorized")); + _plugin_menu->items().push_back(Gtk::Menu_Helpers::MenuElem("_Uncategorized")); Gtk::MenuItem* classless_menu_item = &(_plugin_menu->items().back()); _classless_menu = Gtk::manage(new Gtk::Menu()); classless_menu_item->set_submenu(*_classless_menu); @@ -233,7 +233,8 @@ GraphCanvas::build_plugin_class_menu( return 0; } - Gtk::Menu_Helpers::MenuElem menu_elem = Gtk::Menu_Helpers::MenuElem(sub_label_str); + Gtk::Menu_Helpers::MenuElem menu_elem = Gtk::Menu_Helpers::MenuElem( + std::string("_") + sub_label_str); menu->items().push_back(menu_elem); Gtk::MenuItem* menu_item = &(menu->items().back()); @@ -346,7 +347,7 @@ GraphCanvas::add_plugin(SharedPtr p) if (_internal_menu && p->type() == Plugin::Internal) { _internal_menu->items().push_back( Gtk::Menu_Helpers::MenuElem( - p->human_name(), + std::string("_") + p->human_name(), sigc::bind(sigc::mem_fun(this, &GraphCanvas::load_plugin), p))); } else if (_plugin_menu && p->type() == Plugin::LV2 && p->lilv_plugin()) { if (lilv_plugin_is_replaced(p->lilv_plugin())) { @@ -366,7 +367,7 @@ GraphCanvas::add_plugin(SharedPtr p) || range.first->second.menu == _plugin_menu) { _classless_menu->items().push_back( Gtk::Menu_Helpers::MenuElem( - p->human_name(), + std::string("_") + p->human_name(), sigc::bind(sigc::mem_fun(this, &GraphCanvas::load_plugin), p))); if (!_classless_menu->is_visible()) _classless_menu->show(); @@ -378,12 +379,12 @@ GraphCanvas::add_plugin(SharedPtr p) Gtk::Image* image = new Gtk::Image(icon); menu->items().push_back( Gtk::Menu_Helpers::ImageMenuElem( - p->human_name(), *image, + std::string("_") + p->human_name(), *image, sigc::bind(sigc::mem_fun(this, &GraphCanvas::load_plugin), p))); } else { menu->items().push_back( Gtk::Menu_Helpers::MenuElem( - p->human_name(), + std::string("_") + p->human_name(), sigc::bind(sigc::mem_fun(this, &GraphCanvas::load_plugin), p))); } if (!i->second.item->is_visible()) -- cgit v1.2.1