Add tooltips to plugin controls in the processor box

(#4697).


git-svn-id: svn://localhost/ardour2/branches/3.0@11741 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-03-21 14:13:48 +00:00
parent a4c27ff16e
commit ed12f85c88
2 changed files with 24 additions and 0 deletions

View File

@ -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

View File

@ -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 */