summaryrefslogtreecommitdiff
path: root/apps/filetree.c
diff options
context:
space:
mode:
authorHardeep Sidhu <dyp@pobox.com>2006-02-05 19:35:03 +0000
committerHardeep Sidhu <dyp@pobox.com>2006-02-05 19:35:03 +0000
commit941de8586c1d64742b5947cb4a49092478755eb5 (patch)
treee296a145fbd5561575d599a6a02bcf34ecbc6460 /apps/filetree.c
parentd350e80b40a655e79a4f073fe35d126fc91e960c (diff)
downloadrockbox-941de8586c1d64742b5947cb4a49092478755eb5.tar.gz
rockbox-941de8586c1d64742b5947cb4a49092478755eb5.zip
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.c25
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
45static int boot_size = 0; 46static 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);