diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/onplay.c | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/apps/onplay.c b/apps/onplay.c index 62ba0a1005..42e43379a5 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -164,6 +164,11 @@ static bool save_playlist(void) | |||
164 | static bool add_to_playlist(int position, bool queue) | 164 | static bool add_to_playlist(int position, bool queue) |
165 | { | 165 | { |
166 | bool new_playlist = !(audio_status() & AUDIO_STATUS_PLAY); | 166 | bool new_playlist = !(audio_status() & AUDIO_STATUS_PLAY); |
167 | char *lines[] = { | ||
168 | (char *)str(LANG_RECURSE_DIRECTORY_QUESTION), | ||
169 | selected_file | ||
170 | }; | ||
171 | struct text_message message={lines, 2}; | ||
167 | 172 | ||
168 | if (new_playlist) | 173 | if (new_playlist) |
169 | playlist_create(NULL, NULL); | 174 | playlist_create(NULL, NULL); |
@@ -179,34 +184,7 @@ static bool add_to_playlist(int position, bool queue) | |||
179 | else | 184 | else |
180 | { | 185 | { |
181 | /* Ask if user wants to recurse directory */ | 186 | /* Ask if user wants to recurse directory */ |
182 | bool exit = false; | 187 | recurse = (gui_syncyesno_run(&message, NULL, NULL)==YESNO_YES); |
183 | |||
184 | lcd_clear_display(); | ||
185 | lcd_puts_scroll(0, 0, str(LANG_RECURSE_DIRECTORY_QUESTION)); | ||
186 | lcd_puts_scroll(0, 1, (unsigned char *)selected_file); | ||
187 | |||
188 | #ifdef HAVE_LCD_BITMAP | ||
189 | lcd_puts(0, 3, str(LANG_CONFIRM_WITH_PLAY_RECORDER)); | ||
190 | lcd_puts(0, 4, str(LANG_CANCEL_WITH_ANY_RECORDER)); | ||
191 | #endif | ||
192 | |||
193 | lcd_update(); | ||
194 | |||
195 | while (!exit) { | ||
196 | int btn = button_get(true); | ||
197 | switch (btn) { | ||
198 | case SETTINGS_OK: | ||
199 | recurse = true; | ||
200 | exit = true; | ||
201 | break; | ||
202 | |||
203 | default: | ||
204 | /* ignore button releases */ | ||
205 | if (!(btn & BUTTON_REL)) | ||
206 | exit = true; | ||
207 | break; | ||
208 | } | ||
209 | } | ||
210 | } | 188 | } |
211 | 189 | ||
212 | playlist_insert_directory(NULL, selected_file, position, queue, | 190 | playlist_insert_directory(NULL, selected_file, position, queue, |