diff options
Diffstat (limited to 'apps/plugins/text_viewer/tv_menu.c')
-rw-r--r-- | apps/plugins/text_viewer/tv_menu.c | 51 |
1 files changed, 37 insertions, 14 deletions
diff --git a/apps/plugins/text_viewer/tv_menu.c b/apps/plugins/text_viewer/tv_menu.c index e62b2de4be..ff2d6758a4 100644 --- a/apps/plugins/text_viewer/tv_menu.c +++ b/apps/plugins/text_viewer/tv_menu.c | |||
@@ -30,6 +30,42 @@ | |||
30 | 30 | ||
31 | static struct tv_preferences new_prefs; | 31 | static struct tv_preferences new_prefs; |
32 | 32 | ||
33 | /* scrollbar menu */ | ||
34 | #ifdef HAVE_LCD_BITMAP | ||
35 | static bool tv_horizontal_scrollbar_setting(void) | ||
36 | { | ||
37 | static const struct opt_items names[] = { | ||
38 | {"No", -1}, | ||
39 | {"Yes", -1}, | ||
40 | }; | ||
41 | |||
42 | return rb->set_option("Horizontal Scrollbar", &new_prefs.horizontal_scrollbar, INT, | ||
43 | names, 2, NULL); | ||
44 | } | ||
45 | |||
46 | static bool tv_vertical_scrollbar_setting(void) | ||
47 | { | ||
48 | static const struct opt_items names[] = { | ||
49 | {"No", -1}, | ||
50 | {"Yes", -1}, | ||
51 | }; | ||
52 | |||
53 | return rb->set_option("Vertical Scrollbar", &new_prefs.vertical_scrollbar, INT, | ||
54 | names, 2, NULL); | ||
55 | } | ||
56 | |||
57 | MENUITEM_FUNCTION(horizontal_scrollbar_item, 0, "Horizontal", | ||
58 | tv_horizontal_scrollbar_setting, | ||
59 | NULL, NULL, Icon_NOICON); | ||
60 | MENUITEM_FUNCTION(vertical_scrollbar_item, 0, "Vertical", | ||
61 | tv_vertical_scrollbar_setting, | ||
62 | NULL, NULL, Icon_NOICON); | ||
63 | MAKE_MENU(scrollbar_menu, "Scrollbar", NULL, Icon_NOICON, | ||
64 | &horizontal_scrollbar_item, &vertical_scrollbar_item); | ||
65 | #endif | ||
66 | |||
67 | /* main menu */ | ||
68 | |||
33 | static bool tv_encoding_setting(void) | 69 | static bool tv_encoding_setting(void) |
34 | { | 70 | { |
35 | static struct opt_items names[NUM_CODEPAGES]; | 71 | static struct opt_items names[NUM_CODEPAGES]; |
@@ -109,17 +145,6 @@ static bool tv_page_mode_setting(void) | |||
109 | names, 2, NULL); | 145 | names, 2, NULL); |
110 | } | 146 | } |
111 | 147 | ||
112 | static bool tv_scrollbar_setting(void) | ||
113 | { | ||
114 | static const struct opt_items names[] = { | ||
115 | {"Off", -1}, | ||
116 | {"On", -1} | ||
117 | }; | ||
118 | |||
119 | return rb->set_option("Show Scrollbar", &new_prefs.scrollbar_mode, INT, | ||
120 | names, 2, NULL); | ||
121 | } | ||
122 | |||
123 | static bool tv_header_setting(void) | 148 | static bool tv_header_setting(void) |
124 | { | 149 | { |
125 | int len = (rb->global_settings->statusbar == STATUSBAR_TOP)? 4 : 2; | 150 | int len = (rb->global_settings->statusbar == STATUSBAR_TOP)? 4 : 2; |
@@ -272,8 +297,6 @@ MENUITEM_FUNCTION(windows_item, 0, "Screens Per Page", tv_windows_setting, | |||
272 | MENUITEM_FUNCTION(alignment_item, 0, "Alignment", tv_alignment_setting, | 297 | MENUITEM_FUNCTION(alignment_item, 0, "Alignment", tv_alignment_setting, |
273 | NULL, NULL, Icon_NOICON); | 298 | NULL, NULL, Icon_NOICON); |
274 | #ifdef HAVE_LCD_BITMAP | 299 | #ifdef HAVE_LCD_BITMAP |
275 | MENUITEM_FUNCTION(scrollbar_item, 0, "Show Scrollbar", tv_scrollbar_setting, | ||
276 | NULL, NULL, Icon_NOICON); | ||
277 | MENUITEM_FUNCTION(page_mode_item, 0, "Overlap Pages", tv_page_mode_setting, | 300 | MENUITEM_FUNCTION(page_mode_item, 0, "Overlap Pages", tv_page_mode_setting, |
278 | NULL, NULL, Icon_NOICON); | 301 | NULL, NULL, Icon_NOICON); |
279 | MENUITEM_FUNCTION(header_item, 0, "Show Header", tv_header_setting, | 302 | MENUITEM_FUNCTION(header_item, 0, "Show Header", tv_header_setting, |
@@ -291,7 +314,7 @@ MAKE_MENU(option_menu, "Viewer Options", NULL, Icon_NOICON, | |||
291 | &encoding_item, &word_wrap_item, &line_mode_item, &windows_item, | 314 | &encoding_item, &word_wrap_item, &line_mode_item, &windows_item, |
292 | &alignment_item, | 315 | &alignment_item, |
293 | #ifdef HAVE_LCD_BITMAP | 316 | #ifdef HAVE_LCD_BITMAP |
294 | &scrollbar_item, &page_mode_item, &header_item, &footer_item, &font_item, | 317 | &scrollbar_menu, &page_mode_item, &header_item, &footer_item, &font_item, |
295 | #endif | 318 | #endif |
296 | &scroll_mode_item, &autoscroll_speed_item); | 319 | &scroll_mode_item, &autoscroll_speed_item); |
297 | 320 | ||