Add and bind backward/forward seeks

This commit is contained in:
Přemysl Eric Janouch 2017-06-05 19:57:00 +02:00
parent 77c78d8866
commit 627cb0dee9
Signed by: p
GPG Key ID: B715679E3A361BE6
1 changed files with 11 additions and 5 deletions

View File

@ -1502,6 +1502,8 @@ app_goto_tab (int tab_index)
XX( MPD_TOGGLE, "Toggle play/pause" ) \ XX( MPD_TOGGLE, "Toggle play/pause" ) \
XX( MPD_STOP, "Stop playback" ) \ XX( MPD_STOP, "Stop playback" ) \
XX( MPD_NEXT, "Next song" ) \ XX( MPD_NEXT, "Next song" ) \
XX( MPD_BACKWARD, "Seek backwards" ) \
XX( MPD_FORWARD, "Seek forwards" ) \
XX( MPD_VOLUME_UP, "Increase volume" ) \ XX( MPD_VOLUME_UP, "Increase volume" ) \
XX( MPD_VOLUME_DOWN, "Decrease volume" ) \ XX( MPD_VOLUME_DOWN, "Decrease volume" ) \
\ \
@ -1661,11 +1663,13 @@ app_process_action (enum action action)
} }
break; break;
// TODO: relative seeks // XXX: these should rather be parametrized
#if 0 case ACTION_MPD_FORWARD:
FORWARD: MPD_SIMPLE ("seekcur", "+10"); MPD_SIMPLE ("seekcur", "+10");
BACKWARD: MPD_SIMPLE ("seekcur", "-10"); break;
#endif case ACTION_MPD_BACKWARD:
MPD_SIMPLE ("seekcur", "-10");
break;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -1859,6 +1863,8 @@ g_default_bindings[] =
{ "r", ACTION_MPD_REPLACE, {}}, { "r", ACTION_MPD_REPLACE, {}},
{ "u", ACTION_MPD_UPDATE_DB, {}}, { "u", ACTION_MPD_UPDATE_DB, {}},
{ "M-Left", ACTION_MPD_BACKWARD, {}},
{ "M-Right", ACTION_MPD_FORWARD, {}},
{ "Left", ACTION_MPD_PREVIOUS, {}}, { "Left", ACTION_MPD_PREVIOUS, {}},
{ "Right", ACTION_MPD_NEXT, {}}, { "Right", ACTION_MPD_NEXT, {}},
{ "h", ACTION_MPD_PREVIOUS, {}}, { "h", ACTION_MPD_PREVIOUS, {}},