Fix warning.
[ardour.git] / gtk2_ardour / editor_actions.cc
index b46b44b3eb5effbe5d331460c489092eb45bbd1c..79df54b25fdecbb568ce4551a6b04fb87e9b60ef 100644 (file)
@@ -200,13 +200,14 @@ Editor::register_actions ()
        act = ActionManager::register_action (editor_actions, "select-all-in-loop-range", _("Select All in Loop Range"), sigc::mem_fun(*this, &Editor::select_all_selectables_using_loop));
        ActionManager::session_sensitive_actions.push_back (act);
 
-       act = ActionManager::register_action (editor_actions, "select-next-route", _("Select Next Track/Bus"), sigc::mem_fun(*this, &Editor::select_next_route));
+       act = ActionManager::register_action (editor_actions, "select-next-route", _("Select Next Track or Bus"), sigc::mem_fun(*this, &Editor::select_next_route));
        ActionManager::session_sensitive_actions.push_back (act);
-       act = ActionManager::register_action (editor_actions, "select-prev-route", _("Select Previous Track/Bus"), sigc::mem_fun(*this, &Editor::select_prev_route));
+       act = ActionManager::register_action (editor_actions, "select-prev-route", _("Select Previous Track or Bus"), sigc::mem_fun(*this, &Editor::select_prev_route));
        ActionManager::session_sensitive_actions.push_back (act);
 
        act = ActionManager::register_action (editor_actions, "track-record-enable-toggle", _("Toggle Record Enable"), sigc::mem_fun(*this, &Editor::toggle_record_enable));
        ActionManager::session_sensitive_actions.push_back (act);
+        ActionManager::track_selection_sensitive_actions.push_back (act);
 
        for (int i = 1; i <= 12; ++i) {
                string const a = string_compose (X_("save-visual-state-%1"), i);
@@ -270,17 +271,23 @@ Editor::register_actions ()
 
        act = ActionManager::register_action (editor_actions, "move-selected-tracks-up", _("Move Selected Tracks Up"), sigc::bind (sigc::mem_fun(*_routes, &EditorRoutes::move_selected_tracks), true));
        ActionManager::session_sensitive_actions.push_back (act);
+        ActionManager::track_selection_sensitive_actions.push_back (act);
        act = ActionManager::register_action (editor_actions, "move-selected-tracks-down", _("Move Selected Tracks Down"), sigc::bind (sigc::mem_fun(*_routes, &EditorRoutes::move_selected_tracks), false));
        ActionManager::session_sensitive_actions.push_back (act);
+        ActionManager::track_selection_sensitive_actions.push_back (act);
 
        act = ActionManager::register_action (editor_actions, "scroll-tracks-up", _("Scroll Tracks Up"), sigc::mem_fun(*this, &Editor::scroll_tracks_up));
        ActionManager::session_sensitive_actions.push_back (act);
+        ActionManager::track_selection_sensitive_actions.push_back (act);
        act = ActionManager::register_action (editor_actions, "scroll-tracks-down", _("Scroll Tracks Down"), sigc::mem_fun(*this, &Editor::scroll_tracks_down));
+        ActionManager::track_selection_sensitive_actions.push_back (act);
        ActionManager::session_sensitive_actions.push_back (act);
        act = ActionManager::register_action (editor_actions, "step-tracks-up", _("Step Tracks Up"), sigc::mem_fun(*this, &Editor::scroll_tracks_up_line));
+        ActionManager::track_selection_sensitive_actions.push_back (act);
        ActionManager::session_sensitive_actions.push_back (act);
        act = ActionManager::register_action (editor_actions, "step-tracks-down", _("Step Tracks Down"), sigc::mem_fun(*this, &Editor::scroll_tracks_down_line));
        ActionManager::session_sensitive_actions.push_back (act);
+        ActionManager::track_selection_sensitive_actions.push_back (act);
 
        act = ActionManager::register_action (editor_actions, "scroll-backward", _("Scroll Backward"), sigc::bind (sigc::mem_fun(*this, &Editor::scroll_backward), 0.8f));
        ActionManager::session_sensitive_actions.push_back (act);
@@ -406,7 +413,7 @@ Editor::register_actions ()
        act = ActionManager::register_action (editor_actions, "duplicate-region", _("Duplicate Region"), sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_dialog), false));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::region_selection_sensitive_actions.push_back (act);
