allow to hide monitor-section processor box with processors
authorRobin Gareus <robin@gareus.org>
Sun, 27 Dec 2015 18:11:07 +0000 (19:11 +0100)
committerRobin Gareus <robin@gareus.org>
Sun, 27 Dec 2015 18:11:07 +0000 (19:11 +0100)
indicate processors by coloring the button instead.

gtk2_ardour/dark.colors
gtk2_ardour/monitor_section.cc
gtk2_ardour/monitor_section.h

index da73afc342dd989721b89ce55ce8ff69855fd98e..c78e566d9981b3e992c8a075793e8341cba387e5 100644 (file)
     <ColorAlias name="midi input button: fill active" alias="color 48"/>
     <ColorAlias name="monitor section button: fill active" alias="color 42"/>
     <ColorAlias name="monitor processors toggle: fill active" alias="color 42"/>
+    <ColorAlias name="monitor processors present: fill" alias="color 20"/>
     <ColorAlias name="midi input button: led active" alias="color 4"/>
     <ColorAlias name="midi meter color0" alias="color 52"/>
     <ColorAlias name="midi meter color1" alias="color 53"/>
index d1047271ddb5c92753f5e2d9ad65b5029ee5046f..605a96464b53116f7cb6aaae3bf136e511b7c13c 100644 (file)
@@ -190,7 +190,7 @@ MonitorSection::MonitorSection (Session* s)
 
        proctoggle = ToggleAction::create ();
        toggle_processorbox_button.set_related_action (proctoggle);
-       proctoggle->signal_toggled().connect (sigc::mem_fun(*this, &MonitorSection::repack_processor_box), false);
+       proctoggle->signal_toggled().connect (sigc::mem_fun(*this, &MonitorSection::update_processor_box), false);
 
        /* Knobs */
        Label* solo_boost_label;
@@ -477,7 +477,7 @@ MonitorSection::MonitorSection (Session* s)
        _tearoff->tearoff_window().signal_key_press_event().connect (sigc::ptr_fun (forward_key_press), false);
 
        update_output_display ();
-       repack_processor_box ();
+       update_processor_box ();
        _ui_initialized = true;
 
        /* catch changes that affect us */
@@ -513,16 +513,14 @@ MonitorSection::~MonitorSection ()
 
 
 void
-MonitorSection::repack_processor_box ()
+MonitorSection::update_processor_box ()
 {
        bool show_processor_box = proctoggle->get_active ();
 
-       if (count_processors () > 0) {
-               proctoggle->set_active (true);
-               proctoggle->set_sensitive (false);
-               show_processor_box = true;
+       if (count_processors () > 0 && !show_processor_box) {
+               toggle_processorbox_button.set_name (X_("monitor processors present"));
        } else {
-               proctoggle->set_sensitive (true);
+               toggle_processorbox_button.set_name (X_("monitor processors toggle"));
        }
 
        if (insert_box->is_visible() == show_processor_box) {
@@ -564,7 +562,7 @@ MonitorSection::set_session (Session* s)
                        insert_box->set_route (_route);
                        _route->processors_changed.connect (*this, invalidator (*this), boost::bind (&MonitorSection::processors_changed, this, _1), gui_context());
                        if (_ui_initialized) {
-                               repack_processor_box ();  // too early
+                               update_processor_box ();
                        }
                } else {
                        /* session with no monitor section */
@@ -1620,5 +1618,5 @@ MonitorSection::count_processors ()
 void
 MonitorSection::processors_changed (ARDOUR::RouteProcessorChange)
 {
-       repack_processor_box ();
+       update_processor_box ();
 }
index bca55b70235125afe894a52464f2436b5ca165b6..c8aed68dcb5d8ee84edba4a874dcdac3fb4d210b 100644 (file)
@@ -166,7 +166,7 @@ class MonitorSection : public RouteUI
 
        void port_connected_or_disconnected (boost::weak_ptr<ARDOUR::Port>, boost::weak_ptr<ARDOUR::Port>);
 
-       void repack_processor_box ();
+       void update_processor_box ();
 
        ProcessorBox* insert_box;
        PluginSelector* _plugin_selector;