diff options
author | Teruaki Kawashima <teru@rockbox.org> | 2010-07-11 14:04:34 +0000 |
---|---|---|
committer | Teruaki Kawashima <teru@rockbox.org> | 2010-07-11 14:04:34 +0000 |
commit | b1f5e5688c9ccc94cf2767d045b20df33b8a3d9d (patch) | |
tree | 218701a7df562d23c6fe59bfdb88d8364ee3b475 /apps/menu.c | |
parent | 911ed00171aba31a7672aed6f3bddbf3572337e1 (diff) | |
download | rockbox-b1f5e5688c9ccc94cf2767d045b20df33b8a3d9d.tar.gz rockbox-b1f5e5688c9ccc94cf2767d045b20df33b8a3d9d.zip |
do not redraw menu when exiting the menu.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27383 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menu.c')
-rw-r--r-- | apps/menu.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/apps/menu.c b/apps/menu.c index 670a235202..a88d725774 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -224,8 +224,6 @@ static void init_menu_lists(const struct menu_item_ex *menu, | |||
224 | get_menu_callback(menu,&menu_callback); | 224 | get_menu_callback(menu,&menu_callback); |
225 | if (callback && menu_callback) | 225 | if (callback && menu_callback) |
226 | menu_callback(ACTION_ENTER_MENUITEM,menu); | 226 | menu_callback(ACTION_ENTER_MENUITEM,menu); |
227 | gui_synclist_draw(lists); | ||
228 | gui_synclist_speak_item(lists); | ||
229 | } | 227 | } |
230 | 228 | ||
231 | static int talk_menu_item(int selected_item, void *data) | 229 | static int talk_menu_item(int selected_item, void *data) |
@@ -365,12 +363,14 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, | |||
365 | 363 | ||
366 | /* if hide_theme is true, assume parent has been fixed before passed into | 364 | /* if hide_theme is true, assume parent has been fixed before passed into |
367 | * this function, e.g. with viewport_set_defaults(parent, screen) */ | 365 | * this function, e.g. with viewport_set_defaults(parent, screen) */ |
368 | init_menu_lists(menu, &lists, selected, true, parent); | 366 | init_menu_lists(menu, &lists, selected, true, parent); |
369 | vps = *(lists.parent); | 367 | vps = *(lists.parent); |
370 | in_stringlist = ((menu->flags&MENU_TYPE_MASK) == MT_RETURN_ID); | 368 | in_stringlist = ((menu->flags&MENU_TYPE_MASK) == MT_RETURN_ID); |
371 | /* load the callback, and only reload it if menu changes */ | 369 | /* load the callback, and only reload it if menu changes */ |
372 | get_menu_callback(menu, &menu_callback); | 370 | get_menu_callback(menu, &menu_callback); |
373 | 371 | ||
372 | gui_synclist_draw(&lists); | ||
373 | gui_synclist_speak_item(&lists); | ||
374 | #ifdef HAVE_BUTTONBAR | 374 | #ifdef HAVE_BUTTONBAR |
375 | if (!hide_theme) | 375 | if (!hide_theme) |
376 | { | 376 | { |
@@ -528,6 +528,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, | |||
528 | else | 528 | else |
529 | init_menu_lists(menu, &lists, | 529 | init_menu_lists(menu, &lists, |
530 | menu_stack_selected_item[stack_top], false, vps); | 530 | menu_stack_selected_item[stack_top], false, vps); |
531 | redraw_lists = true; | ||
531 | /* new menu, so reload the callback */ | 532 | /* new menu, so reload the callback */ |
532 | get_menu_callback(menu, &menu_callback); | 533 | get_menu_callback(menu, &menu_callback); |
533 | } | 534 | } |
@@ -573,9 +574,8 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, | |||
573 | menu_stack[stack_top] = menu; | 574 | menu_stack[stack_top] = menu; |
574 | menu_stack_selected_item[stack_top] = selected; | 575 | menu_stack_selected_item[stack_top] = selected; |
575 | stack_top++; | 576 | stack_top++; |
576 | init_menu_lists(temp, &lists, 0, true, vps); | ||
577 | redraw_lists = false; /* above does the redraw */ | ||
578 | menu = temp; | 577 | menu = temp; |
578 | init_menu_lists(menu, &lists, 0, true, vps); | ||
579 | } | 579 | } |
580 | break; | 580 | break; |
581 | case MT_FUNCTION_CALL: | 581 | case MT_FUNCTION_CALL: |
@@ -586,11 +586,6 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, | |||
586 | temp->function->param); | 586 | temp->function->param); |
587 | else | 587 | else |
588 | return_value = temp->function->function(); | 588 | return_value = temp->function->function(); |
589 | if (!(menu->flags&MENU_EXITAFTERTHISMENU) || | ||
590 | (temp->flags&MENU_EXITAFTERTHISMENU)) | ||
591 | { | ||
592 | init_menu_lists(menu, &lists, selected, true, vps); | ||
593 | } | ||
594 | if (temp->flags&MENU_FUNC_CHECK_RETVAL) | 589 | if (temp->flags&MENU_FUNC_CHECK_RETVAL) |
595 | { | 590 | { |
596 | if (return_value != 0) | 591 | if (return_value != 0) |
@@ -621,7 +616,6 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, | |||
621 | stack_top++; | 616 | stack_top++; |
622 | menu = temp; | 617 | menu = temp; |
623 | init_menu_lists(menu,&lists,0,false, vps); | 618 | init_menu_lists(menu,&lists,0,false, vps); |
624 | redraw_lists = false; /* above does the redraw */ | ||
625 | in_stringlist = true; | 619 | in_stringlist = true; |
626 | } | 620 | } |
627 | break; | 621 | break; |