Better version of 9ccc56e1625, implicit signal disconnect
[ardour.git] / gtk2_ardour / ardour_ui_ed.cc
index 4ee384f467c0883687e4eb037ad0822273169b14..6e9227dd6b9d97f751ba0881d077e67d640e0785 100644 (file)
@@ -342,6 +342,13 @@ ARDOUR_UI::install_actions ()
        act = global_actions.register_action (common_actions, "alt-finish-range", _("Finish Range"), sigc::bind (sigc::mem_fun(editor, &PublicEditor::keyboard_selection_finish), false, Editing::EDIT_IGNORE_NONE));
        ActionManager::session_sensitive_actions.push_back (act);
 
+       act = global_actions.register_action (common_actions, "select-all-tracks", _("Select All Tracks"), sigc::mem_fun(editor, &PublicEditor::select_all_tracks));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = global_actions.register_action (common_actions, "deselect-all", _("Deselect All"), sigc::mem_fun(editor, &PublicEditor::deselect_all));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = global_actions.register_action (common_actions, "invert-selection", _("Invert Selection"), sigc::mem_fun(editor, &PublicEditor::invert_selection));
+       ActionManager::session_sensitive_actions.push_back (act);
+
        /* These "change" actions are not intended to be used inside menus, but
           are for the tab/window control buttons, which have somewhat odd
           semantics.
@@ -369,12 +376,6 @@ ARDOUR_UI::install_actions ()
        global_actions.register_toggle_action (common_actions, X_("ToggleMaximalMixer"), _("Maximise Mixer Space"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_mixer_space));
        ActionManager::session_sensitive_actions.push_back (act);
 
-       act = global_actions.register_toggle_action (common_actions, X_("ToggleMixerList"), _("Toggle Mixer List"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_mixer_list));
-       ActionManager::session_sensitive_actions.push_back (act);
-
-       act = global_actions.register_toggle_action (common_actions, X_("ToggleMonitorSection"), _("Toggle Monitor Section Visibility"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_monitor_section_visibility));
-       act->set_sensitive (false);
-
        if (Profile->get_mixbus()) {
                global_actions.register_action (common_actions, X_("show-ui-prefs"), _("Show more UI preferences"), sigc::mem_fun (*this, &ARDOUR_UI::show_ui_prefs));
        }
@@ -623,6 +624,22 @@ ARDOUR_UI::install_actions ()
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::transport_sensitive_actions.push_back (act);
 
+       /* Monitor actions (accessible globally) */
+       /* ...will get sensitized if a mon-section is added */
+
+       act = global_actions.register_action (main_actions, X_("MonitorMenu"), _("Monitor Section"));
+       ActionManager::session_sensitive_actions.push_back (act);
+
+       Glib::RefPtr<ActionGroup> monitor_actions = global_actions.create_action_group (X_("Monitor"));
+
+       act = global_actions.register_toggle_action (monitor_actions, X_("UseMonitorSection"), _("Use Monitor Section"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_use_monitor_section));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = global_actions.register_toggle_action (monitor_actions, "monitor-mono", _("Monitor Section: Mono"), sigc::mem_fun (*this, &ARDOUR_UI::monitor_mono));
+       act->set_sensitive(false);
+       act = global_actions.register_toggle_action (monitor_actions, "monitor-cut-all", _("Monitor Section: Mute"), sigc::mem_fun (*this, &ARDOUR_UI::monitor_cut_all));
+       act->set_sensitive(false);
+       act = global_actions.register_toggle_action (monitor_actions, "monitor-dim-all", _("Monitor Section: Dim"), sigc::mem_fun (*this, &ARDOUR_UI::monitor_dim_all));
+       act->set_sensitive(false);
 
        act = global_actions.register_toggle_action (transport_actions, X_("ToggleVideoSync"), _("Sync Startup to Video"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_video_sync));
        ActionManager::session_sensitive_actions.push_back (act);