Add 100% shuttle controls option - closes #6537
This commit is contained in:
parent
88920232e9
commit
ad4ae3df85
|
@ -234,6 +234,8 @@ ShuttleControl::build_shuttle_context_menu ()
|
||||||
|
|
||||||
items.push_back (MenuElem (_("Maximum speed"), *speed_menu));
|
items.push_back (MenuElem (_("Maximum speed"), *speed_menu));
|
||||||
|
|
||||||
|
items.push_back (SeparatorElem ());
|
||||||
|
items.push_back (MenuElem (_("Reset to 100%"), sigc::mem_fun (*this, &ShuttleControl::reset_speed)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -246,6 +248,16 @@ ShuttleControl::show_shuttle_context_menu ()
|
||||||
shuttle_context_menu->popup (1, gtk_get_current_event_time());
|
shuttle_context_menu->popup (1, gtk_get_current_event_time());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ShuttleControl::reset_speed ()
|
||||||
|
{
|
||||||
|
if (_session->transport_rolling()) {
|
||||||
|
_session->request_transport_speed (1.0, true);
|
||||||
|
} else {
|
||||||
|
_session->request_transport_speed (0.0, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ShuttleControl::set_shuttle_max_speed (float speed)
|
ShuttleControl::set_shuttle_max_speed (float speed)
|
||||||
{
|
{
|
||||||
|
|
|
@ -78,6 +78,7 @@ class ShuttleControl : public CairoWidget, public ARDOUR::SessionHandlePtr
|
||||||
void shuttle_style_changed();
|
void shuttle_style_changed();
|
||||||
void shuttle_unit_clicked ();
|
void shuttle_unit_clicked ();
|
||||||
void set_shuttle_max_speed (float);
|
void set_shuttle_max_speed (float);
|
||||||
|
void reset_speed ();
|
||||||
|
|
||||||
bool on_enter_notify_event (GdkEventCrossing*);
|
bool on_enter_notify_event (GdkEventCrossing*);
|
||||||
bool on_leave_notify_event (GdkEventCrossing*);
|
bool on_leave_notify_event (GdkEventCrossing*);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user