summaryrefslogtreecommitdiff
path: root/apps/plugins/text_viewer/tv_menu.c
diff options
context:
space:
mode:
authorYoshihisa Uchida <uchida@rockbox.org>2010-06-11 11:13:02 +0000
committerYoshihisa Uchida <uchida@rockbox.org>2010-06-11 11:13:02 +0000
commita784938b78379b9f9eb49d6f9cff8306200df83b (patch)
treeb0c1b32230fd9199c834affa7d552d68f12e6194 /apps/plugins/text_viewer/tv_menu.c
parent1b613f583d3f9d525a9ee3730de863fc21f3f8c4 (diff)
text viewer: can select the indent spaces when the line mode is reflow.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26763 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/text_viewer/tv_menu.c')
-rw-r--r--apps/plugins/text_viewer/tv_menu.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/plugins/text_viewer/tv_menu.c b/apps/plugins/text_viewer/tv_menu.c
index 7c27a3d8c1..ce85dc9325 100644
--- a/apps/plugins/text_viewer/tv_menu.c
+++ b/apps/plugins/text_viewer/tv_menu.c
@@ -315,6 +315,12 @@ static bool tv_font_setting(void)
}
#endif
+static bool tv_indent_spaces_setting(void)
+{
+ return rb->set_int("Indent Spaces", "", UNIT_INT,
+ &new_prefs.indent_spaces, NULL, 1, 0, 5, NULL);
+}
+
MENUITEM_FUNCTION(encoding_item, 0, "Encoding", tv_encoding_setting,
NULL, NULL, Icon_NOICON);
MENUITEM_FUNCTION(word_wrap_item, 0, "Word Wrap", tv_word_wrap_setting,
@@ -333,6 +339,8 @@ MENUITEM_FUNCTION(footer_item, 0, "Show Footer", tv_footer_setting,
MENUITEM_FUNCTION(font_item, 0, "Font", tv_font_setting,
NULL, NULL, Icon_NOICON);
#endif
+MENUITEM_FUNCTION(indent_spaces_item, 0, "Indent Spaces", tv_indent_spaces_setting,
+ NULL, NULL, Icon_NOICON);
MAKE_MENU(option_menu, "Viewer Options", NULL, Icon_NOICON,
&encoding_item, &word_wrap_item, &line_mode_item, &windows_item,
@@ -340,7 +348,7 @@ MAKE_MENU(option_menu, "Viewer Options", NULL, Icon_NOICON,
#ifdef HAVE_LCD_BITMAP
&header_item, &footer_item, &font_item,
#endif
- &scroll_menu);
+ &scroll_menu, &indent_spaces_item);
static enum tv_menu_result tv_options_menu(void)
{