_button.set_distinct_led_click (true);
_button.set_led_left (true);
_button.signal_led_clicked.connect (sigc::mem_fun (*this, &ProcessorEntry::led_clicked));
- _button.set_text (name());
+ _button.set_text (name (_width));
_button.show ();
_processor->ActiveChanged.connect (active_connection, invalidator (*this), boost::bind (&ProcessorEntry::processor_active_changed, this), gui_context());
_processor->PropertyChanged.connect (name_connection, invalidator (*this), ui_bind (&ProcessorEntry::processor_property_changed, this, _1), gui_context());
+ setup_tooltip ();
setup_visuals ();
}
string
ProcessorEntry::drag_text () const
{
- return name ();
+ return name (Wide);
}
void
ProcessorEntry::processor_property_changed (const PropertyChange& what_changed)
{
if (what_changed.contains (ARDOUR::Properties::name)) {
- _button.set_text (name ());
+ _button.set_text (name (_width));
+ setup_tooltip ();
}
}
+void
+ProcessorEntry::setup_tooltip ()
+{
+ ARDOUR_UI::instance()->set_tip (_button, name (Wide));
+}
+
string
-ProcessorEntry::name () const
+ProcessorEntry::name (Width w) const
{
boost::shared_ptr<Send> send;
string name_display;
lbracket = send->name().find ('[');
rbracket = send->name().find (']');
- switch (_width) {
+ switch (w) {
case Wide:
name_display += send->name().substr (lbracket+1, lbracket-rbracket-1);
break;
} else {
- switch (_width) {
+ switch (w) {
case Wide:
name_display += _processor->display_name();
break;
void led_clicked();
void processor_active_changed ();
void processor_property_changed (const PBD::PropertyChange&);
- std::string name () const;
+ std::string name (Width) const;
+ void setup_tooltip ();
boost::shared_ptr<ARDOUR::Processor> _processor;
Width _width;