move select-all-tracks,deselect-all,invert-selection to be global actions (and bindings)
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 24 Aug 2018 13:42:43 +0000 (09:42 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 24 Aug 2018 14:08:08 +0000 (10:08 -0400)
13 files changed:
gtk2_ardour/SAE-de-keypad.bindings.in
gtk2_ardour/SAE-de-nokeypad.bindings.in
gtk2_ardour/SAE-us-keypad.bindings.in
gtk2_ardour/ardour.keys.in
gtk2_ardour/ardour_ui_ed.cc
gtk2_ardour/editor_actions.cc
gtk2_ardour/ergonomic-us.bindings.in
gtk2_ardour/mixer.bindings
gtk2_ardour/mixer_ui.cc
gtk2_ardour/mixer_ui.h
gtk2_ardour/public_editor.h
libs/surfaces/mackie/mcp_buttons.cc
libs/surfaces/us2400/mcp_buttons.cc

index b142c58a962f4afe0c5e3203d329181f9a7dc00f..88c1505a9ab165d1a53d03d56800df4a0d16c2c1 100644 (file)
@@ -63,7 +63,7 @@
 (gtk_accel_path "<Actions>/Editor/set-region-sync-position" "u")
 (gtk_accel_path "<Actions>/Editor/insert-region-from-region-list" "i")
 (gtk_accel_path "<Actions>/Editor/addExistingAudioFiles" "<@PRIMARY@>i")
-(gtk_accel_path "<Actions>/Editor/invert-selection" "<@TERTIARY@>i")
+(gtk_accel_path "<Actions>/Common/invert-selection" "<@TERTIARY@>i")
 (gtk_accel_path "<Actions>/Main/Open" "<@PRIMARY@>o")
 (gtk_accel_path "<Actions>/Main/Recent" "<@PRIMARY@><@TERTIARY@>o")
 (gtk_accel_path "<Actions>/Editor/naturalize-region" "<@LEVEL4@>o")
index d91eed041e730de73366ea3af827b16f31e9c6d5..5ea1d8d7a61e5ec3138e29fc1e146d3b1f0f44a6 100644 (file)
@@ -63,7 +63,7 @@
 (gtk_accel_path "<Actions>/Editor/set-region-sync-position" "u")
 (gtk_accel_path "<Actions>/Editor/insert-region-from-region-list" "i")
 (gtk_accel_path "<Actions>/Editor/addExistingAudioFiles" "<@PRIMARY@>i")
-(gtk_accel_path "<Actions>/Editor/invert-selection" "<@TERTIARY@>i")
+(gtk_accel_path "<Actions>/Common/invert-selection" "<@TERTIARY@>i")
 (gtk_accel_path "<Actions>/Main/Open" "<@PRIMARY@>o")
 (gtk_accel_path "<Actions>/Main/Recent" "<@PRIMARY@><@TERTIARY@>o")
 (gtk_accel_path "<Actions>/Editor/naturalize-region" "<@LEVEL4@>o")
index c10a8cc06266b5f16a4a2bcb89ea03ec6c218fac..a4ed568a3b488e8c435c852c5dd520da31f0c7dd 100644 (file)
@@ -61,7 +61,7 @@
 (gtk_accel_path "<Actions>/Editor/set-region-sync-position" "u")
 (gtk_accel_path "<Actions>/Editor/insert-region-from-region-list" "i")
 (gtk_accel_path "<Actions>/Editor/addExistingAudioFiles" "<@PRIMARY@>i")
-(gtk_accel_path "<Actions>/Editor/invert-selection" "<@TERTIARY@>i")
+(gtk_accel_path "<Actions>/Common/invert-selection" "<@TERTIARY@>i")
 (gtk_accel_path "<Actions>/Main/Open" "<@PRIMARY@>o")
 (gtk_accel_path "<Actions>/Main/Recent" "<@PRIMARY@><@TERTIARY@>o")
 (gtk_accel_path "<Actions>/Editor/naturalize-region" "<@LEVEL4@>o")
index 96b178577687185a78ce3ae4194ea002dad105af..b482553a872e826671377069f1ae94038d94e8e4 100644 (file)
@@ -69,6 +69,8 @@ playhead to the n-th marker.
 
 %select Editor Selecting
 
+%gselect Global Selecting
+
 %ranges Editor Defining Loop, Punch Range and Tempo Changes
 
 %markers Editor Markers \& Locations
@@ -157,13 +159,13 @@ This mode provides many different operations on both regions and control points,
 @edit|Editor/redo|<@PRIMARY@>r|redo
 @trans|Transport/Record|<@TERTIARY@>r|engage record
 @mmode|MouseMode/set-mouse-mode-timefx|t|timefx mode
-@select|Editor/select-all-tracks|<@PRIMARY@>t|select all tracks
+@gselect|Common/select-all-tracks|<@PRIMARY@>t|select all tracks
 @edit|Editor/alternate-redo|<@PRIMARY@>y|redo
 @select|Editor/select-all-between-cursors|<@PRIMARY@>u|all enclosed by edit range
 @select|Editor/select-all-within-cursors|u|all present in edit range
 @eep|Region/insert-region-from-region-list|i|insert from region list
 @sess|Common/addExistingAudioFiles|<@PRIMARY@>i|import audio files
-@select|Editor/invert-selection|<@TERTIARY@>i|invert selection
+@gselect|Common/invert-selection|<@TERTIARY@>i|invert selection
 @edtrk|Editor/toggle-midi-input-active|<@SECONDARY@>i|toggle sel. track MIDI input
 @mmode|MouseMode/set-mouse-mode-object|g|object mode
 @mmode|MouseMode/set-mouse-mode-content|e|content mode
index b5c0a9d5637d152392efbb784384afaf0e302dba..79d3c6abcad859609886953e5a68e582344b963c 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.
index e5af91d132cc4d264e9d388e004d2536ea9e789e..334284a301fb062934a3d5e82ce562d9af0a1f45 100644 (file)
@@ -219,9 +219,6 @@ Editor::register_actions ()
        reg_sens (editor_actions, "playhead-to-range-end", _("Playhead to Range End"), sigc::bind (sigc::mem_fun(*this, &Editor::cursor_to_selection_end), playhead_cursor));
 
        reg_sens (editor_actions, "select-all-objects", _("Select All Objects"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_objects), Selection::Set));
