- automation_action_menu = manage (new Menu);
- cerr << "New AAM @ " << automation_action_menu << endl;
- MenuList& automation_items = automation_action_menu->items();
- automation_action_menu->set_name ("ArdourContextMenu");
-
- automation_items.push_back (MenuElem (_("Show all automation"),
- sigc::mem_fun(*this, &RouteTimeAxisView::show_all_automation)));
-
- automation_items.push_back (MenuElem (_("Show existing automation"),
- sigc::mem_fun(*this, &RouteTimeAxisView::show_existing_automation)));
-
- automation_items.push_back (MenuElem (_("Hide all automation"),
- sigc::mem_fun(*this, &RouteTimeAxisView::hide_all_automation)));
-
- if (subplugin_menu.gobj()) {
- /* this will break if the underlying GTK menu has never been set up, hence
- the if() above. we have to do this
- */
- if (subplugin_menu.get_attach_widget()) {
- subplugin_menu.detach();
- }
-
- automation_items.push_back (MenuElem (_("Plugins..."), subplugin_menu));
- } else {
- automation_items.push_back (MenuElem (_("Plugins")));
- }
- automation_items.back().set_sensitive (!subplugin_menu.items().empty());
-
- map<Evoral::Parameter, RouteAutomationNode*>::iterator i;
-
- map<string,Menu*> param_menu_map;
-
- for (i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) {
-
- string desc = _route->describe_parameter(i->second->param);
- string::size_type bracket = desc.find_first_of ('[');
-
- if (bracket == string::npos) {
-
- /* item gets its own entry in the menu */
-
- automation_items.push_back (CheckMenuElem (desc, sigc::bind (sigc::mem_fun(*this, &RouteTimeAxisView::toggle_automation_track), i->second->param)));