diff options
Diffstat (limited to 'apps/plugins/text_viewer/tv_menu.c')
-rw-r--r-- | apps/plugins/text_viewer/tv_menu.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/apps/plugins/text_viewer/tv_menu.c b/apps/plugins/text_viewer/tv_menu.c index c90386aabc..2e3a26d785 100644 --- a/apps/plugins/text_viewer/tv_menu.c +++ b/apps/plugins/text_viewer/tv_menu.c | |||
@@ -223,13 +223,10 @@ static bool tv_header_setting(void) | |||
223 | { | 223 | { |
224 | {"None", -1}, | 224 | {"None", -1}, |
225 | {"File path", -1}, | 225 | {"File path", -1}, |
226 | {"Status bar", -1}, | ||
227 | {"Both", -1}, | ||
228 | }; | 226 | }; |
229 | 227 | ||
230 | int len = (rb->global_settings->statusbar == STATUSBAR_TOP)? 4 : 2; | ||
231 | return rb->set_option("Show Header", &new_prefs.header_mode, INT, | 228 | return rb->set_option("Show Header", &new_prefs.header_mode, INT, |
232 | names, len, NULL); | 229 | names, 2, NULL); |
233 | } | 230 | } |
234 | 231 | ||
235 | static bool tv_footer_setting(void) | 232 | static bool tv_footer_setting(void) |
@@ -238,13 +235,21 @@ static bool tv_footer_setting(void) | |||
238 | { | 235 | { |
239 | {"None", -1}, | 236 | {"None", -1}, |
240 | {"Page Num", -1}, | 237 | {"Page Num", -1}, |
241 | {"Status bar", -1}, | ||
242 | {"Both", -1}, | ||
243 | }; | 238 | }; |
244 | 239 | ||
245 | int len = (rb->global_settings->statusbar == STATUSBAR_BOTTOM)? 4 : 2; | ||
246 | return rb->set_option("Show Footer", &new_prefs.footer_mode, INT, | 240 | return rb->set_option("Show Footer", &new_prefs.footer_mode, INT, |
247 | names, len, NULL); | 241 | names, 2, NULL); |
242 | } | ||
243 | |||
244 | static bool tv_statusbar_setting(void) | ||
245 | { | ||
246 | static const struct opt_items names[] = { | ||
247 | {"No", -1}, | ||
248 | {"Yes", -1}, | ||
249 | }; | ||
250 | |||
251 | return rb->set_option("Show Statusbar", &new_prefs.statusbar, BOOL, | ||
252 | names, 2, NULL); | ||
248 | } | 253 | } |
249 | 254 | ||
250 | static bool tv_font_setting(void) | 255 | static bool tv_font_setting(void) |
@@ -319,6 +324,8 @@ MENUITEM_FUNCTION(header_item, 0, "Show Header", tv_header_setting, | |||
319 | NULL, NULL, Icon_NOICON); | 324 | NULL, NULL, Icon_NOICON); |
320 | MENUITEM_FUNCTION(footer_item, 0, "Show Footer", tv_footer_setting, | 325 | MENUITEM_FUNCTION(footer_item, 0, "Show Footer", tv_footer_setting, |
321 | NULL, NULL, Icon_NOICON); | 326 | NULL, NULL, Icon_NOICON); |
327 | MENUITEM_FUNCTION(statusbar_item, 0, "Show Statusbar", tv_statusbar_setting, | ||
328 | NULL, NULL, Icon_NOICON); | ||
322 | MENUITEM_FUNCTION(font_item, 0, "Font", tv_font_setting, | 329 | MENUITEM_FUNCTION(font_item, 0, "Font", tv_font_setting, |
323 | NULL, NULL, Icon_NOICON); | 330 | NULL, NULL, Icon_NOICON); |
324 | #endif | 331 | #endif |
@@ -329,7 +336,7 @@ MAKE_MENU(option_menu, "Viewer Options", NULL, Icon_NOICON, | |||
329 | &encoding_item, &word_wrap_item, &line_mode_item, &windows_item, | 336 | &encoding_item, &word_wrap_item, &line_mode_item, &windows_item, |
330 | &alignment_item, | 337 | &alignment_item, |
331 | #ifdef HAVE_LCD_BITMAP | 338 | #ifdef HAVE_LCD_BITMAP |
332 | &header_item, &footer_item, &font_item, | 339 | &header_item, &footer_item, &font_item, &statusbar_item, |
333 | #endif | 340 | #endif |
334 | &scroll_menu, &indent_spaces_item); | 341 | &scroll_menu, &indent_spaces_item); |
335 | 342 | ||