-       reg_sens (editor_actions, "select-all-tracks", _("Select All Tracks"), sigc::mem_fun(*this, &Editor::select_all_tracks));
-       reg_sens (editor_actions, "deselect-all", _("Deselect All"), sigc::mem_fun(*this, &Editor::deselect_all));
-       reg_sens (editor_actions, "invert-selection", _("Invert Selection"), sigc::mem_fun(*this, &Editor::invert_selection));
 
        reg_sens (editor_actions, "select-loop-range", _("Set Range to Loop Range"), sigc::mem_fun(*this, &Editor::set_selection_from_loop));
        reg_sens (editor_actions, "select-punch-range", _("Set Range to Punch Range"), sigc::mem_fun(*this, &Editor::set_selection_from_punch));
index 0a9c3b21d9f8c2385485d65f83cf65e4cd87fc96..a83f4dab61fc9f3e54a73acac2a51c61fd797530 100644 (file)
 ; (gtk_accel_path "<Actions>/options/UseExternalMonitoring" "")
 ; (gtk_accel_path "<Actions>/Editor/Smpte23976" "")
 (gtk_accel_path "<Actions>/Common/goto-editor" "<@WINDOW@>e")
-(gtk_accel_path "<Actions>/Editor/select-all" "F14")
-(gtk_accel_path "<Actions>/Editor/invert-selection" "F15")
+(gtk_accel_path "<Actions>/Common/select-all" "F14")
+(gtk_accel_path "<Actions>/Common/invert-selection" "F15")
 (gtk_accel_path "<Actions>/Editor/nudge-next-forward" "<@PRIMARY@>KP_Add")
 ; (gtk_accel_path "<Actions>/options/ShowSoloMutes" "")
 ; (gtk_accel_path "<Actions>/Snap/snap-to-eighths" "")
index b650974aedd6657595dd8d8436937a64ef35b342..6056cdcd6444be4146dc4368f401ae0f1409c2f1 100644 (file)
@@ -4,7 +4,6 @@
    <Binding key="m" action="Mixer/mute" group="Operations on the selected strip(s)"/>
    <Binding key="Secondary-i" action="Mixer/toggle-midi-input-active" group="Operations on the selected strip(s)"/>
    <Binding key="r" action="Mixer/recenable" group="Operations on the selected strip(s)"/>
