diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/lib/playback_control.c | 41 |
1 files changed, 13 insertions, 28 deletions
diff --git a/apps/plugins/lib/playback_control.c b/apps/plugins/lib/playback_control.c index 177f26a417..94f0d69c2b 100644 --- a/apps/plugins/lib/playback_control.c +++ b/apps/plugins/lib/playback_control.c | |||
@@ -59,46 +59,31 @@ bool nexttrack(void) | |||
59 | 59 | ||
60 | static bool volume(void) | 60 | static bool volume(void) |
61 | { | 61 | { |
62 | return api->set_sound("Volume", &api->global_settings->volume, | 62 | const struct settings_list* vol = |
63 | SOUND_VOLUME); | 63 | api->find_setting(&api->global_settings->volume, NULL); |
64 | return api->option_screen((struct settings_list*)vol, false); | ||
64 | } | 65 | } |
65 | 66 | ||
66 | static bool shuffle(void) | 67 | static bool shuffle(void) |
67 | { | 68 | { |
68 | struct opt_items names[2]; | 69 | const struct settings_list* shuffle = |
69 | names[0].string = "No"; | 70 | api->find_setting(&api->global_settings->playlist_shuffle, NULL); |
70 | names[0].voice_id = -1; | 71 | return api->option_screen((struct settings_list*)shuffle, false); |
71 | names[1].string = "Yes"; | ||
72 | names[1].voice_id = -1; | ||
73 | |||
74 | return api->set_option("Shuffle", &api->global_settings->playlist_shuffle, | ||
75 | BOOL, names, 2,NULL); | ||
76 | } | 72 | } |
77 | 73 | ||
78 | static bool repeat_mode(void) | 74 | static bool repeat_mode(void) |
79 | { | 75 | { |
80 | bool result; | 76 | const struct settings_list* repeat = |
81 | static const struct opt_items names[] = { | 77 | api->find_setting(&api->global_settings->repeat_mode, NULL); |
82 | { "Off", -1 }, | ||
83 | { "Repeat All", -1 }, | ||
84 | { "Repeat One", -1 }, | ||
85 | { "Repeat Shuffle", -1 }, | ||
86 | #ifdef AB_REPEAT_ENABLE | ||
87 | { "Repeat A-B", -1 } | ||
88 | #endif | ||
89 | }; | ||
90 | |||
91 | int old_repeat = api->global_settings->repeat_mode; | 78 | int old_repeat = api->global_settings->repeat_mode; |
92 | 79 | ||
93 | result = api->set_option( "Repeat Mode", | 80 | api->option_screen((struct settings_list*)repeat, false); |
94 | &api->global_settings->repeat_mode, | 81 | |
95 | INT, names, NUM_REPEAT_MODES, NULL ); | ||
96 | |||
97 | if (old_repeat != api->global_settings->repeat_mode && | 82 | if (old_repeat != api->global_settings->repeat_mode && |
98 | (api->audio_status() & AUDIO_STATUS_PLAY)) | 83 | (api->audio_status() & AUDIO_STATUS_PLAY)) |
99 | api->audio_flush_and_reload_tracks(); | 84 | api->audio_flush_and_reload_tracks(); |
100 | 85 | ||
101 | return result; | 86 | return false; |
102 | } | 87 | } |
103 | MENUITEM_FUNCTION(prevtrack_item, 0, "Previous Track", | 88 | MENUITEM_FUNCTION(prevtrack_item, 0, "Previous Track", |
104 | prevtrack, NULL, NULL, Icon_NOICON); | 89 | prevtrack, NULL, NULL, Icon_NOICON); |