summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui_options.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2018-12-10 08:33:31 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2018-12-10 08:34:01 -0500
commitfc83d044f85872e55d7da02ff2a4bb6f8725714f (patch)
tree74f7caabeafc20b265723d4ff75f343f2233a863 /gtk2_ardour/ardour_ui_options.cc
parent00df619d2184ad6d46eda1b0964b7ac4ed2bffcd (diff)
use ActionManager namespace, rather than ActionMap objects, and remove all per-context action maps
Diffstat (limited to 'gtk2_ardour/ardour_ui_options.cc')
-rw-r--r--gtk2_ardour/ardour_ui_options.cc42
1 files changed, 21 insertions, 21 deletions
diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc
index 2705a544fd..3f2b1edc68 100644
--- a/gtk2_ardour/ardour_ui_options.cc
+++ b/gtk2_ardour/ardour_ui_options.cc
@@ -129,7 +129,7 @@ ARDOUR_UI::toggle_click ()
void
ARDOUR_UI::toggle_session_monitoring_in ()
{
- Glib::RefPtr<Action> act = find_action (X_("Transport"), X_("SessionMonitorIn"));
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("Transport"), X_("SessionMonitorIn"));
if (!act) {
return;
}
@@ -155,7 +155,7 @@ ARDOUR_UI::toggle_session_monitoring_in ()
void
ARDOUR_UI::toggle_session_monitoring_disk ()
{
- Glib::RefPtr<Action> act = find_action (X_("Transport"), X_("SessionMonitorDisk"));
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("Transport"), X_("SessionMonitorDisk"));
if (!act) {
return;
}
@@ -180,7 +180,7 @@ ARDOUR_UI::toggle_session_monitoring_disk ()
void
ARDOUR_UI::unset_dual_punch ()
{
- Glib::RefPtr<Action> action = find_action ("Transport", "TogglePunch");
+ Glib::RefPtr<Action> action = ActionManager::get_action ("Transport", "TogglePunch");
if (action) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(action);
@@ -199,7 +199,7 @@ ARDOUR_UI::toggle_punch ()
return;
}
- Glib::RefPtr<Action> action = find_action ("Transport", "TogglePunch");
+ Glib::RefPtr<Action> action = ActionManager::get_action ("Transport", "TogglePunch");
if (action) {
@@ -211,8 +211,8 @@ ARDOUR_UI::toggle_punch ()
/* drive the other two actions from this one */
- Glib::RefPtr<Action> in_action = find_action ("Transport", "TogglePunchIn");
- Glib::RefPtr<Action> out_action = find_action ("Transport", "TogglePunchOut");
+ Glib::RefPtr<Action> in_action = ActionManager::get_action ("Transport", "TogglePunchIn");
+ Glib::RefPtr<Action> out_action = ActionManager::get_action ("Transport", "TogglePunchOut");
if (in_action && out_action) {
Glib::RefPtr<ToggleAction> tiact = Glib::RefPtr<ToggleAction>::cast_dynamic(in_action);
@@ -226,7 +226,7 @@ ARDOUR_UI::toggle_punch ()
void
ARDOUR_UI::toggle_punch_in ()
{
- Glib::RefPtr<Action> act = find_action (X_("Transport"), X_("TogglePunchIn"));
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("Transport"), X_("TogglePunchIn"));
if (!act) {
return;
}
@@ -252,7 +252,7 @@ ARDOUR_UI::toggle_punch_in ()
void
ARDOUR_UI::toggle_punch_out ()
{
- Glib::RefPtr<Action> act = find_action (X_("Transport"), X_("TogglePunchOut"));
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("Transport"), X_("TogglePunchOut"));
if (!act) {
return;
}
@@ -278,7 +278,7 @@ ARDOUR_UI::toggle_punch_out ()
void
ARDOUR_UI::show_loop_punch_ruler_and_disallow_hide ()
{
- Glib::RefPtr<Action> act = editor->find_action (X_("Rulers"), "toggle-loop-punch-ruler");
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("Rulers"), "toggle-loop-punch-ruler");
if (!act) {
return;
}
@@ -301,7 +301,7 @@ ARDOUR_UI::reenable_hide_loop_punch_ruler_if_appropriate ()
{
if (!_session->config.get_punch_in() && !_session->config.get_punch_out()) {
/* if punch in/out are now both off, reallow hiding of the loop/punch ruler */
- Glib::RefPtr<Action> act = editor->find_action (X_("Rulers"), "toggle-loop-punch-ruler");
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("Rulers"), "toggle-loop-punch-ruler");
if (act) {
act->set_sensitive (true);
}
@@ -311,7 +311,7 @@ ARDOUR_UI::reenable_hide_loop_punch_ruler_if_appropriate ()
void
ARDOUR_UI::toggle_video_sync()
{
- Glib::RefPtr<Action> act = find_action ("Transport", "ToggleVideoSync");
+ Glib::RefPtr<Action> act = ActionManager::get_action ("Transport", "ToggleVideoSync");
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
_session->config.set_use_video_sync (tact->get_active());
@@ -321,7 +321,7 @@ ARDOUR_UI::toggle_video_sync()
void
ARDOUR_UI::toggle_editing_space()
{
- Glib::RefPtr<Action> act = find_action ("Common", "ToggleMaximalEditor");
+ Glib::RefPtr<Action> act = ActionManager::get_action ("Common", "ToggleMaximalEditor");
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
@@ -352,14 +352,14 @@ ARDOUR_UI::parameter_changed (std::string p)
if (!_session->config.get_external_sync()) {
sync_button.set_text (S_("SyncSource|Int."));
- find_action ("Transport", "ToggleAutoPlay")->set_sensitive (true);
- find_action ("Transport", "ToggleAutoReturn")->set_sensitive (true);
- find_action ("Transport", "ToggleFollowEdits")->set_sensitive (true);
+ ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (true);
+ ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (true);
+ ActionManager::get_action ("Transport", "ToggleFollowEdits")->set_sensitive (true);
} else {
/* XXX we need to make sure that auto-play is off as well as insensitive */
- find_action ("Transport", "ToggleAutoPlay")->set_sensitive (false);
- find_action ("Transport", "ToggleAutoReturn")->set_sensitive (false);
- find_action ("Transport", "ToggleFollowEdits")->set_sensitive (false);
+ ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (false);
+ ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (false);
+ ActionManager::get_action ("Transport", "ToggleFollowEdits")->set_sensitive (false);
}
} else if (p == "sync-source") {
@@ -398,8 +398,8 @@ ARDOUR_UI::parameter_changed (std::string p)
} else if (p == "auto-input") {
ActionManager::map_some_state ("Transport", "ToggleAutoInput", sigc::mem_fun (_session->config, &SessionConfiguration::get_auto_input));
} else if (p == "session-monitoring") {
- Glib::RefPtr<Action> iact = find_action (X_("Transport"), X_("SessionMonitorIn"));
- Glib::RefPtr<Action> dact = find_action (X_("Transport"), X_("SessionMonitorDisk"));
+ Glib::RefPtr<Action> iact = ActionManager::get_action (X_("Transport"), X_("SessionMonitorIn"));
+ Glib::RefPtr<Action> dact = ActionManager::get_action (X_("Transport"), X_("SessionMonitorDisk"));
if (iact && dact) {
Glib::RefPtr<ToggleAction> tdact = Glib::RefPtr<ToggleAction>::cast_dynamic(dact);
Glib::RefPtr<ToggleAction> tiact = Glib::RefPtr<ToggleAction>::cast_dynamic(iact);
@@ -577,7 +577,7 @@ ARDOUR_UI::reset_main_clocks ()
void
ARDOUR_UI::synchronize_sync_source_and_video_pullup ()
{
- Glib::RefPtr<Action> act = find_action (X_("Transport"), X_("ToggleExternalSync"));
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("Transport"), X_("ToggleExternalSync"));
if (!act) {
return;