-       act = ActionManager::register_action (editor_actions, "multi-duplicate-region", _("Multi-Duplicate Region"), sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_dialog), true));
+       act = ActionManager::register_action (editor_actions, "multi-duplicate-region", _("Multi-Duplicate Region..."), sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_dialog), true));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::region_selection_sensitive_actions.push_back (act);
        act = ActionManager::register_action (editor_actions, "duplicate-range", _("Duplicate Range"), sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_dialog), false));
@@ -415,13 +422,13 @@ Editor::register_actions ()
        act = ActionManager::register_action (editor_actions, "insert-region", _("Insert Region"), sigc::mem_fun(*this, &Editor::keyboard_insert_region_list_selection));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::region_selection_sensitive_actions.push_back (act);
-       act = ActionManager::register_action (editor_actions, "normalize-region", _("Normalize Region"), sigc::mem_fun(*this, &Editor::normalize_region));
+       act = ActionManager::register_action (editor_actions, "normalize-region", _("Normalize Region..."), sigc::mem_fun(*this, &Editor::normalize_region));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::region_selection_sensitive_actions.push_back (act);
-       act = ActionManager::register_action (editor_actions, "rename-region", _("Rename"), sigc::mem_fun(*this, &Editor::rename_region));
+       act = ActionManager::register_action (editor_actions, "rename-region", _("Rename Region..."), sigc::mem_fun(*this, &Editor::rename_region));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::region_selection_sensitive_actions.push_back (act);
-       act = ActionManager::register_action (editor_actions, "auto-rename-region", _("Auto-Rename"), sigc::mem_fun(*this, &Editor::rename_region));
+       act = ActionManager::register_action (editor_actions, "auto-rename-region", _("Auto-Rename Region"), sigc::mem_fun(*this, &Editor::rename_region));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::region_selection_sensitive_actions.push_back (act);
        act = ActionManager::register_action (editor_actions, "boost-region-gain", _("Boost Region Gain"), sigc::bind (sigc::mem_fun(*this, &Editor::adjust_region_scale_amplitude), true));
@@ -451,7 +458,7 @@ Editor::register_actions ()
        act = ActionManager::register_toggle_action (editor_actions, "lock-region", _("Lock Region"), sigc::mem_fun(*this, &Editor::toggle_region_lock));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::region_selection_sensitive_actions.push_back (act);
-       act = ActionManager::register_toggle_action (editor_actions, "glue-region", _("Glue Region to Bars and Beats"), sigc::bind (sigc::mem_fun (*this, &Editor::set_region_lock_style), Region::MusicTime));
+       act = ActionManager::register_toggle_action (editor_actions, "glue-region", _("Glue Region to Bars and Beats"), sigc::mem_fun (*this, &Editor::toggle_region_lock_style));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::region_selection_sensitive_actions.push_back (act);
        act = ActionManager::register_action (editor_actions, "naturalize-region", _("Move to Original Position"), sigc::mem_fun (*this, &Editor::naturalize));
@@ -515,8 +522,9 @@ Editor::register_actions ()
        act = ActionManager::register_action (editor_actions, "split-region-at-transients", _("Split Regions At Percussion Onsets"), sigc::mem_fun(*this, &Editor::split_region_at_transients));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::region_selection_sensitive_actions.push_back (act);
-       act = ActionManager::register_action (editor_actions, "toggle-rhythm-ferret", _("Rhythm Ferret"), sigc::mem_fun(*this, &Editor::show_rhythm_ferret));
+       act = ActionManager::register_action (editor_actions, "toggle-rhythm-ferret", _("Rhythm Ferret..."), sigc::mem_fun(*this, &Editor::show_rhythm_ferret));
        ActionManager::session_sensitive_actions.push_back (act);
