Add action for click-on-rec preferences

This is intended to be used as option for extended
transport buttons in the application bar.
This commit is contained in:
Ben Loftis
2025-01-29 18:20:04 -06:00
committed by Robin Gareus
parent 6c75915a6d
commit bd9ec0c336
3 changed files with 10 additions and 0 deletions

View File

@@ -439,6 +439,7 @@ protected:
void reenable_hide_loop_punch_ruler_if_appropriate ();
void toggle_auto_return ();
void toggle_click ();
void toggle_click_on_rec ();
void toggle_session_auto_loop ();
void toggle_rc_options_window ();
void toggle_session_options_window ();

View File

@@ -490,6 +490,9 @@ ARDOUR_UI::install_actions ()
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleClick"), _("Click"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_click));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::transport_sensitive_actions.push_back (act);
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleClickOnRec"), _("Click when Recording"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_click_on_rec));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::transport_sensitive_actions.push_back (act);
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleAutoInput"), _("Auto Input"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_auto_input));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::transport_sensitive_actions.push_back (act);

View File

@@ -144,6 +144,12 @@ ARDOUR_UI::toggle_click ()
ActionManager::toggle_config_state ("Transport", "ToggleClick", &RCConfiguration::set_clicking, &RCConfiguration::get_clicking);
}
void
ARDOUR_UI::toggle_click_on_rec ()
{
ActionManager::toggle_config_state ("Transport", "ToggleClickOnRec", &RCConfiguration::set_click_record_only, &RCConfiguration::get_click_record_only);
}
void
ARDOUR_UI::toggle_session_monitoring_in ()
{