add mixbus profile which removes the tearoffs
authorBen Loftis <ben@harrisonconsoles.com>
Wed, 9 Jul 2014 20:11:58 +0000 (15:11 -0500)
committerBen Loftis <ben@harrisonconsoles.com>
Wed, 9 Jul 2014 20:12:05 +0000 (15:12 -0500)
gtk2_ardour/ardour_ui.cc
gtk2_ardour/ardour_ui2.cc
gtk2_ardour/editor.cc
libs/ardour/ardour/profile.h

index c87c78d58e187ccea1d2475990ee0347b1c0125e..0191c087009e3494a060f866b7deab37bf6145d5 100644 (file)
@@ -4305,6 +4305,10 @@ ARDOUR_UI::setup_profile ()
        if (g_getenv ("TRX")) {
                Profile->set_trx ();
        }
+
+       if (g_getenv ("MIXBUS")) {
+               Profile->set_mixbus ();
+       }
 }
 
 int
index 53efcbb48b6bc467dbb53f260c46df94d564dd01..ad8336ca103e84c02628a11bdf47f06eca6de6fe 100644 (file)
@@ -223,7 +223,7 @@ ARDOUR_UI::setup_transport ()
        transport_tearoff->set_name ("TransportBase");
        transport_tearoff->tearoff_window().signal_key_press_event().connect (sigc::bind (sigc::ptr_fun (relay_key_press), &transport_tearoff->tearoff_window()), false);
 
-       if (Profile->get_sae()) {
+       if (Profile->get_sae() || Profile->get_mixbus()) {
                transport_tearoff->set_can_be_torn_off (false);
        }
 
index 73686966feacfe905a44727ddb3408f1590e7d68..4727943287452bc58d98c0ab90db4d36fc19ace4 100644 (file)
@@ -2825,7 +2825,7 @@ Editor::setup_toolbar ()
        _mouse_mode_tearoff->set_name ("MouseModeBase");
        _mouse_mode_tearoff->tearoff_window().signal_key_press_event().connect (sigc::bind (sigc::ptr_fun (relay_key_press), &_mouse_mode_tearoff->tearoff_window()), false);
 
-       if (Profile->get_sae()) {
+       if (Profile->get_sae() || Profile->get_mixbus() ) {
                _mouse_mode_tearoff->set_can_be_torn_off (false);
        }
 
@@ -2870,14 +2870,18 @@ Editor::setup_toolbar ()
        set_size_request_to_display_given_text (zoom_focus_selector, _("Edit Point"), 30, 2);
 //     zoom_focus_selector.add_elements (ArdourButton::Inset);
 
-       if (!ARDOUR::Profile->get_trx()) {
+       if (ARDOUR::Profile->get_mixbus()) {
                _zoom_box.pack_start (zoom_out_button, false, false);
                _zoom_box.pack_start (zoom_in_button, false, false);
                _zoom_box.pack_start (zoom_out_full_button, false, false);
-               _zoom_box.pack_start (zoom_focus_selector, false, false);
-       } else {
+       } else if (ARDOUR::Profile->get_trx()) {
                mode_box->pack_start (zoom_out_button, false, false);
                mode_box->pack_start (zoom_in_button, false, false);
+       } else {
+               _zoom_box.pack_start (zoom_out_button, false, false);
+               _zoom_box.pack_start (zoom_in_button, false, false);
+               _zoom_box.pack_start (zoom_out_full_button, false, false);
+               _zoom_box.pack_start (zoom_focus_selector, false, false);
        }
 
        /* Track zoom buttons */
@@ -2920,6 +2924,10 @@ Editor::setup_toolbar ()
                                                            &_zoom_tearoff->tearoff_window(), 0));
        } 
 
+       if (Profile->get_sae() || Profile->get_mixbus() ) {
+               _zoom_tearoff->set_can_be_torn_off (false);
+       }
+
        snap_box.set_spacing (2);
        snap_box.set_border_width (2);
 
@@ -2965,7 +2973,7 @@ Editor::setup_toolbar ()
        _tools_tearoff->set_name ("MouseModeBase");
        _tools_tearoff->tearoff_window().signal_key_press_event().connect (sigc::bind (sigc::ptr_fun (relay_key_press), &_tools_tearoff->tearoff_window()), false);
 
-       if (Profile->get_sae()) {
+       if (Profile->get_sae() || Profile->get_mixbus()) {
                _tools_tearoff->set_can_be_torn_off (false);
        }
 
index 56d9ff62be78af77839c827f01afb8af4468d5a2..1ea7e2b03648a881879a13fcfbb509f99193ec9e 100644 (file)
@@ -34,6 +34,7 @@ public:
                SAE,
                SinglePackage,
                Trx,
+               Mixbus,
                LastElement,
        };
 
@@ -49,6 +50,9 @@ public:
     bool get_trx() const { return bits[Trx]; }
     void set_trx() { bits[Trx] = true; }
 
+    bool get_mixbus() const { return bits[Mixbus]; }
+    void set_mixbus() { bits[Mixbus] = true; }
+
     void set_single_package () { bits[SinglePackage] = true; }
     bool get_single_package () const { return bits[SinglePackage]; }