summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-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);