diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-08-23 12:32:52 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-08-23 12:32:52 +0000 |
commit | b285076925fed906d95573b64115cb3f6bdafe65 (patch) | |
tree | 6d959f585fc210acf39e667991038d21aef48d13 /apps/tree.c | |
parent | ad4a92eb87eb98ff316f54f06650f1c5e1dcd7ca (diff) | |
download | rockbox-b285076925fed906d95573b64115cb3f6bdafe65.tar.gz rockbox-b285076925fed906d95573b64115cb3f6bdafe65.zip |
Remade the menu system slightly. All functions invoked from menus now use
the Menu typedef as return type, and *ALL* menus that intercept USB connect
can then return MENU_REFRESH_DIR so that the parent (any parent really) that
do file or dir-accesses knows that and can do the refresh. If no refresh
is needed by the parent, MENU_OK is returned.
Somewhat biggish commit this close to 1.3, but we need to sort out this
refresh-after-usb-connected business.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1948 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r-- | apps/tree.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/tree.c b/apps/tree.c index 8718252ac5..0c4e26ab8e 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -640,13 +640,15 @@ bool dirbrowse(char *root) | |||
640 | bool lastfilter = global_settings.mp3filter; | 640 | bool lastfilter = global_settings.mp3filter; |
641 | bool lastsortcase = global_settings.sort_case; | 641 | bool lastsortcase = global_settings.sort_case; |
642 | bool show_hidden_files = global_settings.show_hidden_files; | 642 | bool show_hidden_files = global_settings.show_hidden_files; |
643 | Menu result; | ||
643 | 644 | ||
644 | lcd_stop_scroll(); | 645 | lcd_stop_scroll(); |
645 | main_menu(); | 646 | result = main_menu(); |
646 | /* do we need to rescan dir? */ | 647 | /* do we need to rescan dir? */ |
647 | if ( lastfilter != global_settings.mp3filter || | 648 | if (result == MENU_REFRESH_DIR || |
648 | lastsortcase != global_settings.sort_case || | 649 | lastfilter != global_settings.mp3filter || |
649 | show_hidden_files != global_settings.show_hidden_files) | 650 | lastsortcase != global_settings.sort_case || |
651 | show_hidden_files != global_settings.show_hidden_files) | ||
650 | lastdir[0] = 0; | 652 | lastdir[0] = 0; |
651 | restore = true; | 653 | restore = true; |
652 | break; | 654 | break; |