From 29b9146aa78568a3e8a4969708856c82b695004a Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Wed, 9 Aug 2006 07:28:48 +0000 Subject: Warn before erasing dynamic playlist from tagcache. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10495 a1c6a512-1295-4272-9138-f99709370657 --- apps/tagtree.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'apps/tagtree.c') diff --git a/apps/tagtree.c b/apps/tagtree.c index 4061e9d8d7..bf1b6a1f0b 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c @@ -40,6 +40,7 @@ #include "buffer.h" #include "atoi.h" #include "playback.h" +#include "yesno.h" #define FILE_SEARCH_INSTRUCTIONS ROCKBOX_DIR "/tagnavi.config" @@ -883,6 +884,19 @@ int tagtree_enter(struct tree_context* c) if (newextra == playtrack) { c->dirlevel--; + /* about to create a new current playlist... + allow user to cancel the operation */ + if (global_settings.warnon_erase_dynplaylist && + !global_settings.party_mode && + 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 (tagtree_play_folder(c) >= 0) rc = 2; break; -- cgit v1.2.3