summaryrefslogtreecommitdiff
path: root/apps/onplay.c
diff options
context:
space:
mode:
authorHardeep Sidhu <dyp@pobox.com>2003-07-02 15:54:44 +0000
committerHardeep Sidhu <dyp@pobox.com>2003-07-02 15:54:44 +0000
commit11e7ad50a07c0ffcb2005e40c3314bb49a9a1d8b (patch)
tree4ff3c606a0e46d353253c3b1cb44f4170cf31e4f /apps/onplay.c
parent8dd3a822c7cf48ae23440697e8ba76415c441a55 (diff)
downloadrockbox-11e7ad50a07c0ffcb2005e40c3314bb49a9a1d8b.tar.gz
rockbox-11e7ad50a07c0ffcb2005e40c3314bb49a9a1d8b.zip
Added "Ask" option to recursive dir insert which, if enabled, will ask users whether they want to recursively insert selected dir. Also, renamed "Insert first" and "Queue first" to "Insert next" and "Queue next" respectively.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3799 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/onplay.c')
-rw-r--r--apps/onplay.c40
1 files changed, 39 insertions, 1 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index 6c538f8d8a..6c6b2eed0b 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -62,7 +62,45 @@ static bool add_to_playlist(int position, bool queue)
62 if (selected_file_attr & TREE_ATTR_MPA) 62 if (selected_file_attr & TREE_ATTR_MPA)
63 playlist_insert_track(selected_file, position, queue); 63 playlist_insert_track(selected_file, position, queue);
64 else if (selected_file_attr & ATTR_DIRECTORY) 64 else if (selected_file_attr & ATTR_DIRECTORY)
65 playlist_insert_directory(selected_file, position, queue); 65 {
66 bool recurse = false;
67
68 if (global_settings.recursive_dir_insert != RECURSE_ASK)
69 recurse = (bool)global_settings.recursive_dir_insert;
70 else
71 {
72 /* Ask if user wants to recurse directory */
73 bool exit = false;
74
75 lcd_clear_display();
76 lcd_puts_scroll(0,0,str(LANG_RECURSE_DIRECTORY_QUESTION));
77 lcd_puts_scroll(0,1,selected_file);
78
79#ifdef HAVE_LCD_BITMAP
80 lcd_puts(0,3,str(LANG_CONFIRM_WITH_PLAY_RECORDER));
81 lcd_puts(0,4,str(LANG_CANCEL_WITH_ANY_RECORDER));
82#endif
83
84 lcd_update();
85
86 while (!exit) {
87 int btn = button_get(true);
88 switch (btn) {
89 case BUTTON_PLAY:
90 recurse = true;
91 exit = true;
92 break;
93 default:
94 /* ignore button releases */
95 if (!(btn & BUTTON_REL))
96 exit = true;
97 break;
98 }
99 }
100 }
101
102 playlist_insert_directory(selected_file, position, queue, recurse);
103 }
66 else if (selected_file_attr & TREE_ATTR_M3U) 104 else if (selected_file_attr & TREE_ATTR_M3U)
67 playlist_insert_playlist(selected_file, position, queue); 105 playlist_insert_playlist(selected_file, position, queue);
68 106