diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-03-05 17:25:52 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-03-05 17:25:52 +0000 |
commit | d50b65773a6d2e01b1001099ee982a600b6ac8e7 (patch) | |
tree | dc221de97b7c5362ec1d2d934226420bf147d965 | |
parent | 7ea68ecad60621a667c53d2450ccce9aed712589 (diff) |
fix up kludgy assumptions about mixer strip route ops menu ordering
git-svn-id: svn://localhost/ardour2/branches/3.0@4734 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/mixer_strip.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 09b6d37019..de5bd7a979 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -1146,6 +1146,7 @@ MixerStrip::build_route_ops_menu () items.push_back (MenuElem (_("Save As Template"), mem_fun(*this, &RouteUI::save_as_template))); items.push_back (MenuElem (_("Rename"), mem_fun(*this, &RouteUI::route_rename))); + rename_menu_item = &items.back(); items.push_back (SeparatorElem()); items.push_back (CheckMenuElem (_("Active"), mem_fun (*this, &RouteUI::toggle_route_active))); route_active_menu_item = dynamic_cast<CheckMenuItem *> (&items.back()); @@ -1181,8 +1182,7 @@ MixerStrip::name_button_button_press (GdkEventButton* ev) Menu_Helpers::MenuList& items = route_ops_menu->items(); /* do not allow rename if the track is record-enabled */ - static_cast<MenuItem*> (&items.front())->set_sensitive (!_route->record_enabled()); - + rename_menu_item->set_sensitive (!_route->record_enabled()); route_ops_menu->popup (1, ev->time); } return FALSE; diff --git a/gtk2_ardour/mixer_strip.h b/gtk2_ardour/mixer_strip.h index 4793e2de72..fdd5692111 100644 --- a/gtk2_ardour/mixer_strip.h +++ b/gtk2_ardour/mixer_strip.h @@ -192,6 +192,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox void diskstream_changed (); Gtk::Menu *send_action_menu; + Gtk::MenuItem* rename_menu_item; void build_send_action_menu (); void new_send (); |