diff options
| author | Dan Everton <dan@iocaine.org> | 2006-08-15 22:14:35 +0000 |
|---|---|---|
| committer | Dan Everton <dan@iocaine.org> | 2006-08-15 22:14:35 +0000 |
| commit | 98c9f959e53536a0b63d0376fad198ef883c5c03 (patch) | |
| tree | 85ea5698f63739690ffc02614c52d73b31b14468 | |
| parent | 1526fd7ecb7b3f58c22e4e51bef848f503d8be60 (diff) | |
| download | rockbox-98c9f959e53536a0b63d0376fad198ef883c5c03.zip rockbox-98c9f959e53536a0b63d0376fad198ef883c5c03.tar.gz rockbox-98c9f959e53536a0b63d0376fad198ef883c5c03.tar.bz2 rockbox-98c9f959e53536a0b63d0376fad198ef883c5c03.tar.xz | |
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
| -rw-r--r-- | apps/gui/list.c | 8 | ||||
| -rw-r--r-- | apps/tree.c | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c index 0d8b4d1..c952f96 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c @@ -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; + } } /* diff --git a/apps/tree.c b/apps/tree.c index 8de23bd..1bbb5f8 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -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); |