summaryrefslogtreecommitdiff
path: root/gtk2_ardour/shuttle_control.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-03-16 02:25:53 +0100
committerRobin Gareus <robin@gareus.org>2017-03-16 02:36:48 +0100
commit3aefd0e74495c327599c76a918caa1df11064b21 (patch)
tree2cb7fa51b61d55aa467fddc583fab92dd16da3c8 /gtk2_ardour/shuttle_control.cc
parentb3722f7063699fafd0421d504e05a7300c70e0ec (diff)
consolidate context-menu popup methods
Diffstat (limited to 'gtk2_ardour/shuttle_control.cc')
-rw-r--r--gtk2_ardour/shuttle_control.cc24
1 files changed, 4 insertions, 20 deletions
diff --git a/gtk2_ardour/shuttle_control.cc b/gtk2_ardour/shuttle_control.cc
index e205c4ddd8..010ac2d119 100644
--- a/gtk2_ardour/shuttle_control.cc
+++ b/gtk2_ardour/shuttle_control.cc
@@ -256,16 +256,6 @@ ShuttleControl::build_shuttle_context_menu ()
}
void
-ShuttleControl::show_shuttle_context_menu ()
-{
- if (shuttle_context_menu == 0) {
- build_shuttle_context_menu ();
- }
-
- shuttle_context_menu->popup (1, gtk_get_current_event_time());
-}
-
-void
ShuttleControl::reset_speed ()
{
if (_session->transport_rolling()) {
@@ -295,7 +285,10 @@ ShuttleControl::on_button_press_event (GdkEventButton* ev)
}
if (Keyboard::is_context_menu_event (ev)) {
- show_shuttle_context_menu ();
+ if (shuttle_context_menu == 0) {
+ build_shuttle_context_menu ();
+ }
+ shuttle_context_menu->popup (ev->button, ev->time);
return true;
}
@@ -668,15 +661,6 @@ ShuttleControl::render (cairo_t* cr, cairo_rectangle_t*)
}
void
-ShuttleControl::shuttle_unit_clicked ()
-{
- if (shuttle_unit_menu == 0) {
- shuttle_unit_menu = dynamic_cast<Menu*> (ActionManager::get_widget ("/ShuttleUnitPopup"));
- }
- shuttle_unit_menu->popup (1, gtk_get_current_event_time());
-}
-
-void
ShuttleControl::set_shuttle_style (ShuttleBehaviour s)
{
Config->set_shuttle_behaviour (s);