diff options
Diffstat (limited to 'apps/filetree.c')
-rw-r--r-- | apps/filetree.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/apps/filetree.c b/apps/filetree.c index cb21b71eec..b8f066745f 100644 --- a/apps/filetree.c +++ b/apps/filetree.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include "sprintf.h" | 40 | #include "sprintf.h" |
41 | #include "dircache.h" | 41 | #include "dircache.h" |
42 | #include "splash.h" | 42 | #include "splash.h" |
43 | #include "yesno.h" | ||
43 | 44 | ||
44 | #ifndef SIMULATOR | 45 | #ifndef SIMULATOR |
45 | static int boot_size = 0; | 46 | static int boot_size = 0; |
@@ -346,6 +347,18 @@ int ft_enter(struct tree_context* c) | |||
346 | if (bookmark_autoload(buf)) | 347 | if (bookmark_autoload(buf)) |
347 | break; | 348 | break; |
348 | 349 | ||
350 | /* about to create a new current playlist... | ||
351 | allow user to cancel the operation */ | ||
352 | if (global_settings.warnon_erase_dynplaylist && | ||
353 | playlist_modified(NULL)) | ||
354 | { | ||
355 | char *lines[]={str(LANG_WARN_ERASEDYNPLAYLIST_PROMPT)}; | ||
356 | struct text_message message={lines, 1}; | ||
357 | |||
358 | if(gui_syncyesno_run(&message, NULL, NULL) != YESNO_YES) | ||
359 | break; | ||
360 | } | ||
361 | |||
349 | if (playlist_create(c->currdir, file->name) != -1) | 362 | if (playlist_create(c->currdir, file->name) != -1) |
350 | { | 363 | { |
351 | if (global_settings.playlist_shuffle) | 364 | if (global_settings.playlist_shuffle) |
@@ -360,6 +373,18 @@ int ft_enter(struct tree_context* c) | |||
360 | if (bookmark_autoload(c->currdir)) | 373 | if (bookmark_autoload(c->currdir)) |
361 | break; | 374 | break; |
362 | 375 | ||
376 | /* about to create a new current playlist... | ||
377 | allow user to cancel the operation */ | ||
378 | if (global_settings.warnon_erase_dynplaylist && | ||
379 | playlist_modified(NULL)) | ||
380 | { | ||
381 | char *lines[]={str(LANG_WARN_ERASEDYNPLAYLIST_PROMPT)}; | ||
382 | struct text_message message={lines, 1}; | ||
383 | |||
384 | if(gui_syncyesno_run(&message, NULL, NULL) != YESNO_YES) | ||
385 | break; | ||
386 | } | ||
387 | |||
363 | if (playlist_create(c->currdir, NULL) != -1) | 388 | if (playlist_create(c->currdir, NULL) != -1) |
364 | { | 389 | { |
365 | start_index = ft_build_playlist(c, c->selected_item); | 390 | start_index = ft_build_playlist(c, c->selected_item); |