summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-05-16 11:50:46 +0000
committerJens Arnold <amiconn@rockbox.org>2005-05-16 11:50:46 +0000
commit7067f188bf66a4c5edb5c2dbdeff42cbec21e4ba (patch)
tree1e26ad1213e0315b8b6adb1e13a31d2352b3a2f9
parentbadb71de3510afc1547523ef0dc52ac1892c48dd (diff)
downloadrockbox-7067f188bf66a4c5edb5c2dbdeff42cbec21e4ba.tar.gz
rockbox-7067f188bf66a4c5edb5c2dbdeff42cbec21e4ba.zip
Browser enhancements: (all) Only go back to the root dir after USB mode if the current dir no longer exists. (all) Use TREE_MENU as a quick alternative to leave a sub-browser. (recorders) Correct indication of available functions in the buttonbar. Indicate the new 'quick leave' method accordingly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6475 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/tree.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 12acdc8c70..797fbe0862 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -408,11 +408,13 @@ static int showdir(void)
start + tc.firstpos + tree_max_on_screen, VERTICAL);
#if CONFIG_KEYPAD == RECORDER_PAD
- if(global_settings.buttonbar) {
- buttonbar_set(*tc.dirfilter < NUM_FILTER_MODES ?
- str(LANG_DIRBROWSE_F1) : (unsigned char *) "",
- str(LANG_DIRBROWSE_F2),
- str(LANG_DIRBROWSE_F3));
+ if (global_settings.buttonbar) {
+ if (*tc.dirfilter < NUM_FILTER_MODES)
+ buttonbar_set(str(LANG_DIRBROWSE_F1),
+ str(LANG_DIRBROWSE_F2),
+ str(LANG_DIRBROWSE_F3));
+ else
+ buttonbar_set("<<<", "", "");
buttonbar_draw();
}
#endif
@@ -1001,6 +1003,8 @@ static bool dirbrowse(void)
id3db = check_changed_id3mode(id3db);
}
+ else /* use it as a quick exit instead */
+ exit_func = true;
break;
case TREE_WPS:
@@ -1134,7 +1138,7 @@ static bool dirbrowse(void)
might be confusing to the user */
exit_func = true;
else
- reload_root = true;
+ reload_dir = true;
}
break;
}
@@ -1149,7 +1153,7 @@ static bool dirbrowse(void)
{
lcd_stop_scroll();
if (wps_show() == SYS_USB_CONNECTED)
- reload_root = true;
+ reload_dir = true;
#ifdef HAVE_HOTSWAP
else
if (!id3db) /* Try reload to catch 'no longer valid' case. */
@@ -1163,9 +1167,7 @@ static bool dirbrowse(void)
start_wps=false;
}
-#ifdef HAVE_HOTSWAP
check_rescan:
-#endif
/* do we need to rescan dir? */
if (reload_dir || reload_root ||
lastfilter != *tc.dirfilter ||
@@ -1202,7 +1204,7 @@ static bool dirbrowse(void)
#ifdef HAVE_LCD_BITMAP
tree_max_on_screen = recalc_screen_height();
#endif
-
+
/* We need to adjust if the number of lines on screen have
changed because of a status bar change */
if(CURSOR_Y+LINE_Y+tc.dircursor>tree_max_on_screen) {
@@ -1216,14 +1218,12 @@ static bool dirbrowse(void)
lcd_setfont(FONT_UI);
#endif
numentries = showdir();
-#ifdef HAVE_HOTSWAP
- if (currdir[1] && (numentries < 0))
+ if (currdir[1] && (numentries < 0))
{ /* not in root and reload failed */
reload_root = true; /* try root */
reload_dir = false;
goto check_rescan;
}
-#endif
update_all = true;
put_cursorxy(CURSOR_X, CURSOR_Y + tc.dircursor, true);