diff options
| -rw-r--r-- | apps/menu.c | 10 | ||||
| -rw-r--r-- | apps/root_menu.c | 4 |
2 files changed, 13 insertions, 1 deletions
diff --git a/apps/menu.c b/apps/menu.c index 5386353..9a35af8 100644 --- a/apps/menu.c +++ b/apps/menu.c @@ -382,6 +382,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) struct gui_synclist lists; const struct menu_item_ex *temp, *menu; int ret = 0; + bool redraw_lists; #ifdef HAS_BUTTONBAR struct gui_buttonbar buttonbar; #endif @@ -415,6 +416,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) while (!done) { talk_item = false; + redraw_lists = false; gui_syncstatusbar_draw(&statusbars, true); action = get_action(CONTEXT_MAINMENU,HZ); /* HZ so the status bar redraws corectly */ @@ -433,6 +435,11 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) ret = MENU_SELECTED_EXIT; /* will exit after returning from selection */ } + else if (action == ACTION_REDRAW) + { + action = old_action; + redraw_lists = true; + } } if (gui_synclist_do_button(&lists,action,LIST_WRAP_UNLESS_HELD)) @@ -603,6 +610,9 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) } if (talk_item && !done) talk_menu_item(menu, &lists); + + if (redraw_lists) + gui_synclist_draw(&lists); } action_signalscreenchange(); if (start_selected) diff --git a/apps/root_menu.c b/apps/root_menu.c index 1451a60..e99cb4a 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c @@ -342,7 +342,7 @@ MENUITEM_FUNCTION(do_shutdown_item, 0, ID2P(LANG_SHUTDOWN), do_shutdown, NULL, NULL, Icon_NOICON); #endif MAKE_MENU(root_menu_, ID2P(LANG_ROCKBOX_TITLE), - NULL, Icon_Rockbox, + item_callback, Icon_Rockbox, &bookmarks, &file_browser, #ifdef HAVE_TAGCACHE &db_browser, @@ -365,6 +365,8 @@ int item_callback(int action, const struct menu_item_ex *this_item) { switch (action) { + case ACTION_TREE_STOP: + return ACTION_REDRAW; case ACTION_REQUEST_MENUITEM: #if CONFIG_TUNER if (this_item == &fm) |