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/filetree.c | |
parent | 2cc6b5a79db0d96718d2f1b14eddeda4a5237198 (diff) | |
download | rockbox-43c85a4424d415e8b3f200e5e6d691eb294dfaab.tar.gz rockbox-43c85a4424d415e8b3f200e5e6d691eb294dfaab.zip |
"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/filetree.c')
-rw-r--r-- | apps/filetree.c | 32 |
1 files changed, 9 insertions, 23 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) | |||
413 | 413 | ||
414 | int ft_enter(struct tree_context* c) | 414 | int ft_enter(struct tree_context* c) |
415 | { | 415 | { |
416 | int rc = 0; | 416 | int rc = GO_TO_PREVIOUS; |
417 | char buf[MAX_PATH]; | 417 | char buf[MAX_PATH]; |
418 | struct entry *dircache = c->dircache; | 418 | struct entry *dircache = c->dircache; |
419 | struct entry* file = &dircache[c->selected_item]; | 419 | struct entry* file = &dircache[c->selected_item]; |
420 | bool reload_dir = false; | ||
421 | bool start_wps = false; | ||
422 | bool exit_func = false; | ||
423 | 420 | ||
424 | if (c->currdir[1]) | 421 | if (c->currdir[1]) |
425 | snprintf(buf,sizeof(buf),"%s/%s",c->currdir, file->name); | 422 | snprintf(buf,sizeof(buf),"%s/%s",c->currdir, file->name); |
@@ -495,8 +492,6 @@ int ft_enter(struct tree_context* c) | |||
495 | { | 492 | { |
496 | set_file(buf, global_settings.fmr_file, MAX_FILENAME); | 493 | set_file(buf, global_settings.fmr_file, MAX_FILENAME); |
497 | radio_load_presets(global_settings.fmr_file); | 494 | radio_load_presets(global_settings.fmr_file); |
498 | if(!in_radio_screen()) | ||
499 | radio_screen(); | ||
500 | } | 495 | } |
501 | /* | 496 | /* |
502 | * Preset outside default folder, we can choose such only | 497 | * Preset outside default folder, we can choose such only |
@@ -506,8 +501,8 @@ int ft_enter(struct tree_context* c) | |||
506 | else | 501 | else |
507 | { | 502 | { |
508 | radio_load_presets(buf); | 503 | radio_load_presets(buf); |
509 | radio_screen(); | ||
510 | } | 504 | } |
505 | rc = GO_TO_FM; | ||
511 | 506 | ||
512 | break; | 507 | break; |
513 | case FILE_ATTR_FMS: | 508 | case FILE_ATTR_FMS: |
@@ -566,7 +561,7 @@ int ft_enter(struct tree_context* c) | |||
566 | case FILE_ATTR_BMARK: | 561 | case FILE_ATTR_BMARK: |
567 | splash(0, ID2P(LANG_WAIT)); | 562 | splash(0, ID2P(LANG_WAIT)); |
568 | bookmark_load(buf, false); | 563 | bookmark_load(buf, false); |
569 | reload_dir = true; | 564 | rc = GO_TO_FILEBROWSER; |
570 | break; | 565 | break; |
571 | 566 | ||
572 | case FILE_ATTR_LNG: | 567 | case FILE_ATTR_LNG: |
@@ -632,9 +627,9 @@ int ft_enter(struct tree_context* c) | |||
632 | if(*c->dirfilter > NUM_FILTER_MODES) | 627 | if(*c->dirfilter > NUM_FILTER_MODES) |
633 | /* leave sub-browsers after usb, doing | 628 | /* leave sub-browsers after usb, doing |
634 | otherwise might be confusing to the user */ | 629 | otherwise might be confusing to the user */ |
635 | exit_func = true; | 630 | rc = GO_TO_ROOT; |
636 | else | 631 | else |
637 | reload_dir = true; | 632 | rc = GO_TO_FILEBROWSER; |
638 | break; | 633 | break; |
639 | /* | 634 | /* |
640 | case PLUGIN_ERROR: | 635 | case PLUGIN_ERROR: |
@@ -664,10 +659,10 @@ int ft_enter(struct tree_context* c) | |||
664 | switch (plugin_load(plugin,buf)) | 659 | switch (plugin_load(plugin,buf)) |
665 | { | 660 | { |
666 | case PLUGIN_USB_CONNECTED: | 661 | case PLUGIN_USB_CONNECTED: |
667 | reload_dir = true; | 662 | rc = GO_TO_FILEBROWSER; |
668 | break; | 663 | break; |
669 | case PLUGIN_GOTO_WPS: | 664 | case PLUGIN_GOTO_WPS: |
670 | play = true; | 665 | rc = GO_TO_WPS; |
671 | break; | 666 | break; |
672 | /* | 667 | /* |
673 | case PLUGIN_OK: | 668 | case PLUGIN_OK: |
@@ -687,8 +682,7 @@ int ft_enter(struct tree_context* c) | |||
687 | global_status.resume_index = start_index; | 682 | global_status.resume_index = start_index; |
688 | global_status.resume_offset = 0; | 683 | global_status.resume_offset = 0; |
689 | status_save(); | 684 | status_save(); |
690 | 685 | rc = GO_TO_WPS; | |
691 | start_wps = true; | ||
692 | } | 686 | } |
693 | else { | 687 | else { |
694 | if (*c->dirfilter > NUM_FILTER_MODES && | 688 | if (*c->dirfilter > NUM_FILTER_MODES && |
@@ -696,18 +690,10 @@ int ft_enter(struct tree_context* c) | |||
696 | *c->dirfilter != SHOW_FONT && | 690 | *c->dirfilter != SHOW_FONT && |
697 | *c->dirfilter != SHOW_PLUGINS) | 691 | *c->dirfilter != SHOW_PLUGINS) |
698 | { | 692 | { |
699 | exit_func = true; | 693 | rc = GO_TO_ROOT; |
700 | } | 694 | } |
701 | } | 695 | } |
702 | } | 696 | } |
703 | |||
704 | if (reload_dir) | ||
705 | rc = 1; | ||
706 | if (start_wps) | ||
707 | rc = 2; | ||
708 | if (exit_func) | ||
709 | rc = 3; | ||
710 | |||
711 | return rc; | 697 | return rc; |
712 | } | 698 | } |
713 | 699 | ||