13
0

Allow to bind generic plugin-ui dropdown + clickboxes

This commit is contained in:
Robin Gareus 2017-07-02 22:53:28 +02:00
parent 3a42383975
commit ef8756a83a
2 changed files with 9 additions and 1 deletions

View File

@ -70,9 +70,14 @@ ArdourDropdown::menu_size_request(Requisition *req) {
bool bool
ArdourDropdown::on_button_press_event (GdkEventButton* ev) ArdourDropdown::on_button_press_event (GdkEventButton* ev)
{ {
if (ev->type == GDK_BUTTON_PRESS) { if (binding_proxy.button_press_handler (ev)) {
return true;
}
if (ev->type == GDK_BUTTON_PRESS && ev->button == 1) {
Gtkmm2ext::anchored_menu_popup(&_menu, this, get_text(), 1, ev->time); Gtkmm2ext::anchored_menu_popup(&_menu, this, get_text(), 1, ev->time);
} }
return true; return true;
} }

View File

@ -730,6 +730,8 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param,
i->second))); i->second)));
} }
control_ui->combo->set_controllable (mcontrol);
update_control_display(control_ui); update_control_display(control_ui);
} else { } else {
@ -759,6 +761,7 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param,
} else { } else {
control_ui->clickbox->set_printer (sigc::bind (sigc::mem_fun (*this, &GenericPluginUI::integer_printer), control_ui)); control_ui->clickbox->set_printer (sigc::bind (sigc::mem_fun (*this, &GenericPluginUI::integer_printer), control_ui));
} }
control_ui->clickbox->set_controllable (mcontrol);
} else if (desc.toggled) { } else if (desc.toggled) {
ArdourButton* but = dynamic_cast<ArdourButton*> (control_ui->controller->widget()); ArdourButton* but = dynamic_cast<ArdourButton*> (control_ui->controller->widget());
assert(but); assert(but);