Skip to content

Commit

Permalink
hotkey: Add option to toggle "stop after current song". Patch from Al…
Browse files Browse the repository at this point in the history
…ex Matveev. Closes: #232.
  • Loading branch information
jlindgren90 committed Jan 4, 2013
1 parent bd3b373 commit a8219fe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/hotkey/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ static gchar* event_desc[EVENT_MAX] = {
[EVENT_SHOW_AOSD] = N_("Show On-Screen-Display"),
[EVENT_TOGGLE_REPEAT] = N_("Toggle Repeat"),
[EVENT_TOGGLE_SHUFFLE] = N_("Toggle Shuffle"),
[EVENT_TOGGLE_STOP] = N_("Toggle Stop After Current"),
[EVENT_RAISE] = N_("Raise Player Window(s)")
};

Expand Down
6 changes: 6 additions & 0 deletions src/hotkey/plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,12 @@ gboolean handle_keyevent (EVENT event)
return TRUE;
}

if (event == EVENT_TOGGLE_STOP)
{
aud_set_bool (NULL, "stop_after_current_song", ! aud_get_bool (NULL, "stop_after_current_song"));
return TRUE;
}

if (event == EVENT_RAISE)
{
aud_interface_show (TRUE);
Expand Down
1 change: 1 addition & 0 deletions src/hotkey/plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ typedef enum {

EVENT_TOGGLE_REPEAT,
EVENT_TOGGLE_SHUFFLE,
EVENT_TOGGLE_STOP,

EVENT_RAISE,

Expand Down

0 comments on commit a8219fe

Please sign in to comment.