summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/menu.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/menu.c b/apps/menu.c
index c3bc00b010..d01cbc64be 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -397,6 +397,8 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
397 menu = &main_menu_; 397 menu = &main_menu_;
398 else menu = start_menu; 398 else menu = start_menu;
399 399
400 init_default_menu_viewports(menu_vp, hide_bars);
401
400 if (parent) 402 if (parent)
401 { 403 {
402 vps = parent; 404 vps = parent;
@@ -405,7 +407,6 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
405 else 407 else
406 { 408 {
407 vps = menu_vp; 409 vps = menu_vp;
408 init_default_menu_viewports(vps, hide_bars);
409 } 410 }
410 FOR_NB_SCREENS(i) 411 FOR_NB_SCREENS(i)
411 { 412 {
@@ -438,7 +439,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
438 list_do_action_timeout(&lists, HZ)); 439 list_do_action_timeout(&lists, HZ));
439 /* HZ so the status bar redraws corectly */ 440 /* HZ so the status bar redraws corectly */
440 441
441 if (action != ACTION_NONE && menu_callback) 442 if (menu_callback)
442 { 443 {
443 int old_action = action; 444 int old_action = action;
444 action = menu_callback(action, menu); 445 action = menu_callback(action, menu);
@@ -584,12 +585,11 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
584 return_value = temp->function->function(); 585 return_value = temp->function->function();
585 if (!(menu->flags&MENU_EXITAFTERTHISMENU) || (temp->flags&MENU_EXITAFTERTHISMENU)) 586 if (!(menu->flags&MENU_EXITAFTERTHISMENU) || (temp->flags&MENU_EXITAFTERTHISMENU))
586 { 587 {
587 init_default_menu_viewports(menu_vp, hide_bars);
588 init_menu_lists(menu, &lists, selected, true, vps); 588 init_menu_lists(menu, &lists, selected, true, vps);
589 } 589 }
590 if (temp->flags&MENU_FUNC_CHECK_RETVAL) 590 if (temp->flags&MENU_FUNC_CHECK_RETVAL)
591 { 591 {
592 if (return_value == 1) 592 if (return_value != 0)
593 { 593 {
594 done = true; 594 done = true;
595 ret = return_value; 595 ret = return_value;
@@ -602,7 +602,6 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
602 { 602 {
603 if (do_setting_from_menu(temp, menu_vp)) 603 if (do_setting_from_menu(temp, menu_vp))
604 { 604 {
605 init_default_menu_viewports(menu_vp, hide_bars);
606 init_menu_lists(menu, &lists, selected, true,vps); 605 init_menu_lists(menu, &lists, selected, true,vps);
607 redraw_lists = false; /* above does the redraw */ 606 redraw_lists = false; /* above does the redraw */
608 } 607 }
@@ -661,6 +660,8 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
661 660
662 if (redraw_lists && !done) 661 if (redraw_lists && !done)
663 { 662 {
663 if (menu_callback)
664 menu_callback(ACTION_REDRAW, menu);
664 gui_synclist_draw(&lists); 665 gui_synclist_draw(&lists);
665 gui_synclist_speak_item(&lists); 666 gui_synclist_speak_item(&lists);
666 } 667 }