diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/viewer.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c index 79ee3d3f78..6c440c5a5d 100644 --- a/apps/plugins/viewer.c +++ b/apps/plugins/viewer.c | |||
@@ -191,17 +191,25 @@ enum { | |||
191 | SB_ON, | 191 | SB_ON, |
192 | SCROLLBAR_MODES | 192 | SCROLLBAR_MODES |
193 | } scrollbar_mode[VIEW_MODES] = {SB_OFF, SB_ON}; | 193 | } scrollbar_mode[VIEW_MODES] = {SB_OFF, SB_ON}; |
194 | #ifdef VIEWER_MODE_SCROLLBAR | ||
194 | static unsigned char *scrollbar_mode_str[] = {"off", "on", "scrollbar"}; | 195 | static unsigned char *scrollbar_mode_str[] = {"off", "on", "scrollbar"}; |
196 | #endif | ||
197 | |||
195 | static bool need_scrollbar; | 198 | static bool need_scrollbar; |
196 | 199 | ||
200 | |||
197 | enum { | 201 | enum { |
198 | NO_OVERLAP=0, | 202 | NO_OVERLAP=0, |
199 | OVERLAP, | 203 | OVERLAP, |
200 | PAGE_MODES | 204 | PAGE_MODES |
201 | } page_mode = 0; | 205 | } page_mode = 0; |
206 | |||
207 | #ifdef VIEWER_MODE_PAGE | ||
202 | static unsigned char *page_mode_str[] = {"don't overlap", "overlap", "pages"}; | 208 | static unsigned char *page_mode_str[] = {"don't overlap", "overlap", "pages"}; |
203 | #endif | 209 | #endif |
204 | 210 | ||
211 | #endif | ||
212 | |||
205 | static unsigned char buffer[BUFFER_SIZE + 1]; | 213 | static unsigned char buffer[BUFFER_SIZE + 1]; |
206 | static unsigned char line_break[] = {0,0x20,'-',9,0xB,0xC}; | 214 | static unsigned char line_break[] = {0,0x20,'-',9,0xB,0xC}; |
207 | static int display_columns; /* number of (pixel) columns on the display */ | 215 | static int display_columns; /* number of (pixel) columns on the display */ |
@@ -1184,9 +1192,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) | |||
1184 | viewer_draw(col); | 1192 | viewer_draw(col); |
1185 | break; | 1193 | break; |
1186 | 1194 | ||
1187 | #if (CONFIG_KEYPAD == RECORDER_PAD) || (CONFIG_KEYPAD == ONDIO_PAD) \ | 1195 | #ifdef VIEWER_MODE_PAGE |
1188 | || (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD) \ | ||
1189 | || (CONFIG_KEYPAD == IPOD_4G_PAD) | ||
1190 | case VIEWER_MODE_PAGE: | 1196 | case VIEWER_MODE_PAGE: |
1191 | /* Page-overlap mode */ | 1197 | /* Page-overlap mode */ |
1192 | if (++page_mode == PAGE_MODES) | 1198 | if (++page_mode == PAGE_MODES) |
@@ -1198,7 +1204,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) | |||
1198 | 1204 | ||
1199 | viewer_draw(col); | 1205 | viewer_draw(col); |
1200 | break; | 1206 | break; |
1201 | 1207 | #endif | |
1208 | #ifdef VIEWER_MODE_SCROLLBAR | ||
1202 | case VIEWER_MODE_SCROLLBAR: | 1209 | case VIEWER_MODE_SCROLLBAR: |
1203 | /* Show-scrollbar mode for current view-width mode */ | 1210 | /* Show-scrollbar mode for current view-width mode */ |
1204 | if (!(ONE_SCREEN_FITS_ALL())) { | 1211 | if (!(ONE_SCREEN_FITS_ALL())) { |
@@ -1218,8 +1225,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) | |||
1218 | break; | 1225 | break; |
1219 | #endif | 1226 | #endif |
1220 | 1227 | ||
1221 | #if (CONFIG_KEYPAD == RECORDER_PAD) || (CONFIG_KEYPAD == IRIVER_H100_PAD) \ | 1228 | #ifdef VIEWER_LINE_UP |
1222 | || (CONFIG_KEYPAD == IRIVER_H300_PAD) | ||
1223 | case VIEWER_LINE_UP: | 1229 | case VIEWER_LINE_UP: |
1224 | case VIEWER_LINE_UP | BUTTON_REPEAT: | 1230 | case VIEWER_LINE_UP | BUTTON_REPEAT: |
1225 | /* Scroll up one line */ | 1231 | /* Scroll up one line */ |
@@ -1235,7 +1241,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) | |||
1235 | 1241 | ||
1236 | viewer_draw(col); | 1242 | viewer_draw(col); |
1237 | break; | 1243 | break; |
1238 | 1244 | #endif | |
1245 | #ifdef VIEWER_COLUMN_LEFT | ||
1239 | case VIEWER_COLUMN_LEFT: | 1246 | case VIEWER_COLUMN_LEFT: |
1240 | case VIEWER_COLUMN_LEFT | BUTTON_REPEAT: | 1247 | case VIEWER_COLUMN_LEFT | BUTTON_REPEAT: |
1241 | /* Scroll left one column */ | 1248 | /* Scroll left one column */ |