fix the problem that does not jump to selected the bookmark. (FS#11386)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26738 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Yoshihisa Uchida 2010-06-10 10:57:05 +00:00
parent c3a698e46a
commit ac25812e55
3 changed files with 12 additions and 4 deletions

View file

@ -173,11 +173,16 @@ enum tv_menu_result tv_menu(void)
res = tv_display_menu();
tv_convert_fpos(cur_file_pos, &cur_pos);
if (prefs->vertical_scroll_mode == PAGE)
cur_pos.line = 0;
if (res == TV_MENU_RESULT_EXIT_MENU)
{
tv_convert_fpos(cur_file_pos, &cur_pos);
if (prefs->vertical_scroll_mode == PAGE)
cur_pos.line = 0;
tv_move_screen(cur_pos.page, cur_pos.line, SEEK_SET);
tv_move_screen(cur_pos.page, cur_pos.line, SEEK_SET);
}
else if (res == TV_MENU_RESULT_MOVE_PAGE)
res = TV_MENU_RESULT_EXIT_MENU;
return res;
}

View file

@ -375,6 +375,7 @@ enum tv_menu_result tv_display_menu(void)
break;
case 3: /* select bookmark */
tv_select_bookmark();
result = TV_MENU_RESULT_MOVE_PAGE;
break;
case 4: /* change global settings */
if (!tv_load_global_settings(&new_prefs))

View file

@ -24,6 +24,7 @@
#define PLUGIN_TEXT_VIEWER_MENU_H
enum tv_menu_result {
TV_MENU_RESULT_MOVE_PAGE,
TV_MENU_RESULT_EXIT_MENU,
TV_MENU_RESULT_EXIT_PLUGIN,
TV_MENU_RESULT_ATTACHED_USB,
@ -34,6 +35,7 @@ enum tv_menu_result {
*
* return
* the following value returns
* TV_MENU_RESULT_MOVE_PAGE change reading page
* TV_MENU_RESULT_EXIT_MENU menu exit and continue this plugin
* TV_MENU_RESULT_EXIT_PLUGIN request to exit this plugin
* TV_MENU_RESULT_ATTACHED_USB connect USB cable