diff options
-rw-r--r-- | gtk2_ardour/processor_box.cc | 23 | ||||
-rw-r--r-- | gtk2_ardour/processor_box.h | 1 |
2 files changed, 24 insertions, 0 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index f7168934bb..483bed6197 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -445,6 +445,29 @@ ProcessorEntry::Control::Control (Glib::RefPtr<Gdk::Pixbuf> s, boost::shared_ptr } control_changed (); + set_tooltip (); +} + +void +ProcessorEntry::Control::set_tooltip () +{ + boost::shared_ptr<AutomationControl> c = _control.lock (); + + if (!c) { + return; + } + + stringstream s; + s << _name << ": "; + if (c->toggled ()) { + s << (c->get_value() > 0.5 ? _("on") : _("off")); + } else { + s << c->internal_to_interface (c->get_value ()); + } + + ARDOUR_UI::instance()->set_tip (_label, s.str ()); + ARDOUR_UI::instance()->set_tip (_slider, s.str ()); + ARDOUR_UI::instance()->set_tip (_button, s.str ()); } void diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index f21fffa3f0..0e6582bb2f 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -181,6 +181,7 @@ private: void button_clicked (); void control_changed (); std::string state_id () const; + void set_tooltip (); boost::weak_ptr<ARDOUR::AutomationControl> _control; /* things for a slider */ |