diff options
author | Yoshihisa Uchida <uchida@rockbox.org> | 2010-06-07 11:04:09 +0000 |
---|---|---|
committer | Yoshihisa Uchida <uchida@rockbox.org> | 2010-06-07 11:04:09 +0000 |
commit | 1ce70a679c645c1886eff1d96c5c9f2a630066d6 (patch) | |
tree | c8923657ef6108481f789314202ba35c4563c0fb /apps/plugins/text_viewer/tv_action.c | |
parent | 04fd0ce374ff3b7c21ec9619a9b35f796b4d9168 (diff) | |
download | rockbox-1ce70a679c645c1886eff1d96c5c9f2a630066d6.tar.gz rockbox-1ce70a679c645c1886eff1d96c5c9f2a630066d6.zip |
text viewer: can selected scroll by column/scroll by screen for the horizontal screen.
Viewer Options: "Scrollbar", "Overlap Pages", "Auto-Scroll Speed" move to Scroll Settings > Vertical.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26654 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/text_viewer/tv_action.c')
-rw-r--r-- | apps/plugins/text_viewer/tv_action.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/plugins/text_viewer/tv_action.c b/apps/plugins/text_viewer/tv_action.c index fb7fdb40e6..1f2ad78666 100644 --- a/apps/plugins/text_viewer/tv_action.c +++ b/apps/plugins/text_viewer/tv_action.c | |||
@@ -89,7 +89,7 @@ void tv_scroll_up(enum tv_vertical_scroll_mode mode) | |||
89 | int offset_line = -1; | 89 | int offset_line = -1; |
90 | 90 | ||
91 | if ((mode == TV_VERTICAL_SCROLL_PAGE) || | 91 | if ((mode == TV_VERTICAL_SCROLL_PAGE) || |
92 | (mode == TV_VERTICAL_SCROLL_PREFS && prefs->scroll_mode == PAGE)) | 92 | (mode == TV_VERTICAL_SCROLL_PREFS && prefs->vertical_scroll_mode == PAGE)) |
93 | { | 93 | { |
94 | offset_page--; | 94 | offset_page--; |
95 | #ifdef HAVE_LCD_BITMAP | 95 | #ifdef HAVE_LCD_BITMAP |
@@ -105,7 +105,7 @@ void tv_scroll_down(enum tv_vertical_scroll_mode mode) | |||
105 | int offset_line = 1; | 105 | int offset_line = 1; |
106 | 106 | ||
107 | if ((mode == TV_VERTICAL_SCROLL_PAGE) || | 107 | if ((mode == TV_VERTICAL_SCROLL_PAGE) || |
108 | (mode == TV_VERTICAL_SCROLL_PREFS && prefs->scroll_mode == PAGE)) | 108 | (mode == TV_VERTICAL_SCROLL_PREFS && prefs->vertical_scroll_mode == PAGE)) |
109 | { | 109 | { |
110 | offset_page++; | 110 | offset_page++; |
111 | #ifdef HAVE_LCD_BITMAP | 111 | #ifdef HAVE_LCD_BITMAP |
@@ -120,7 +120,8 @@ void tv_scroll_left(enum tv_horizontal_scroll_mode mode) | |||
120 | int offset_window = 0; | 120 | int offset_window = 0; |
121 | int offset_column = 0; | 121 | int offset_column = 0; |
122 | 122 | ||
123 | if (mode == TV_HORIZONTAL_SCROLL_COLUMN) | 123 | if ((mode == TV_HORIZONTAL_SCROLL_COLUMN) || |
124 | (mode == TV_HORIZONTAL_SCROLL_PREFS && prefs->horizontal_scroll_mode == COLUMN)) | ||
124 | { | 125 | { |
125 | /* Scroll left one column */ | 126 | /* Scroll left one column */ |
126 | offset_column--; | 127 | offset_column--; |
@@ -138,7 +139,8 @@ void tv_scroll_right(enum tv_horizontal_scroll_mode mode) | |||
138 | int offset_window = 0; | 139 | int offset_window = 0; |
139 | int offset_column = 0; | 140 | int offset_column = 0; |
140 | 141 | ||
141 | if (mode == TV_HORIZONTAL_SCROLL_COLUMN) | 142 | if ((mode == TV_HORIZONTAL_SCROLL_COLUMN) || |
143 | (mode == TV_HORIZONTAL_SCROLL_PREFS && prefs->horizontal_scroll_mode == COLUMN)) | ||
142 | { | 144 | { |
143 | /* Scroll right one column */ | 145 | /* Scroll right one column */ |
144 | offset_column++; | 146 | offset_column++; |
@@ -159,7 +161,7 @@ void tv_top(void) | |||
159 | void tv_bottom(void) | 161 | void tv_bottom(void) |
160 | { | 162 | { |
161 | tv_move_screen(0, 0, SEEK_END); | 163 | tv_move_screen(0, 0, SEEK_END); |
162 | if (prefs->scroll_mode == PAGE) | 164 | if (prefs->vertical_scroll_mode == PAGE) |
163 | tv_move_screen(0, -tv_get_screen_pos()->line, SEEK_CUR); | 165 | tv_move_screen(0, -tv_get_screen_pos()->line, SEEK_CUR); |
164 | } | 166 | } |
165 | 167 | ||
@@ -172,7 +174,7 @@ enum tv_menu_result tv_menu(void) | |||
172 | res = tv_display_menu(); | 174 | res = tv_display_menu(); |
173 | 175 | ||
174 | tv_convert_fpos(cur_file_pos, &cur_pos); | 176 | tv_convert_fpos(cur_file_pos, &cur_pos); |
175 | if (prefs->scroll_mode == PAGE) | 177 | if (prefs->vertical_scroll_mode == PAGE) |
176 | cur_pos.line = 0; | 178 | cur_pos.line = 0; |
177 | 179 | ||
178 | tv_move_screen(cur_pos.page, cur_pos.line, SEEK_SET); | 180 | tv_move_screen(cur_pos.page, cur_pos.line, SEEK_SET); |