From 62cab525f0e017b00f3f4010f1c51834821ef79c Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Fri, 11 Jul 2014 15:41:28 -0500 Subject: [PATCH] (Mixbus profile only) tentatively remove the Zoom and Cut tools, to save space in the toolbar and reduce some highly redundant functions --- gtk2_ardour/editor.cc | 7 +++++-- gtk2_ardour/editor_actions.cc | 28 ++++++++++++++++------------ gtk2_ardour/editor_mouse.cc | 10 ++++++++++ 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 991bb33c9f..24f9004f6c 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -2807,8 +2807,11 @@ Editor::setup_toolbar () mouse_mode_hbox->pack_start (mouse_move_button, false, false); mouse_mode_hbox->pack_start (mouse_select_button, false, false); - mouse_mode_hbox->pack_start (mouse_cut_button, false, false); - mouse_mode_hbox->pack_start (mouse_zoom_button, false, false); + + if (!ARDOUR::Profile->get_mixbus()) { + mouse_mode_hbox->pack_start (mouse_cut_button, false, false); + mouse_mode_hbox->pack_start (mouse_zoom_button, false, false); + } if (!ARDOUR::Profile->get_trx()) { mouse_mode_hbox->pack_start (mouse_gain_button, false, false); diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index ea82bc6051..d977d27b86 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -470,12 +470,14 @@ Editor::register_actions () mouse_gain_button.add_elements (ArdourButton::Inset ); mouse_gain_button.set_name ("mouse mode button"); - act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-zoom", _("Zoom Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseZoom)); - mouse_zoom_button.set_related_action (act); - mouse_zoom_button.set_image (::get_icon("tool_zoom")); - mouse_zoom_button.add_elements (ArdourButton::Inset ); - mouse_zoom_button.set_name ("mouse mode button"); - + if(!Profile->get_mixbus()) { + act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-zoom", _("Zoom Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseZoom)); + mouse_zoom_button.set_related_action (act); + mouse_zoom_button.set_image (::get_icon("tool_zoom")); + mouse_zoom_button.add_elements (ArdourButton::Inset ); + mouse_zoom_button.set_name ("mouse mode button"); + } + act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-audition", _("Audition Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseAudition)); mouse_audition_button.set_related_action (act); mouse_audition_button.set_image (::get_icon("tool_audition")); @@ -488,12 +490,14 @@ Editor::register_actions () mouse_timefx_button.add_elements (ArdourButton::Inset ); mouse_timefx_button.set_name ("mouse mode button"); - act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-cut", _("Cut Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseCut)); - mouse_cut_button.set_related_action (act); - mouse_cut_button.set_image (::get_icon("tool_cut")); - mouse_cut_button.add_elements (ArdourButton::Inset ); - mouse_cut_button.set_name ("mouse mode button"); - + if(!Profile->get_mixbus()) { + act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-cut", _("Cut Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseCut)); + mouse_cut_button.set_related_action (act); + mouse_cut_button.set_image (::get_icon("tool_cut")); + mouse_cut_button.add_elements (ArdourButton::Inset ); + mouse_cut_button.set_name ("mouse mode button"); + } + ActionManager::register_action (editor_actions, "step-mouse-mode", _("Step Mouse Mode"), sigc::bind (sigc::mem_fun(*this, &Editor::step_mouse_mode), true)); act = ActionManager::register_toggle_action (mouse_mode_actions, "toggle-internal-edit", _("Edit MIDI"), sigc::mem_fun(*this, &Editor::toggle_internal_editing)); diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 4f7d587b24..c12d11ff3f 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -232,6 +232,11 @@ Editor::set_mouse_mode (MouseMode m, bool force) return; } + if (ARDOUR::Profile->get_mixbus()) { + if ( m == MouseZoom) m = MouseObject; + if ( m == MouseCut) m = MouseObject; + } + Glib::RefPtr act; switch (m) { @@ -286,6 +291,11 @@ Editor::mouse_mode_toggled (MouseMode m) Glib::RefPtr act; Glib::RefPtr tact; + if (ARDOUR::Profile->get_mixbus()) { + if ( m == MouseZoom) m = MouseObject; + if ( m == MouseCut) m = MouseObject; + } + switch (m) { case MouseRange: act = ActionManager::get_action (X_("MouseMode"), X_("set-mouse-mode-range"));