diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-06-21 12:32:10 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-06-21 12:32:10 +0000 |
commit | 0baad43a935319d417f89f2c5c00e764e42a99ad (patch) | |
tree | ceca9f4a049c13bd4cbbcc82ba4ca2607daa4dc7 /apps | |
parent | 3585ee7a3f5db5d635f5ce9a4a396a4242851da0 (diff) | |
download | rockbox-0baad43a935319d417f89f2c5c00e764e42a99ad.tar.gz rockbox-0baad43a935319d417f89f2c5c00e764e42a99ad.zip |
Accept FS#7313 - make the menus talk more often
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13679 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/menu.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/menu.c b/apps/menu.c index 8f0d1318ef..8720ea6062 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -391,6 +391,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) | |||
391 | int stack_top = 0; | 391 | int stack_top = 0; |
392 | bool in_stringlist, done = false; | 392 | bool in_stringlist, done = false; |
393 | menu_callback_type menu_callback = NULL; | 393 | menu_callback_type menu_callback = NULL; |
394 | bool talk_item = false; | ||
394 | if (start_menu == NULL) | 395 | if (start_menu == NULL) |
395 | menu = &main_menu_; | 396 | menu = &main_menu_; |
396 | else menu = start_menu; | 397 | else menu = start_menu; |
@@ -413,6 +414,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) | |||
413 | 414 | ||
414 | while (!done) | 415 | while (!done) |
415 | { | 416 | { |
417 | talk_item = false; | ||
416 | gui_syncstatusbar_draw(&statusbars, true); | 418 | gui_syncstatusbar_draw(&statusbars, true); |
417 | action = get_action(CONTEXT_MAINMENU,HZ); | 419 | action = get_action(CONTEXT_MAINMENU,HZ); |
418 | /* HZ so the status bar redraws corectly */ | 420 | /* HZ so the status bar redraws corectly */ |
@@ -436,7 +438,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) | |||
436 | 438 | ||
437 | if (gui_synclist_do_button(&lists,action,LIST_WRAP_UNLESS_HELD)) | 439 | if (gui_synclist_do_button(&lists,action,LIST_WRAP_UNLESS_HELD)) |
438 | { | 440 | { |
439 | talk_menu_item(menu, &lists); | 441 | talk_item = true; |
440 | } | 442 | } |
441 | else if (action == ACTION_TREE_WPS) | 443 | else if (action == ACTION_TREE_WPS) |
442 | { | 444 | { |
@@ -477,9 +479,9 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) | |||
477 | done = true; | 479 | done = true; |
478 | init_menu_lists(menu, &lists, | 480 | init_menu_lists(menu, &lists, |
479 | menu_stack_selected_item[stack_top], false); | 481 | menu_stack_selected_item[stack_top], false); |
480 | talk_menu_item(menu, &lists); | ||
481 | /* new menu, so reload the callback */ | 482 | /* new menu, so reload the callback */ |
482 | get_menu_callback(menu, &menu_callback); | 483 | get_menu_callback(menu, &menu_callback); |
484 | talk_item = true; | ||
483 | } | 485 | } |
484 | else if (menu != &root_menu_) | 486 | else if (menu != &root_menu_) |
485 | { | 487 | { |
@@ -519,12 +521,13 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) | |||
519 | stack_top++; | 521 | stack_top++; |
520 | init_menu_lists(temp, &lists, 0, true); | 522 | init_menu_lists(temp, &lists, 0, true); |
521 | menu = temp; | 523 | menu = temp; |
522 | talk_menu_item(menu, &lists); | 524 | talk_item = true; |
523 | } | 525 | } |
524 | break; | 526 | break; |
525 | case MT_FUNCTION_CALL: | 527 | case MT_FUNCTION_CALL: |
526 | { | 528 | { |
527 | int return_value; | 529 | int return_value; |
530 | talk_item = true; | ||
528 | action_signalscreenchange(); | 531 | action_signalscreenchange(); |
529 | if (temp->flags&MENU_FUNC_USEPARAM) | 532 | if (temp->flags&MENU_FUNC_USEPARAM) |
530 | return_value = temp->function->function_w_param( | 533 | return_value = temp->function->function_w_param( |
@@ -546,6 +549,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) | |||
546 | { | 549 | { |
547 | if (do_setting_from_menu(temp)) | 550 | if (do_setting_from_menu(temp)) |
548 | init_menu_lists(menu, &lists, 0, true); | 551 | init_menu_lists(menu, &lists, 0, true); |
552 | talk_item = true; | ||
549 | break; | 553 | break; |
550 | } | 554 | } |
551 | case MT_RETURN_ID: | 555 | case MT_RETURN_ID: |
@@ -562,6 +566,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) | |||
562 | stack_top++; | 566 | stack_top++; |
563 | menu = temp; | 567 | menu = temp; |
564 | init_menu_lists(menu,&lists,0,false); | 568 | init_menu_lists(menu,&lists,0,false); |
569 | talk_item = true; | ||
565 | in_stringlist = true; | 570 | in_stringlist = true; |
566 | } | 571 | } |
567 | break; | 572 | break; |
@@ -596,6 +601,8 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) | |||
596 | ret = MENU_ATTACHED_USB; | 601 | ret = MENU_ATTACHED_USB; |
597 | done = true; | 602 | done = true; |
598 | } | 603 | } |
604 | if (talk_item && !done) | ||
605 | talk_menu_item(menu, &lists); | ||
599 | } | 606 | } |
600 | action_signalscreenchange(); | 607 | action_signalscreenchange(); |
601 | if (start_selected) | 608 | if (start_selected) |