diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2010-08-16 13:16:29 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2010-08-16 13:16:29 +0000 |
commit | 43c85a4424d415e8b3f200e5e6d691eb294dfaab (patch) | |
tree | 46267949c61eb0c8f2e9013007fad10211bada14 /apps | |
parent | 2cc6b5a79db0d96718d2f1b14eddeda4a5237198 (diff) |
"Fix" FS#11349... %cs got confused because for some reason when the root menu was introduced the fm preset loading was never fixed to go back through that menu... problem is do_menu() is getting in the way now, so be like other files and dont try to reload the screen after loading... i.e go into the fms manually
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27830 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/filetree.c | 32 | ||||
-rw-r--r-- | apps/tree.c | 11 |
2 files changed, 17 insertions, 26 deletions
diff --git a/apps/filetree.c b/apps/filetree.c index fa942b263d..0a1b49d1fe 100644 --- a/apps/filetree.c +++ b/apps/filetree.c @@ -413,13 +413,10 @@ static void ft_load_font(char *file) int ft_enter(struct tree_context* c) { - int rc = 0; + int rc = GO_TO_PREVIOUS; char buf[MAX_PATH]; struct entry *dircache = c->dircache; struct entry* file = &dircache[c->selected_item]; - bool reload_dir = false; - bool start_wps = false; - bool exit_func = false; if (c->currdir[1]) snprintf(buf,sizeof(buf),"%s/%s",c->currdir, file->name); @@ -495,8 +492,6 @@ int ft_enter(struct tree_context* c) { set_file(buf, global_settings.fmr_file, MAX_FILENAME); radio_load_presets(global_settings.fmr_file); - if(!in_radio_screen()) - radio_screen(); } /* * Preset outside default folder, we can choose such only @@ -506,8 +501,8 @@ int ft_enter(struct tree_context* c) else { radio_load_presets(buf); - radio_screen(); } + rc = GO_TO_FM; break; case FILE_ATTR_FMS: @@ -566,7 +561,7 @@ int ft_enter(struct tree_context* c) case FILE_ATTR_BMARK: splash(0, ID2P(LANG_WAIT)); bookmark_load(buf, false); - reload_dir = true; + rc = GO_TO_FILEBROWSER; break; case FILE_ATTR_LNG: @@ -632,9 +627,9 @@ int ft_enter(struct tree_context* c) if(*c->dirfilter > NUM_FILTER_MODES) /* leave sub-browsers after usb, doing otherwise might be confusing to the user */ - exit_func = true; + rc = GO_TO_ROOT; else - reload_dir = true; + rc = GO_TO_FILEBROWSER; break; /* case PLUGIN_ERROR: @@ -664,10 +659,10 @@ int ft_enter(struct tree_context* c) switch (plugin_load(plugin,buf)) { case PLUGIN_USB_CONNECTED: - reload_dir = true; + rc = GO_TO_FILEBROWSER; break; case PLUGIN_GOTO_WPS: - play = true; + rc = GO_TO_WPS; break; /* case PLUGIN_OK: @@ -687,8 +682,7 @@ int ft_enter(struct tree_context* c) global_status.resume_index = start_index; global_status.resume_offset = 0; status_save(); - - start_wps = true; + rc = GO_TO_WPS; } else { if (*c->dirfilter > NUM_FILTER_MODES && @@ -696,18 +690,10 @@ int ft_enter(struct tree_context* c) *c->dirfilter != SHOW_FONT && *c->dirfilter != SHOW_PLUGINS) { - exit_func = true; + rc = GO_TO_ROOT; } } } - - if (reload_dir) - rc = 1; - if (start_wps) - rc = 2; - if (exit_func) - rc = 3; - return rc; } diff --git a/apps/tree.c b/apps/tree.c index f8874f684e..c4bfaf130e 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -682,9 +682,14 @@ static int dirbrowse() switch (ft_enter(&tc)) #endif { - case 1: reload_dir = true; break; - case 2: start_wps = true; break; - case 3: exit_func = true; break; + case GO_TO_FILEBROWSER: reload_dir = true; break; + case GO_TO_WPS: + return GO_TO_WPS; +#if CONFIG_TUNER + case GO_TO_FM: + return GO_TO_FM; +#endif + case GO_TO_ROOT: exit_func = true; break; default: break; } restore = true; |