mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
Processor-box control context menu update
This commit is contained in:
parent
ebcabf59da
commit
20fb871d5a
1 changed files with 11 additions and 3 deletions
|
|
@ -711,6 +711,11 @@ Menu *
|
||||||
ProcessorEntry::build_controls_menu ()
|
ProcessorEntry::build_controls_menu ()
|
||||||
{
|
{
|
||||||
using namespace Menu_Helpers;
|
using namespace Menu_Helpers;
|
||||||
|
|
||||||
|
if (!_plugin_display && _controls.empty ()) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
Menu* menu = manage (new Menu);
|
Menu* menu = manage (new Menu);
|
||||||
MenuList& items = menu->items ();
|
MenuList& items = menu->items ();
|
||||||
|
|
||||||
|
|
@ -719,6 +724,11 @@ ProcessorEntry::build_controls_menu ()
|
||||||
Gtk::CheckMenuItem* c = dynamic_cast<Gtk::CheckMenuItem*> (&items.back ());
|
Gtk::CheckMenuItem* c = dynamic_cast<Gtk::CheckMenuItem*> (&items.back ());
|
||||||
c->set_active (_plugin_display->is_visible ());
|
c->set_active (_plugin_display->is_visible ());
|
||||||
c->signal_toggled().connect (sigc::mem_fun (*this, &ProcessorEntry::toggle_inline_display_visibility));
|
c->signal_toggled().connect (sigc::mem_fun (*this, &ProcessorEntry::toggle_inline_display_visibility));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_controls.empty ()) {
|
||||||
|
return menu;
|
||||||
|
} else {
|
||||||
items.push_back (SeparatorElem ());
|
items.push_back (SeparatorElem ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -730,9 +740,7 @@ ProcessorEntry::build_controls_menu ()
|
||||||
MenuElem (_("Hide All Controls"), sigc::mem_fun (*this, &ProcessorEntry::hide_all_controls))
|
MenuElem (_("Hide All Controls"), sigc::mem_fun (*this, &ProcessorEntry::hide_all_controls))
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!_controls.empty ()) {
|
items.push_back (SeparatorElem ());
|
||||||
items.push_back (SeparatorElem ());
|
|
||||||
}
|
|
||||||
|
|
||||||
for (list<Control*>::iterator i = _controls.begin(); i != _controls.end(); ++i) {
|
for (list<Control*>::iterator i = _controls.begin(); i != _controls.end(); ++i) {
|
||||||
items.push_back (CheckMenuElemNoMnemonic ((*i)->name ()));
|
items.push_back (CheckMenuElemNoMnemonic ((*i)->name ()));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue