diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-11-21 19:33:09 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-11-21 19:33:09 +0000 |
commit | 7fdfa981b59537352dde099401a62536f99148e7 (patch) | |
tree | c8c6bb69776dea77aea8cea7c3519010c19feb99 /gtk2_ardour/route_ui.cc | |
parent | 3ef1fe249318d5f4331ac4187ea07b9ec5863c60 (diff) |
get "solo safe" back in action again
git-svn-id: svn://localhost/ardour2/branches/3.0@6149 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r-- | gtk2_ardour/route_ui.cc | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 95cb6b66ef..2de7c6964e 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -398,19 +398,10 @@ RouteUI::solo_press(GdkEventButton* ev) } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) { - // shift-click: set this route to solo safe - - if (Profile->get_sae() && ev->button == 1) { - // button 1 and shift-click: disables solo_latched for this click - if (!Config->get_solo_latched ()) { - Config->set_solo_latched (true); - reversibly_apply_route_boolean ("solo change", &Route::set_solo, !_route->soloed(), this); - Config->set_solo_latched (false); - } - } else { - _route->set_solo_isolated (!_route->solo_isolated(), this); - wait_for_release = false; - } + // shift-click: toggle solo isolated status + + _route->set_solo_isolated (!_route->solo_isolated(), this); + wait_for_release = false; } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) { @@ -827,6 +818,13 @@ RouteUI::build_solo_menu (void) items.push_back (CheckMenuElem(*check)); check->show_all(); + check = new CheckMenuItem(_("Solo Safe")); + check->set_active (_route->solo_safe()); + check->signal_toggled().connect (bind (mem_fun (*this, &RouteUI::toggle_solo_safe), check)); + _route->solo_safe_changed.connect(bind (mem_fun (*this, &RouteUI::solo_safe_toggle), check)); + items.push_back (CheckMenuElem(*check)); + check->show_all(); + //items.push_back (SeparatorElem()); // items.push_back (MenuElem (_("MIDI Bind"), mem_fun (*mute_button, &BindableToggleButton::midi_learn))); @@ -928,6 +926,12 @@ RouteUI::toggle_solo_isolated (Gtk::CheckMenuItem* check) } void +RouteUI::toggle_solo_safe (Gtk::CheckMenuItem* check) +{ + _route->set_solo_safe (check->get_active(), this); +} + +void RouteUI::set_route_group_solo(boost::shared_ptr<Route> route, bool yn) { RouteGroup* route_group; @@ -1231,6 +1235,17 @@ RouteUI::solo_isolated_toggle(void* /*src*/, Gtk::CheckMenuItem* check) } } + +void +RouteUI::solo_safe_toggle(void* /*src*/, Gtk::CheckMenuItem* check) +{ + bool yn = _route->solo_safe (); + + if (check->get_active() != yn) { + check->set_active (yn); + } +} + void RouteUI::disconnect_input () { |