Clear file view title if the user turns it off.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10596 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1526fd7ecb
commit
98c9f959e5
2 changed files with 9 additions and 2 deletions
|
@ -525,11 +525,15 @@ void gui_list_screen_scroll_out_of_view(bool enable)
|
|||
void gui_list_set_title(struct gui_list * gui_list, char * title)
|
||||
{
|
||||
gui_list->title = title;
|
||||
if (title) {
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
gui_list->display->getstringsize(title, &gui_list->title_width, NULL);
|
||||
gui_list->display->getstringsize(title, &gui_list->title_width, NULL);
|
||||
#else
|
||||
gui_list->title_width = strlen(title);
|
||||
gui_list->title_width = strlen(title);
|
||||
#endif
|
||||
} else {
|
||||
gui_list->title_width = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -354,6 +354,9 @@ static int update_dir(void)
|
|||
} else if (global_settings.show_path_in_browser == SHOW_PATH_CURRENT) {
|
||||
gui_synclist_set_title(&tree_lists,
|
||||
tc.dirlevel > 0 ? strrchr(tc.currdir, '/') + 1 : "/");
|
||||
} else {
|
||||
/* Must clear the title as the list is reused */
|
||||
gui_synclist_set_title(&tree_lists, NULL);
|
||||
}
|
||||
}
|
||||
gui_synclist_set_nb_items(&tree_lists, tc.filesindir);
|
||||
|
|
Loading…
Reference in a new issue