summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Everton <dan@iocaine.org>2006-08-15 22:14:35 +0000
committerDan Everton <dan@iocaine.org>2006-08-15 22:14:35 +0000
commit98c9f959e53536a0b63d0376fad198ef883c5c03 (patch)
tree85ea5698f63739690ffc02614c52d73b31b14468
parent1526fd7ecb7b3f58c22e4e51bef848f503d8be60 (diff)
downloadrockbox-98c9f959e53536a0b63d0376fad198ef883c5c03.tar.gz
rockbox-98c9f959e53536a0b63d0376fad198ef883c5c03.zip
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.c8
-rw-r--r--apps/tree.c3
2 files changed, 9 insertions, 2 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 0d8b4d1879..c952f96d70 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)
525void gui_list_set_title(struct gui_list * gui_list, char * title) 525void gui_list_set_title(struct gui_list * gui_list, char * title)
526{ 526{
527 gui_list->title = title; 527 gui_list->title = title;
528 if (title) {
528#ifdef HAVE_LCD_BITMAP 529#ifdef HAVE_LCD_BITMAP
529 gui_list->display->getstringsize(title, &gui_list->title_width, NULL); 530 gui_list->display->getstringsize(title, &gui_list->title_width, NULL);
530#else 531#else
531 gui_list->title_width = strlen(title); 532 gui_list->title_width = strlen(title);
532#endif 533#endif
534 } else {
535 gui_list->title_width = 0;
536 }
533} 537}
534 538
535/* 539/*
diff --git a/apps/tree.c b/apps/tree.c
index 8de23bd1f5..1bbb5f8ca3 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -354,6 +354,9 @@ static int update_dir(void)
354 } else if (global_settings.show_path_in_browser == SHOW_PATH_CURRENT) { 354 } else if (global_settings.show_path_in_browser == SHOW_PATH_CURRENT) {
355 gui_synclist_set_title(&tree_lists, 355 gui_synclist_set_title(&tree_lists,
356 tc.dirlevel > 0 ? strrchr(tc.currdir, '/') + 1 : "/"); 356 tc.dirlevel > 0 ? strrchr(tc.currdir, '/') + 1 : "/");
357 } else {
358 /* Must clear the title as the list is reused */
359 gui_synclist_set_title(&tree_lists, NULL);
357 } 360 }
358 } 361 }
359 gui_synclist_set_nb_items(&tree_lists, tc.filesindir); 362 gui_synclist_set_nb_items(&tree_lists, tc.filesindir);