diff options
| author | Hardeep Sidhu <dyp@pobox.com> | 2006-02-05 19:35:03 +0000 |
|---|---|---|
| committer | Hardeep Sidhu <dyp@pobox.com> | 2006-02-05 19:35:03 +0000 |
| commit | 941de8586c1d64742b5947cb4a49092478755eb5 (patch) | |
| tree | e296a145fbd5561575d599a6a02bcf34ecbc6460 /apps/filetree.c | |
| parent | d350e80b40a655e79a4f073fe35d126fc91e960c (diff) | |
| download | rockbox-941de8586c1d64742b5947cb4a49092478755eb5.zip rockbox-941de8586c1d64742b5947cb4a49092478755eb5.tar.gz rockbox-941de8586c1d64742b5947cb4a49092478755eb5.tar.bz2 rockbox-941de8586c1d64742b5947cb4a49092478755eb5.tar.xz | |
Patch #1260463 - Warn on erasing modified dynamic playlist by Craig (ctb311276)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8589 a1c6a512-1295-4272-9138-f99709370657
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 cb21b71..b8f0667 100644 --- a/apps/filetree.c +++ b/apps/filetree.c @@ -40,6 +40,7 @@ #include "sprintf.h" #include "dircache.h" #include "splash.h" +#include "yesno.h" #ifndef SIMULATOR static int boot_size = 0; @@ -346,6 +347,18 @@ int ft_enter(struct tree_context* c) if (bookmark_autoload(buf)) break; + /* about to create a new current playlist... + allow user to cancel the operation */ + if (global_settings.warnon_erase_dynplaylist && + playlist_modified(NULL)) + { + char *lines[]={str(LANG_WARN_ERASEDYNPLAYLIST_PROMPT)}; + struct text_message message={lines, 1}; + + if(gui_syncyesno_run(&message, NULL, NULL) != YESNO_YES) + break; + } + if (playlist_create(c->currdir, file->name) != -1) { if (global_settings.playlist_shuffle) @@ -360,6 +373,18 @@ int ft_enter(struct tree_context* c) if (bookmark_autoload(c->currdir)) break; + /* about to create a new current playlist... + allow user to cancel the operation */ + if (global_settings.warnon_erase_dynplaylist && + playlist_modified(NULL)) + { + char *lines[]={str(LANG_WARN_ERASEDYNPLAYLIST_PROMPT)}; + struct text_message message={lines, 1}; + + if(gui_syncyesno_run(&message, NULL, NULL) != YESNO_YES) + break; + } + if (playlist_create(c->currdir, NULL) != -1) { start_index = ft_build_playlist(c, c->selected_item); |