From 9dec0724385c3b39b67a9bbca9ff14acf9951ec9 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 5 Jan 2014 21:05:48 +0100 Subject: [PATCH] processor-box: remove label-cruft and properly label 'Send' & 'Return' --- gtk2_ardour/processor_box.cc | 22 +++++++++------------- gtk2_ardour/processor_box.h | 2 -- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index becfecffb4..1a7861fa2e 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -134,7 +134,15 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr p = _processor->what_can_be_automated (); for (set::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 (_processor)) { + label = _("Send"); + } else if (boost::dynamic_pointer_cast (_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_ptrbox); } - - if (boost::dynamic_pointer_cast (_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 { diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index 2278369910..9b39269cda 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -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;