-   <Binding key="Primary-t" action="Mixer/select-all-tracks" group="Operations on the selected strip(s)"/>
    <Binding key="0" action="Mixer/unity-gain" group="Operations on the selected strip(s)"/>
    <Binding key="Up" action="Mixer/increment-gain" group="Operations on the selected strip(s)"/>
    <Binding key="Down" action="Mixer/decrement-gain" group="Operations on the selected strip(s)"/>
index 359feb360c1b4a2e3222e84ad97a989f299be0f2..4bd46e5b5bc8b4dc5d20bffe961ee8eebd6c0183 100644 (file)
@@ -639,12 +639,6 @@ Mixer_UI::deselect_all_strip_processors ()
        }
 }
 
-void
-Mixer_UI::select_all_tracks ()
-{
-       PublicEditor::instance().select_all_tracks ();
-}
-
 void
 Mixer_UI::select_none ()
 {
@@ -3082,7 +3076,6 @@ Mixer_UI::register_actions ()
        myactions.register_action (group, "toggle-processors", _("Toggle Selected Processors"), sigc::mem_fun (*this, &Mixer_UI::toggle_processors));
        myactions.register_action (group, "ab-plugins", _("Toggle Selected Plugins"), sigc::mem_fun (*this, &Mixer_UI::ab_plugins));
        myactions.register_action (group, "select-none", _("Deselect all strips and processors"), sigc::mem_fun (*this, &Mixer_UI::select_none));
-       myactions.register_action (group, "select-all-tracks", _("Select All Tracks"), sigc::mem_fun (*this, &Mixer_UI::select_all_tracks));
 
        myactions.register_action (group, "scroll-left", _("Scroll Mixer Window to the left"), sigc::mem_fun (*this, &Mixer_UI::scroll_left));
        myactions.register_action (group, "scroll-right", _("Scroll Mixer Window to the right"), sigc::mem_fun (*this, &Mixer_UI::scroll_right));
index 0ef17eee38c30a51c4b337c2d0216de2680fec57..f617fdbb6ae49d7e679fefb83846c71b38787df0 100644 (file)
@@ -115,7 +115,6 @@ public:
        void deselect_all_strip_processors();
        void delete_processors();
        void select_none ();
-       void select_all_tracks ();
 
        void do_vca_assign (boost::shared_ptr<ARDOUR::VCA>);
        void do_vca_unassign (boost::shared_ptr<ARDOUR::VCA>);
index 4f655f0fb17a923bf9cad7ca16e8339c14eb017e..aed2fb94c1e288b0d37baed3f68763fa5bd036bf 100644 (file)
@@ -281,6 +281,7 @@ public:
        virtual void clear_playlists (TimeAxisView*) = 0;
        virtual void select_all_tracks () = 0;
        virtual void deselect_all () = 0;
+       virtual void invert_selection () = 0;
        virtual void set_selected_track (TimeAxisView&, Selection::Operation op = Selection::Set, bool no_remove = false) = 0;
        virtual void set_selected_mixer_strip (TimeAxisView&) = 0;
        virtual void hide_track_in_display (TimeAxisView* tv, bool apply_to_selection = false) = 0;
index a4ab7d9099d8371e42133a626dbde33901fbaf2b..697805674c4abddc713849fe9380fa56fa9ed9ff 100644 (file)
@@ -588,7 +588,7 @@ MackieControlProtocol::enter_press (Button &)
        if (main_modifier_state() & MODIFIER_SHIFT) {
                access_action ("Transport/ToggleFollowEdits");
        } else {
-               access_action ("Editor/select-all-tracks");
+               access_action ("Common/select-all-tracks");
        }
        return none;
 }
index b88d88b3125ecec2007497e615a652b6b147de11..40eff942fecac2ab0fd47d48de1ac43084b62193 100644 (file)
@@ -589,7 +589,7 @@ US2400Protocol::enter_press (Button &)
        if (main_modifier_state() & MODIFIER_SHIFT) {
                access_action ("Transport/ToggleFollowEdits");
        } else {
-               access_action ("Editor/select-all-tracks");
+               access_action ("Common/select-all-tracks");
        }
        return none;
 }