From 08e1473208419de04199f7ea4177a11c18643825 Mon Sep 17 00:00:00 2001 From: kugel Date: Sun, 20 Sep 2009 00:04:39 +0000 Subject: [PATCH] Redraw the list after exiting the context menu to get rid of various non-blocking splashes in it if custom ui vp is used. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22744 a1c6a512-1295-4272-9138-f99709370657 --- apps/filetree.c | 9 ++------- apps/tree.c | 8 ++++++++ apps/tree.h | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/filetree.c b/apps/filetree.c index ec7932435..d7e77226e 100644 --- a/apps/filetree.c +++ b/apps/filetree.c @@ -181,11 +181,6 @@ static void check_file_thumbnails(struct tree_context* c) closedir(dir); } -static void filetree_drawlists(void) -{ - gui_synclist_draw(&tree_lists); -} - /* support function for qsort() */ static int compare(const void* p1, const void* p2) { @@ -519,7 +514,7 @@ int ft_enter(struct tree_context* c) send_event(GUI_EVENT_REFRESH, NULL); /* for the statusbar */ send_event(GUI_EVENT_ACTIONUPDATE, (void*)true); - filetree_drawlists(); + tree_drawlists(); splash(HZ, ID2P(LANG_SETTINGS_LOADED)); break; @@ -629,7 +624,7 @@ int ft_enter(struct tree_context* c) } } - send_event(GUI_EVENT_REFRESH, filetree_drawlists); + send_event(GUI_EVENT_REFRESH, tree_drawlists); if ( play ) { /* the resume_index must always be the index in the diff --git a/apps/tree.c b/apps/tree.c index 228f491c1..357079870 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -72,6 +72,7 @@ #include "splash.h" #include "buttonbar.h" #include "quickscreen.h" +#include "appevents.h" #include "root_menu.h" @@ -301,6 +302,12 @@ void tree_gui_init(void) } +/* drawer function for the GUI_EVENT_REDRAW callback */ +void tree_drawlists(void) +{ + gui_synclist_draw(&tree_lists); +} + struct tree_context* tree_get_context(void) { @@ -778,6 +785,7 @@ static int dirbrowse() } onplay_result = onplay(buf, attr, curr_context); } + send_event(GUI_EVENT_REFRESH, tree_drawlists); switch (onplay_result) { case ONPLAY_MAINMENU: diff --git a/apps/tree.h b/apps/tree.h index 2d5038703..3b31d0245 100644 --- a/apps/tree.h +++ b/apps/tree.h @@ -70,6 +70,7 @@ struct tree_context { int sort_dir; /* directory sort order */ }; +void tree_drawlists(void); void tree_mem_init(void); void tree_gui_init(void); void get_current_file(char* buffer, int buffer_len); -- 2.11.4.GIT