diff options
author | waker <wakeroid@gmail.com> | 2012-11-24 13:53:09 +0100 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2012-11-24 13:53:09 +0100 |
commit | 9afb563e52434f3901ba47552c628e527d1701df (patch) | |
tree | c500f764ee66b278a3dc1f5442d47398775cf7c2 /plugins/gtkui/actionhandlers.c | |
parent | 96fe746b8aadf6a6c22fe4d83ae4d1652e07473c (diff) |
gtkui: added cycle play order hotkeys
Diffstat (limited to 'plugins/gtkui/actionhandlers.c')
-rw-r--r-- | plugins/gtkui/actionhandlers.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/plugins/gtkui/actionhandlers.c b/plugins/gtkui/actionhandlers.c index b1f159fb..c8d16424 100644 --- a/plugins/gtkui/actionhandlers.c +++ b/plugins/gtkui/actionhandlers.c @@ -1008,3 +1008,29 @@ action_playback_order_linear_handler(DB_plugin_action_t *act, int ctx) { g_idle_add (action_playback_order_linear_handler_cb, NULL); return 0; } + +//deadbeef->conf_get_int ("playback.loop", PLAYBACK_MODE_LOOP_ALL) +gboolean +action_playback_order_cycle_handler_cb (void *data) { + int ord = deadbeef->conf_get_int ("playback.order", PLAYBACK_ORDER_LINEAR); + switch (ord) { + case PLAYBACK_ORDER_LINEAR: + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (lookup_widget (mainwin, "order_shuffle")), 1); + break; + case PLAYBACK_ORDER_SHUFFLE_TRACKS: + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (lookup_widget (mainwin, "order_shuffle_albums")), 1); + break; + case PLAYBACK_ORDER_SHUFFLE_ALBUMS: + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (lookup_widget (mainwin, "order_random")), 1); + break; + case PLAYBACK_ORDER_RANDOM: + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (lookup_widget (mainwin, "order_linear")), 1); + break; + } +} + +int +action_playback_order_cycle_handler(DB_plugin_action_t *act, int ctx) { + g_idle_add (action_playback_order_cycle_handler_cb, NULL); + return 0; +} |