forked from len0rd/rockbox
.rockbox browse fixes, based on patch #861278 by Brian King: (1) Leaving the sub-browser with ON is disabled to prevent possibly endless recursion, (2) For browsing plugins and fonts, the browser doesn't quit automatically after selecting a file, for more convenient use of plugins and trying out different fonts. Additionally, the button bar display is fixed to properly reflect the unavailability of F1 in a sub-browser
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5023 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0df29b2157
commit
9d5de4ac71
2 changed files with 21 additions and 13 deletions
33
apps/tree.c
33
apps/tree.c
|
|
@ -227,15 +227,15 @@ static int play_dirname(int start_index)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
snprintf(dirname_mp3_filename, sizeof(dirname_mp3_filename), "%s/%s/%s",
|
snprintf(dirname_mp3_filename, sizeof(dirname_mp3_filename), "%s/%s/%s",
|
||||||
currdir, dircache[start_index].name, dir_thumbnail_name);
|
currdir, dircache[start_index].name, dir_thumbnail_name);
|
||||||
|
|
||||||
DEBUGF("Checking for %s\n", dirname_mp3_filename);
|
DEBUGF("Checking for %s\n", dirname_mp3_filename);
|
||||||
|
|
||||||
fd = open(dirname_mp3_filename, O_RDONLY);
|
fd = open(dirname_mp3_filename, O_RDONLY);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
DEBUGF("Failed to find: %s\n", dirname_mp3_filename);
|
DEBUGF("Failed to find: %s\n", dirname_mp3_filename);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
@ -579,7 +579,8 @@ static int showdir(const char *path, int start, const int *dirfilter)
|
||||||
start + tree_max_on_screen, VERTICAL);
|
start + tree_max_on_screen, VERTICAL);
|
||||||
|
|
||||||
if(global_settings.buttonbar) {
|
if(global_settings.buttonbar) {
|
||||||
buttonbar_set(str(LANG_DIRBROWSE_F1),
|
buttonbar_set(*dirfilter < NUM_FILTER_MODES ?
|
||||||
|
str(LANG_DIRBROWSE_F1) : (unsigned char *) "",
|
||||||
str(LANG_DIRBROWSE_F2),
|
str(LANG_DIRBROWSE_F2),
|
||||||
str(LANG_DIRBROWSE_F3));
|
str(LANG_DIRBROWSE_F3));
|
||||||
buttonbar_draw();
|
buttonbar_draw();
|
||||||
|
|
@ -1226,7 +1227,9 @@ static bool dirbrowse(const char *root, const int *dirfilter)
|
||||||
|
|
||||||
start_wps = true;
|
start_wps = true;
|
||||||
}
|
}
|
||||||
else if (*dirfilter > NUM_FILTER_MODES)
|
else if (*dirfilter > NUM_FILTER_MODES &&
|
||||||
|
*dirfilter != SHOW_FONT &&
|
||||||
|
*dirfilter != SHOW_PLUGINS)
|
||||||
exit_func = true;
|
exit_func = true;
|
||||||
}
|
}
|
||||||
restore = true;
|
restore = true;
|
||||||
|
|
@ -1330,14 +1333,18 @@ static bool dirbrowse(const char *root, const int *dirfilter)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (mpeg_status() & MPEG_STATUS_PLAY)
|
if (*dirfilter < NUM_FILTER_MODES)
|
||||||
|
/* don't catch single ON from .rockbox browsing */
|
||||||
{
|
{
|
||||||
start_wps=true;
|
if (mpeg_status() & MPEG_STATUS_PLAY)
|
||||||
}
|
{
|
||||||
else
|
start_wps=true;
|
||||||
{
|
}
|
||||||
start_resume(false);
|
else
|
||||||
restore = true;
|
{
|
||||||
|
start_resume(false);
|
||||||
|
restore = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -1394,7 +1401,7 @@ static bool dirbrowse(const char *root, const int *dirfilter)
|
||||||
ata_spin();
|
ata_spin();
|
||||||
|
|
||||||
if (start_wps)
|
if (start_wps)
|
||||||
{
|
{
|
||||||
lcd_stop_scroll();
|
lcd_stop_scroll();
|
||||||
if (wps_show() == SYS_USB_CONNECTED)
|
if (wps_show() == SYS_USB_CONNECTED)
|
||||||
reload_root = true;
|
reload_root = true;
|
||||||
|
|
|
||||||
|
|
@ -91,3 +91,4 @@ Steve Cundari
|
||||||
Mat Holton
|
Mat Holton
|
||||||
Jan Gajdos
|
Jan Gajdos
|
||||||
Antoine Cellerier
|
Antoine Cellerier
|
||||||
|
Brian King
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue