X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fardour_ui2.cc;h=8080e66b65f1bd4b9f887df52ed80d39c05637f7;hb=154f9825ff72d691ba550de573948424b81a09a6;hp=97d639fc1bb5990d995811b6aa4b6b867d79a89f;hpb=65bda27d4218d9d4ebf809d91e716c892e1f1d8b;p=ardour.git diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index 97d639fc1b..8080e66b65 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -255,42 +255,42 @@ ARDOUR_UI::setup_transport () RefPtr act; /* setup actions */ - act = global_actions.find_action (X_("Transport"), X_("ToggleExternalSync")); + act = ActionManager::get_action (X_("Transport"), X_("ToggleExternalSync")); sync_button.set_related_action (act); sync_button.signal_button_press_event().connect (sigc::mem_fun (*this, &ARDOUR_UI::sync_button_clicked), false); sync_button.set_sizing_text (S_("LogestSync|M-Clk")); /* CANNOT sigc::bind these to clicked or toggled, must use pressed or released */ - act = global_actions.find_action (X_("Main"), X_("cancel-solo")); + act = ActionManager::get_action (X_("Main"), X_("cancel-solo")); solo_alert_button.set_related_action (act); auditioning_alert_button.signal_clicked.connect (sigc::mem_fun(*this,&ARDOUR_UI::audition_alert_clicked)); error_alert_button.signal_button_release_event().connect (sigc::mem_fun(*this,&ARDOUR_UI::error_alert_press), false); - act = editor->find_action (X_("Editor"), X_("toggle-log-window")); + act = ActionManager::get_action (X_("Editor"), X_("toggle-log-window")); error_alert_button.set_related_action(act); error_alert_button.set_fallthrough_to_parent(true); layered_button.signal_clicked.connect (sigc::mem_fun(*this,&ARDOUR_UI::layered_button_clicked)); - editor_visibility_button.set_related_action (global_actions.find_action (X_("Common"), X_("change-editor-visibility"))); - mixer_visibility_button.set_related_action (global_actions.find_action (X_("Common"), X_("change-mixer-visibility"))); - prefs_visibility_button.set_related_action (global_actions.find_action (X_("Common"), X_("change-preferences-visibility"))); + editor_visibility_button.set_related_action (ActionManager::get_action (X_("Common"), X_("change-editor-visibility"))); + mixer_visibility_button.set_related_action (ActionManager::get_action (X_("Common"), X_("change-mixer-visibility"))); + prefs_visibility_button.set_related_action (ActionManager::get_action (X_("Common"), X_("change-preferences-visibility"))); - act = global_actions.find_action ("Transport", "ToggleAutoReturn"); + act = ActionManager::get_action ("Transport", "ToggleAutoReturn"); auto_return_button.set_related_action (act); - act = global_actions.find_action (X_("Transport"), X_("ToggleFollowEdits")); + act = ActionManager::get_action (X_("Transport"), X_("ToggleFollowEdits")); follow_edits_button.set_related_action (act); - act = global_actions.find_action ("Transport", "ToggleAutoInput"); + act = ActionManager::get_action ("Transport", "ToggleAutoInput"); auto_input_button.set_related_action (act); - act = global_actions.find_action ("Transport", "TogglePunchIn"); + act = ActionManager::get_action ("Transport", "TogglePunchIn"); punch_in_button.set_related_action (act); - act = global_actions.find_action ("Transport", "TogglePunchOut"); + act = ActionManager::get_action ("Transport", "TogglePunchOut"); punch_out_button.set_related_action (act); - act = global_actions.find_action ("Transport", "SessionMonitorIn"); + act = ActionManager::get_action ("Transport", "SessionMonitorIn"); monitor_in_button.set_related_action (act); - act = global_actions.find_action ("Transport", "SessionMonitorDisk"); + act = ActionManager::get_action ("Transport", "SessionMonitorDisk"); monitor_disk_button.set_related_action (act); /* connect signals */ @@ -594,7 +594,7 @@ ARDOUR_UI::error_alert_press (GdkEventButton* ev) if (ev->button == 1) { if (_log_not_acknowledged == LogLevelError) { // just acknowledge the error, don't hide the log if it's already visible - RefPtr act = editor->find_action (X_("Editor"), X_("toggle-log-window")); + RefPtr act = ActionManager::get_action (X_("Editor"), X_("toggle-log-window")); Glib::RefPtr tact = Glib::RefPtr::cast_dynamic (act); if (tact && tact->get_active()) { do_toggle = false; @@ -781,7 +781,7 @@ ARDOUR_UI::sync_button_clicked (GdkEventButton* ev) void ARDOUR_UI::toggle_follow_edits () { - RefPtr act = global_actions.find_action (X_("Transport"), X_("ToggleFollowEdits")); + RefPtr act = ActionManager::get_action (X_("Transport"), X_("ToggleFollowEdits")); assert (act); RefPtr tact = RefPtr::cast_dynamic (act); @@ -821,6 +821,10 @@ ARDOUR_UI::update_title () void ARDOUR_UI::toggle_use_monitor_section () { + if (!_session) { + return; + } + RefPtr act = ActionManager::get_action (X_("Monitor"), "UseMonitorSection"); assert (act); RefPtr tact = Glib::RefPtr::cast_dynamic (act); assert (tact);