diff options
Diffstat (limited to 'apps')
-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 5386353e12..9a35af8e34 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) | |||
382 | struct gui_synclist lists; | 382 | struct gui_synclist lists; |
383 | const struct menu_item_ex *temp, *menu; | 383 | const struct menu_item_ex *temp, *menu; |
384 | int ret = 0; | 384 | int ret = 0; |
385 | bool redraw_lists; | ||
385 | #ifdef HAS_BUTTONBAR | 386 | #ifdef HAS_BUTTONBAR |
386 | struct gui_buttonbar buttonbar; | 387 | struct gui_buttonbar buttonbar; |
387 | #endif | 388 | #endif |
@@ -415,6 +416,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) | |||
415 | while (!done) | 416 | while (!done) |
416 | { | 417 | { |
417 | talk_item = false; | 418 | talk_item = false; |
419 | redraw_lists = false; | ||
418 | gui_syncstatusbar_draw(&statusbars, true); | 420 | gui_syncstatusbar_draw(&statusbars, true); |
419 | action = get_action(CONTEXT_MAINMENU,HZ); | 421 | action = get_action(CONTEXT_MAINMENU,HZ); |
420 | /* HZ so the status bar redraws corectly */ | 422 | /* HZ so the status bar redraws corectly */ |
@@ -433,6 +435,11 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) | |||
433 | ret = MENU_SELECTED_EXIT; /* will exit after returning | 435 | ret = MENU_SELECTED_EXIT; /* will exit after returning |
434 | from selection */ | 436 | from selection */ |
435 | } | 437 | } |
438 | else if (action == ACTION_REDRAW) | ||
439 | { | ||
440 | action = old_action; | ||
441 | redraw_lists = true; | ||
442 | } | ||
436 | } | 443 | } |
437 | 444 | ||
438 | if (gui_synclist_do_button(&lists,action,LIST_WRAP_UNLESS_HELD)) | 445 | 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) | |||
603 | } | 610 | } |
604 | if (talk_item && !done) | 611 | if (talk_item && !done) |
605 | talk_menu_item(menu, &lists); | 612 | talk_menu_item(menu, &lists); |
613 | |||
614 | if (redraw_lists) | ||
615 | gui_synclist_draw(&lists); | ||
606 | } | 616 | } |
607 | action_signalscreenchange(); | 617 | action_signalscreenchange(); |
608 | if (start_selected) | 618 | if (start_selected) |
diff --git a/apps/root_menu.c b/apps/root_menu.c index 1451a60a16..e99cb4aa88 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c | |||
@@ -342,7 +342,7 @@ MENUITEM_FUNCTION(do_shutdown_item, 0, ID2P(LANG_SHUTDOWN), | |||
342 | do_shutdown, NULL, NULL, Icon_NOICON); | 342 | do_shutdown, NULL, NULL, Icon_NOICON); |
343 | #endif | 343 | #endif |
344 | MAKE_MENU(root_menu_, ID2P(LANG_ROCKBOX_TITLE), | 344 | MAKE_MENU(root_menu_, ID2P(LANG_ROCKBOX_TITLE), |
345 | NULL, Icon_Rockbox, | 345 | item_callback, Icon_Rockbox, |
346 | &bookmarks, &file_browser, | 346 | &bookmarks, &file_browser, |
347 | #ifdef HAVE_TAGCACHE | 347 | #ifdef HAVE_TAGCACHE |
348 | &db_browser, | 348 | &db_browser, |
@@ -365,6 +365,8 @@ int item_callback(int action, const struct menu_item_ex *this_item) | |||
365 | { | 365 | { |
366 | switch (action) | 366 | switch (action) |
367 | { | 367 | { |
368 | case ACTION_TREE_STOP: | ||
369 | return ACTION_REDRAW; | ||
368 | case ACTION_REQUEST_MENUITEM: | 370 | case ACTION_REQUEST_MENUITEM: |
369 | #if CONFIG_TUNER | 371 | #if CONFIG_TUNER |
370 | if (this_item == &fm) | 372 | if (this_item == &fm) |