diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 761ab1c81c..462a75f5af 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -497,6 +497,7 @@ private: void update_autosave(); sigc::connection _autosave_connection; + void virtual_soundcheck_changed (bool); void session_dirty_changed (); void update_title (); diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index e21002cd0b..97cb83b8c6 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -731,3 +731,19 @@ ARDOUR_UI::livetrax_set_file_format (LiveTraxFileFormat const & ff) _session->reset_native_file_format (); } + +void +ARDOUR_UI::virtual_soundcheck_changed (bool onoff) +{ + if (!Profile->get_livetrax()) { + return; + } + + if (onoff) { + livetrax_stereo_out_button->set_active_state (Gtkmm2ext::Off); + livetrax_multi_out_button->set_active_state (Gtkmm2ext::ExplicitActive); + } else { + livetrax_stereo_out_button->set_active_state (Gtkmm2ext::ExplicitActive); + livetrax_multi_out_button->set_active_state (Gtkmm2ext::Off); + } +} diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index 7ff6d6ef37..ffc9e70c98 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -209,6 +209,11 @@ ARDOUR_UI::set_session (Session *s) _session->TransportStateChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::map_transport_state, this), gui_context()); _session->DirtyChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::session_dirty_changed, this), gui_context()); + if (Profile->get_livetrax()) { + _session->VirtualSoundCheckChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::virtual_soundcheck_changed, this, _1), gui_context()); + virtual_soundcheck_changed (_session->virtual_soundcheck()); + } + _session->PunchLoopConstraintChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::set_punch_sensitivity, this), gui_context()); _session->auto_punch_location_changed.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::set_punch_sensitivity, this), gui_context ()); diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 07d5840f0f..5b097db5ae 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -555,8 +555,8 @@ ARDOUR_UI::install_actions () ActionManager::transport_sensitive_actions.push_back (act); if (Profile->get_livetrax()) { - act = ActionManager::register_toggle_action (common_actions, X_("disable-virtual-soundcheck"), _("Disable Virtual Soundcheck"), sigc::mem_fun (*this, &ARDOUR_UI::disable_virtual_soundcheck)); - act = ActionManager::register_toggle_action (common_actions, X_("enable-virtual-soundcheck"), _("Enable Virtual Soundcheck"), sigc::mem_fun (*this, &ARDOUR_UI::enable_virtual_soundcheck)); + act = ActionManager::register_action (common_actions, X_("disable-virtual-soundcheck"), _("Disable Virtual Soundcheck"), sigc::mem_fun (*this, &ARDOUR_UI::disable_virtual_soundcheck)); + act = ActionManager::register_action (common_actions, X_("enable-virtual-soundcheck"), _("Enable Virtual Soundcheck"), sigc::mem_fun (*this, &ARDOUR_UI::enable_virtual_soundcheck)); } }