Cleanup global monitor options:
- rely on parameter-changed signal emission to update buttons - use dedicated button/style names - improve tooltip
This commit is contained in:
parent
48da03e301
commit
cf31233cd1
|
@ -264,7 +264,6 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||
, video_timeline(0)
|
||||
, global_actions (X_("global"))
|
||||
, ignore_dual_punch (false)
|
||||
, ignore_session_monitoring (false)
|
||||
, main_window_visibility (0)
|
||||
, editor (0)
|
||||
, mixer (0)
|
||||
|
|
|
@ -392,7 +392,6 @@ protected:
|
|||
bool ignore_dual_punch;
|
||||
void toggle_punch_in ();
|
||||
void toggle_punch_out ();
|
||||
bool ignore_session_monitoring;
|
||||
void toggle_session_monitoring_in ();
|
||||
void toggle_session_monitoring_disk ();
|
||||
void show_loop_punch_ruler_and_disallow_hide ();
|
||||
|
|
|
@ -428,8 +428,8 @@ ARDOUR_UI::setup_transport ()
|
|||
punch_out_button.set_name ("punch button");
|
||||
layered_button.set_name (("layered button"));
|
||||
|
||||
monitor_in_button.set_name ("punch button"); // XXX
|
||||
monitor_disk_button.set_name ("punch button"); // XXX
|
||||
monitor_in_button.set_name ("monitor button");
|
||||
monitor_disk_button.set_name ("monitor button");
|
||||
auto_input_button.set_name ("transport option button");
|
||||
|
||||
click_button.set_name ("transport button");
|
||||
|
@ -466,8 +466,8 @@ ARDOUR_UI::setup_transport ()
|
|||
Gtkmm2ext::UI::instance()->set_tip (punch_in_button, _("Start recording at auto-punch start"));
|
||||
Gtkmm2ext::UI::instance()->set_tip (punch_out_button, _("Stop recording at auto-punch end"));
|
||||
|
||||
Gtkmm2ext::UI::instance()->set_tip (monitor_in_button, _("Force all implicit monitoed tracks to monitor input"));
|
||||
Gtkmm2ext::UI::instance()->set_tip (monitor_disk_button, _("Force all implicit monitored tracks to disk-monitoring"));
|
||||
Gtkmm2ext::UI::instance()->set_tip (monitor_in_button, _("Force all implicitly monitoed tracks to monitor input"));
|
||||
Gtkmm2ext::UI::instance()->set_tip (monitor_disk_button, _("Force all implicitly monitored tracks to disk-monitoring"));
|
||||
|
||||
/* setup icons */
|
||||
|
||||
|
|
|
@ -132,9 +132,6 @@ ARDOUR_UI::toggle_click ()
|
|||
void
|
||||
ARDOUR_UI::toggle_session_monitoring_in ()
|
||||
{
|
||||
if (ignore_session_monitoring) {
|
||||
return;
|
||||
}
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Transport"), X_("SessionMonitorIn"));
|
||||
if (!act) {
|
||||
return;
|
||||
|
@ -143,15 +140,15 @@ ARDOUR_UI::toggle_session_monitoring_in ()
|
|||
if (!tact) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (tact->get_active() && _session->config.get_session_monitoring () == MonitorInput) {
|
||||
return;
|
||||
}
|
||||
if (!tact->get_active() && _session->config.get_session_monitoring () != MonitorInput) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (tact->get_active()) {
|
||||
Glib::RefPtr<Action> dact = ActionManager::get_action (X_("Transport"), X_("SessionMonitorDisk"));
|
||||
if (dact) {
|
||||
Glib::RefPtr<ToggleAction> tdact = Glib::RefPtr<ToggleAction>::cast_dynamic(dact);
|
||||
if (tdact) {
|
||||
PBD::Unwinder<bool> (ignore_session_monitoring, true);
|
||||
tdact->set_active (false);
|
||||
}
|
||||
}
|
||||
_session->config.set_session_monitoring (MonitorInput);
|
||||
} else {
|
||||
_session->config.set_session_monitoring (MonitorAuto);
|
||||
|
@ -161,9 +158,6 @@ ARDOUR_UI::toggle_session_monitoring_in ()
|
|||
void
|
||||
ARDOUR_UI::toggle_session_monitoring_disk ()
|
||||
{
|
||||
if (ignore_session_monitoring) {
|
||||
return;
|
||||
}
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Transport"), X_("SessionMonitorDisk"));
|
||||
if (!act) {
|
||||
return;
|
||||
|
@ -172,15 +166,14 @@ ARDOUR_UI::toggle_session_monitoring_disk ()
|
|||
if (!tact) {
|
||||
return;
|
||||
}
|
||||
if (tact->get_active() && _session->config.get_session_monitoring () == MonitorDisk) {
|
||||
return;
|
||||
}
|
||||
if (!tact->get_active() && _session->config.get_session_monitoring () != MonitorDisk) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (tact->get_active()) {
|
||||
Glib::RefPtr<Action> iact = ActionManager::get_action (X_("Transport"), X_("SessionMonitorIn"));
|
||||
if (iact) {
|
||||
Glib::RefPtr<ToggleAction> tiact = Glib::RefPtr<ToggleAction>::cast_dynamic(iact);
|
||||
if (tiact) {
|
||||
PBD::Unwinder<bool> (ignore_session_monitoring, true);
|
||||
tiact->set_active (false);
|
||||
}
|
||||
}
|
||||
_session->config.set_session_monitoring (MonitorDisk);
|
||||
} else {
|
||||
_session->config.set_session_monitoring (MonitorAuto);
|
||||
|
@ -409,9 +402,11 @@ ARDOUR_UI::parameter_changed (std::string p)
|
|||
switch (_session->config.get_session_monitoring ()) {
|
||||
case MonitorDisk:
|
||||
tdact->set_active (true);
|
||||
tiact->set_active (false);
|
||||
break;
|
||||
case MonitorInput:
|
||||
tiact->set_active (true);
|
||||
tdact->set_active (false);
|
||||
break;
|
||||
default:
|
||||
tdact->set_active (false);
|
||||
|
|
Loading…
Reference in New Issue
Block a user