summaryrefslogtreecommitdiff
path: root/apps/root_menu.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-10-04 10:34:38 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-10-04 10:34:38 +0000
commitefbcece07b3a91f4b475559997f892e24751f0e6 (patch)
treec7ee12626dbd268df4a94bd46b29f6fc7126d2d4 /apps/root_menu.c
parentae75c6eb0ae9c75173ab1b06a26cad30fc5344c9 (diff)
downloadrockbox-efbcece07b3a91f4b475559997f892e24751f0e6.tar.gz
rockbox-efbcece07b3a91f4b475559997f892e24751f0e6.zip
New setting to control the file browser start location.
Set using the menu item in folder context menus, clear in the filebrowser settings. Can be abused to start selecting a *file* (or have a folder selected) instead of a starting inside a folder by removing the trailing / in the .cfg This only affects the file browser when it would open in / before (on boot, or when entereing after backing out of the browser before (*not* when exited with the menu action) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28206 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/root_menu.c')
-rw-r--r--apps/root_menu.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c
index 0f2e38e395..92e0c66ff6 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -115,6 +115,10 @@ static int browser(void* param)
115 { 115 {
116 strcpy(folder, current_track_path); 116 strcpy(folder, current_track_path);
117 } 117 }
118 else if (!strcmp(last_folder, "/"))
119 {
120 strcpy(folder, global_settings.start_directory);
121 }
118 else 122 else
119 { 123 {
120#ifdef HAVE_HOTSWAP 124#ifdef HAVE_HOTSWAP
@@ -142,9 +146,9 @@ static int browser(void* param)
142 break; 146 break;
143 } 147 }
144 } 148 }
145 if (!in_hotswap) 149 if (!in_hotswap)
146#endif 150#endif
147 strcpy(folder, last_folder); 151 strcpy(folder, last_folder);
148 } 152 }
149 break; 153 break;
150#ifdef HAVE_TAGCACHE 154#ifdef HAVE_TAGCACHE
@@ -252,7 +256,8 @@ static int browser(void* param)
252 switch ((intptr_t)param) 256 switch ((intptr_t)param)
253 { 257 {
254 case GO_TO_FILEBROWSER: 258 case GO_TO_FILEBROWSER:
255 if (!get_current_file(last_folder, MAX_PATH)) 259 if (!get_current_file(last_folder, MAX_PATH) ||
260 !strchr(&last_folder[1], '/'))
256 { 261 {
257 last_folder[0] = '/'; 262 last_folder[0] = '/';
258 last_folder[1] = '\0'; 263 last_folder[1] = '\0';