processor-box: remove label-cruft and properly label 'Send' & 'Return'
authorRobin Gareus <robin@gareus.org>
Sun, 5 Jan 2014 20:05:48 +0000 (21:05 +0100)
committerRobin Gareus <robin@gareus.org>
Sun, 5 Jan 2014 20:05:48 +0000 (21:05 +0100)
gtk2_ardour/processor_box.cc
gtk2_ardour/processor_box.h

index becfecffb46e88f6acad1cdbecfe4839c1870857..1a7861fa2e69a3549a4235718208a79af70688c8 100644 (file)
@@ -134,7 +134,15 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processo
                set<Evoral::Parameter> p = _processor->what_can_be_automated ();
                for (set<Evoral::Parameter>::iterator i = p.begin(); i != p.end(); ++i) {
                        
-                       Control* c = new Control (_processor->automation_control (*i), _processor->describe_parameter (*i));
+                       std::string label = _processor->describe_parameter (*i);
+
+                       if (boost::dynamic_pointer_cast<Send> (_processor)) {
+                               label = _("Send");
+                       } else if (boost::dynamic_pointer_cast<Return> (_processor)) {
+                               label = _("Return");
+                       }
+
+                       Control* c = new Control (_processor->automation_control (*i), label);
                        
                        _controls.push_back (c);
 
@@ -142,11 +150,6 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processo
                                /* Add non-Amp controls to the processor box */
                                _vbox.pack_start (c->box);
                        }
-
-                       if (boost::dynamic_pointer_cast<Send> (_processor)) {
-                               /* Don't label send faders */
-                               c->hide_label ();
-                       }
                }
 
                _input_icon.set_ports(_processor->input_streams());
@@ -511,7 +514,6 @@ ProcessorEntry::Control::set_tooltip ()
 
        string sm = Glib::Markup::escape_text (s.str());
        
-       ARDOUR_UI::instance()->set_tip (_label, sm);
        _slider_persistant_tooltip.set_tip (sm);
        ARDOUR_UI::instance()->set_tip (_button, sm);
 }
@@ -620,12 +622,6 @@ ProcessorEntry::Control::hide_things ()
        }
 }
 
-void
-ProcessorEntry::Control::hide_label ()
-{
-       _label.hide ();
-}
-
 string
 ProcessorEntry::Control::state_id () const
 {
index 2278369910e9862ae6d22ce3860ea993c793a1fe..9b39269cda5dbf7f394cf8e663525720793fd1f4 100644 (file)
@@ -171,7 +171,6 @@ private:
                void add_state (XMLNode *) const;
                void set_state (XMLNode const *);
                void hide_things ();
-               void hide_label ();
 
                bool visible () const {
                        return _visible;
@@ -194,7 +193,6 @@ private:
                /* things for a slider */
                Gtk::Adjustment _adjustment;
                Gtkmm2ext::HSliderController _slider;
-               Gtk::Label _label;
                Gtkmm2ext::PersistentTooltip _slider_persistant_tooltip;
                /* things for a button */
                ArdourButton _button;