Use accelerator key of "/Editor/set-playhead" action to position playhead in editor summary pane, rather than hard-coding the default accelerator of 'p'.
git-svn-id: svn://localhost/ardour2/branches/3.0@13106 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
9743340fa3
commit
ee80d2a95f
@ -310,17 +310,15 @@ bool
|
|||||||
EditorSummary::on_key_press_event (GdkEventKey* key)
|
EditorSummary::on_key_press_event (GdkEventKey* key)
|
||||||
{
|
{
|
||||||
gint x, y;
|
gint x, y;
|
||||||
|
GtkAccelKey set_playhead_accel;
|
||||||
switch (key->keyval) {
|
if (gtk_accel_map_lookup_entry ("<Actions>/Editor/set-playhead", &set_playhead_accel)) {
|
||||||
case GDK_p:
|
if (key->keyval == set_playhead_accel.accel_key && (int) key->state == set_playhead_accel.accel_mods) {
|
||||||
if (_session) {
|
if (_session) {
|
||||||
get_pointer (x, y);
|
get_pointer (x, y);
|
||||||
_session->request_locate ((framepos_t) x / _x_scale, _session->transport_rolling());
|
_session->request_locate ((framepos_t) x / _x_scale, _session->transport_rolling());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -329,11 +327,12 @@ EditorSummary::on_key_press_event (GdkEventKey* key)
|
|||||||
bool
|
bool
|
||||||
EditorSummary::on_key_release_event (GdkEventKey* key)
|
EditorSummary::on_key_release_event (GdkEventKey* key)
|
||||||
{
|
{
|
||||||
switch (key->keyval) {
|
|
||||||
case GDK_p:
|
GtkAccelKey set_playhead_accel;
|
||||||
|
if (gtk_accel_map_lookup_entry ("<Actions>/Editor/set-playhead", &set_playhead_accel)) {
|
||||||
|
if (key->keyval == set_playhead_accel.accel_key && (int) key->state == set_playhead_accel.accel_mods) {
|
||||||
return true;
|
return true;
|
||||||
default:
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user