mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
Add tooltips for processors (#4447).
git-svn-id: svn://localhost/ardour2/branches/3.0@10437 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
85421f2b3c
commit
69413ea089
2 changed files with 16 additions and 7 deletions
|
|
@ -112,12 +112,13 @@ ProcessorEntry::ProcessorEntry (boost::shared_ptr<Processor> p, Width w)
|
||||||
_button.set_distinct_led_click (true);
|
_button.set_distinct_led_click (true);
|
||||||
_button.set_led_left (true);
|
_button.set_led_left (true);
|
||||||
_button.signal_led_clicked.connect (sigc::mem_fun (*this, &ProcessorEntry::led_clicked));
|
_button.signal_led_clicked.connect (sigc::mem_fun (*this, &ProcessorEntry::led_clicked));
|
||||||
_button.set_text (name());
|
_button.set_text (name (_width));
|
||||||
_button.show ();
|
_button.show ();
|
||||||
|
|
||||||
_processor->ActiveChanged.connect (active_connection, invalidator (*this), boost::bind (&ProcessorEntry::processor_active_changed, this), gui_context());
|
_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());
|
_processor->PropertyChanged.connect (name_connection, invalidator (*this), ui_bind (&ProcessorEntry::processor_property_changed, this, _1), gui_context());
|
||||||
|
|
||||||
|
setup_tooltip ();
|
||||||
setup_visuals ();
|
setup_visuals ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -136,7 +137,7 @@ ProcessorEntry::widget ()
|
||||||
string
|
string
|
||||||
ProcessorEntry::drag_text () const
|
ProcessorEntry::drag_text () const
|
||||||
{
|
{
|
||||||
return name ();
|
return name (Wide);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -211,12 +212,19 @@ void
|
||||||
ProcessorEntry::processor_property_changed (const PropertyChange& what_changed)
|
ProcessorEntry::processor_property_changed (const PropertyChange& what_changed)
|
||||||
{
|
{
|
||||||
if (what_changed.contains (ARDOUR::Properties::name)) {
|
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
|
string
|
||||||
ProcessorEntry::name () const
|
ProcessorEntry::name (Width w) const
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Send> send;
|
boost::shared_ptr<Send> send;
|
||||||
string name_display;
|
string name_display;
|
||||||
|
|
@ -232,7 +240,7 @@ ProcessorEntry::name () const
|
||||||
lbracket = send->name().find ('[');
|
lbracket = send->name().find ('[');
|
||||||
rbracket = send->name().find (']');
|
rbracket = send->name().find (']');
|
||||||
|
|
||||||
switch (_width) {
|
switch (w) {
|
||||||
case Wide:
|
case Wide:
|
||||||
name_display += send->name().substr (lbracket+1, lbracket-rbracket-1);
|
name_display += send->name().substr (lbracket+1, lbracket-rbracket-1);
|
||||||
break;
|
break;
|
||||||
|
|
@ -243,7 +251,7 @@ ProcessorEntry::name () const
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
switch (_width) {
|
switch (w) {
|
||||||
case Wide:
|
case Wide:
|
||||||
name_display += _processor->display_name();
|
name_display += _processor->display_name();
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,8 @@ private:
|
||||||
void led_clicked();
|
void led_clicked();
|
||||||
void processor_active_changed ();
|
void processor_active_changed ();
|
||||||
void processor_property_changed (const PBD::PropertyChange&);
|
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;
|
boost::shared_ptr<ARDOUR::Processor> _processor;
|
||||||
Width _width;
|
Width _width;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue