Use dedicated "show editor/mixer" actions
authorRobin Gareus <robin@gareus.org>
Fri, 10 Mar 2017 16:50:44 +0000 (17:50 +0100)
committerRobin Gareus <robin@gareus.org>
Fri, 10 Mar 2017 16:52:42 +0000 (17:52 +0100)
gtk2_ardour/ardour.keys.in
gtk2_ardour/ardour_ui_ed.cc
gtk2_ardour/mixer.bindings
gtk2_ardour/mixer_ui.cc
gtk2_ardour/mixer_ui.h
libs/surfaces/faderport/gui.cc

index 6d55ac6f864740cdf81604cb02b2bf0c052b6bec..7456ea233925d385aac0b92d07588bdcd98755f5 100644 (file)
@@ -226,7 +226,7 @@ This mode provides many different operations on both regions and control points,
 @sess|Main/AddTrackBus|<@PRIMARY@><@TERTIARY@>n|add track(s) or bus(ses)
 @sess|Main/New|<@PRIMARY@>n|open a new session
 @wvis|Window/toggle-midi-connection-manager|<@SECONDARY@><@TERTIARY@>m|toggle global midi patchbay
-@wvis|Common/toggle-editor-and-mixer|<@SECONDARY@>m|toggle editor & mixer
+@wvis|Window/show-mixer|<@SECONDARY@>m|show mixer window
 
 ;; arrow keys, navigation etc.
 
index 43db73360840c9700e48b4bbcdffc676a4fc87bc..18a803621787770fc4689e97748b98016744a1b7 100644 (file)
@@ -259,8 +259,6 @@ ARDOUR_UI::install_actions ()
        global_actions.register_action (common_actions, X_("Quit"), _("Quit"), (hide_return (sigc::mem_fun(*this, &ARDOUR_UI::finish))));
        global_actions.register_action (common_actions, X_("Hide"), _("Hide"), sigc::mem_fun (*this, &ARDOUR_UI::hide_application));
 
-       global_actions.register_action (common_actions, X_("show-editor"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), editor));
-       global_actions.register_action (common_actions, X_("show-mixer"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), mixer));
        global_actions.register_action (common_actions, X_("show-preferences"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), rc_option_editor));
        global_actions.register_action (common_actions, X_("menu-show-preferences"), _("Preferences"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), rc_option_editor));
 
@@ -276,6 +274,9 @@ ARDOUR_UI::install_actions ()
        global_actions.register_action (common_actions, X_("detach-mixer"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), mixer));
        global_actions.register_action (common_actions, X_("detach-preferences"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), rc_option_editor));
 
+       Glib::RefPtr<Gtk::ActionGroup> window_actions = ARDOUR_UI::instance()->global_actions.create_action_group (X_("Window"));
+       global_actions.register_action (window_actions, X_("show-mixer"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), mixer));
+
        /* these actions are all currently implemented by the Editor, but need
         * to be accessible from anywhere as actions.
         */
@@ -356,8 +357,6 @@ ARDOUR_UI::install_actions ()
        global_actions.register_action (common_actions, X_("previous-tab"), _("Previous Tab"), sigc::mem_fun (*this, &ARDOUR_UI::step_up_through_tabs));
        global_actions.register_action (common_actions, X_("next-tab"), _("Next Tab"), sigc::mem_fun (*this, &ARDOUR_UI::step_down_through_tabs));
 
-       global_actions.register_action (common_actions, X_("toggle-editor-and-mixer"), _("Toggle Editor & Mixer"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_editor_and_mixer));
-
        /* windows visibility actions */
 
        global_actions.register_toggle_action (common_actions, X_("ToggleMaximalEditor"), _("Maximise Editor Space"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_editing_space));
index 1a8a3138d840d5b616830fcd5f0955582a8fa38c..6056cdcd6444be4146dc4368f401ae0f1409c2f1 100644 (file)
@@ -17,5 +17,6 @@
    <Binding key="Return" action="Mixer/toggle-processors" group="Processor operations on the selected strip(s)"/>
    <Binding key="Primary-a" action="Mixer/select-all-processors" group="Processor operations on the selected strip(s)"/>
    <Binding key="slash" action="Mixer/ab-plugins" group="Processor operations on the selected strip(s)"/>
+   <Binding key="Secondary-m" action="Mixer/show-editor" group="Window Visibility"/>
   </Press>
  </Bindings>
index e3f8111ca6e3fe149d8f0d61bbfcf23cce735d88..6c7a72ca14f4c7cf4234ce9bbc45592d49998391 100644 (file)
@@ -2905,11 +2905,19 @@ Mixer_UI::showing_spill_for (boost::shared_ptr<Stripable> s) const
        return s == spilled_strip.lock();
 }
 
+void
+Mixer_UI::show_editor_window () const
+{
+       PublicEditor::instance().make_visible ();
+}
+
 void
 Mixer_UI::register_actions ()
 {
        Glib::RefPtr<ActionGroup> group = myactions.create_action_group (X_("Mixer"));
 
+       myactions.register_action (group, "show-editor", _("Show Editor"), sigc::mem_fun (*this, &Mixer_UI::show_editor_window));
+
        myactions.register_action (group, "solo", _("Toggle Solo on Mixer-Selected Tracks/Busses"), sigc::mem_fun (*this, &Mixer_UI::solo_action));
        myactions.register_action (group, "mute", _("Toggle Mute on Mixer-Selected Tracks/Busses"), sigc::mem_fun (*this, &Mixer_UI::mute_action));
        myactions.register_action (group, "recenable", _("Toggle Rec-enable on Mixer-Selected Tracks/Busses"), sigc::mem_fun (*this, &Mixer_UI::rec_enable_action));
index a96ce697345cccd20eb06f389ebdd955620bc4ba..be557ec018a35edd93f76d52997708712736e314 100644 (file)
@@ -111,8 +111,6 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p
        void select_strip (MixerStrip&, bool add=false);
        void select_none ();
 
-       bool window_not_visible () const;
-
        void do_vca_assign (boost::shared_ptr<ARDOUR::VCA>);
        void do_vca_unassign (boost::shared_ptr<ARDOUR::VCA>);
        void show_spill (boost::shared_ptr<ARDOUR::Stripable>);
@@ -121,6 +119,9 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p
        sigc::signal1<void,boost::shared_ptr<ARDOUR::Stripable> > show_spill_change;
 
        RouteProcessorSelection& selection() { return _selection; }
+
+       void show_editor_window () const;
+
        void register_actions ();
 
         void load_bindings ();
index db93d4cd8efcae3df728b20b298da78e4a0c4ab7..e24af3601f7ee576d2e750d41ecc3bc019f572ee 100644 (file)
@@ -519,7 +519,7 @@ FPGUI::build_mix_action_combo (Gtk::ComboBox& cb, FaderPort::ButtonState bs)
 {
        vector<pair<string,string> > actions;
 
-       actions.push_back (make_pair (string (_("Show Mixer Window")), string (X_("Editor/toggle-editor-to-mixer"))));
+       actions.push_back (make_pair (string (_("Show Mixer Window")), string (X_("Window/show-mixer"))));
        actions.push_back (make_pair (string (_("Show/Hide Mixer list")), string (X_("Common/ToggleMixerList"))));
        actions.push_back (make_pair (string("Toggle Meterbridge"), string(X_("Common/toggle-meterbridge"))));
        actions.push_back (make_pair (string (_("Show/Hide Editor mixer strip")), string (X_("Editor/show-editor-mixer"))));