summaryrefslogtreecommitdiff
path: root/gtk2_ardour/generic_pluginui.cc
diff options
context:
space:
mode:
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2016-08-16 01:57:58 +0200
committerJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2016-08-17 01:45:47 +0200
commit6a985df81efcfbe21d077a66245e2ffc80c76a11 (patch)
treec4c2d0f4890f9f8eb7ab7d8588dd3be08a9cb009 /gtk2_ardour/generic_pluginui.cc
parent46710a75de4083b5ed4bdfd2b1109c20d8929848 (diff)
Replace positioning function with popup helper
Because all uses of the function positioning menus anchored to a widget were as callback argument to Gtk::Menu::popup() where the caller needed to correctly bind arguments, this led to repeated and a bit obscure code. Wrap the logic into an helper function that takes care of all that, and update the callers.
Diffstat (limited to 'gtk2_ardour/generic_pluginui.cc')
-rw-r--r--gtk2_ardour/generic_pluginui.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc
index 7832dcfbfe..d1accfdd12 100644
--- a/gtk2_ardour/generic_pluginui.cc
+++ b/gtk2_ardour/generic_pluginui.cc
@@ -955,9 +955,7 @@ GenericPluginUI::astate_clicked (ControlUI* cui)
items.push_back (MenuElem (_("Touch"),
sigc::bind (sigc::mem_fun(*this, &GenericPluginUI::set_automation_state), (AutoState) Touch, cui)));
- automation_menu->popup (
- boost::bind (&Gtkmm2ext::position_menu_anchored, automation_menu, &cui->automate_button, "", _1, _2, _3),
- 1, gtk_get_current_event_time());
+ anchored_menu_popup(automation_menu, &cui->automate_button, "", 1, gtk_get_current_event_time());
}
void