+       ActionManager::region_selection_sensitive_actions.push_back (act);
        act = ActionManager::register_action (editor_actions, "toggle-audio-connection-manager", _("Audio Connection Manager"), sigc::bind (sigc::mem_fun (*this, &Editor::show_global_port_matrix), ARDOUR::DataType::AUDIO));
        ActionManager::session_sensitive_actions.push_back (act);
        act = ActionManager::register_action (editor_actions, "toggle-midi-connection-manager", _("MIDI Connection Manager"), sigc::bind (sigc::mem_fun (*this, &Editor::show_global_port_matrix), ARDOUR::DataType::MIDI));
@@ -550,6 +558,8 @@ Editor::register_actions ()
        act = ActionManager::register_action (editor_actions, "remove-last-capture", _("Remove Last Capture"), (sigc::mem_fun(*this, &Editor::remove_last_capture)));
        ActionManager::session_sensitive_actions.push_back (act);
 
+        ActionManager::register_toggle_action (editor_actions, "toggle-stationary-playhead", _("Stationary Playhead"), (mem_fun(*this, &Editor::toggle_stationary_playhead)));
+
        act = ActionManager::register_action (editor_actions, "insert-time", _("Insert Time"), (sigc::mem_fun(*this, &Editor::do_insert_time)));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::track_selection_sensitive_actions.push_back (act);
@@ -567,6 +577,7 @@ Editor::register_actions ()
 
        act = ActionManager::register_action (editor_actions, "fit-tracks", _("Fit Selected Tracks"), sigc::mem_fun(*this, &Editor::fit_selected_tracks));
        ActionManager::session_sensitive_actions.push_back (act);
+        ActionManager::track_selection_sensitive_actions.push_back (act);
        act = ActionManager::register_action (editor_actions, "track-height-largest", _("Largest"), sigc::bind (
                                sigc::mem_fun(*this, &Editor::set_track_height), TimeAxisView::hLargest));
        ActionManager::session_sensitive_actions.push_back (act);
@@ -765,7 +776,7 @@ Editor::register_actions ()
        ActionManager::region_list_selection_sensitive_actions.push_back (act);
        act = ActionManager::register_action (rl_actions, X_("rlHide"), _("Hide"), sigc::mem_fun(*this, &Editor::hide_region_from_region_list));
        ActionManager::region_list_selection_sensitive_actions.push_back (act);
-       act = ActionManager::register_action (rl_actions, X_("rlRemove"), _("Remove"), sigc::mem_fun (*_regions, &EditorRegions::remove_region));
+       act = ActionManager::register_action (rl_actions, X_("rlShow"), _("Show"), sigc::mem_fun(*this, &Editor::show_region_in_region_list));
        ActionManager::region_list_selection_sensitive_actions.push_back (act);
        ActionManager::register_toggle_action (rl_actions, X_("rlShowAll"), _("Show All"), sigc::mem_fun(*_regions, &EditorRegions::toggle_full));
        ActionManager::register_toggle_action (rl_actions, X_("rlShowAuto"), _("Show Automatic Regions"), sigc::mem_fun (*_regions, &EditorRegions::toggle_show_auto_regions));
@@ -810,8 +821,6 @@ Editor::register_actions ()
        act = ActionManager::register_action (editor_actions, X_("importFromSession"), _("Import From Session"), sigc::mem_fun(*this, &Editor::session_import_dialog));
        ActionManager::write_sensitive_actions.push_back (act);
 
-       ActionManager::register_toggle_action (editor_actions, X_("ToggleWaveformsWhileRecording"), _("Show Waveforms While Recording"), sigc::mem_fun (*this, &Editor::toggle_waveforms_while_recording));
-
        ActionManager::register_toggle_action (editor_actions, X_("ToggleSummary"), _("Show Summary"), sigc::mem_fun (*this, &Editor::set_summary));
 
        ActionManager::register_toggle_action (editor_actions, X_("ToggleGroupTabs"), _("Show Group Tabs"), sigc::mem_fun (*this, &Editor::set_group_tabs));
@@ -888,16 +897,6 @@ Editor::toggle_ruler_visibility (RulerType rt)
        }
 }
 
-void
-Editor::toggle_waveforms_while_recording ()
-{
-       Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleWaveformsWhileRecording"));
-       if (act) {
-               Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
-               set_show_waveforms_recording (tact->get_active());
-       }
-}
-
 void
 Editor::set_summary ()
 {