mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-11 06:02:37 -05:00
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
This commit is contained in:
parent
1b613f583d
commit
a784938b78
6 changed files with 34 additions and 18 deletions
|
|
@ -49,7 +49,8 @@
|
|||
* horizontal_scrollbar 1
|
||||
* horizontal_scroll_mode 1
|
||||
* narrow_mode 1
|
||||
* (reserved) 13
|
||||
* indent_spaces 1
|
||||
* (reserved) 12
|
||||
* font name MAX_PATH
|
||||
*/
|
||||
|
||||
|
|
@ -57,7 +58,7 @@
|
|||
#define TV_GLOBAL_SETTINGS_FILE VIEWERS_DIR "/tv_global.dat"
|
||||
|
||||
#define TV_GLOBAL_SETTINGS_HEADER "\x54\x56\x47\x53" /* "TVGS" */
|
||||
#define TV_GLOBAL_SETTINGS_VERSION 0x36
|
||||
#define TV_GLOBAL_SETTINGS_VERSION 0x37
|
||||
#define TV_GLOBAL_SETTINGS_HEADER_SIZE 5
|
||||
#define TV_GLOBAL_SETTINGS_FIRST_VERSION 0x31
|
||||
|
||||
|
|
@ -90,7 +91,8 @@
|
|||
* horizontal_scrollbar 1
|
||||
* horizontal_scroll_mode 1
|
||||
* narrow_mode 1
|
||||
* (reserved) 13
|
||||
* indent_spaces 1
|
||||
* (reserved) 12
|
||||
* font name MAX_PATH
|
||||
* bookmark count 1
|
||||
* [1st bookmark]
|
||||
|
|
@ -112,7 +114,7 @@
|
|||
#define TV_SETTINGS_TMP_FILE VIEWERS_DIR "/tv_file.tmp"
|
||||
|
||||
#define TV_SETTINGS_HEADER "\x54\x56\x53" /* "TVS" */
|
||||
#define TV_SETTINGS_VERSION 0x37
|
||||
#define TV_SETTINGS_VERSION 0x38
|
||||
#define TV_SETTINGS_HEADER_SIZE 4
|
||||
#define TV_SETTINGS_FIRST_VERSION 0x32
|
||||
|
||||
|
|
@ -174,6 +176,11 @@ static bool tv_read_preferences(int pfd, int version, struct tv_preferences *pre
|
|||
else
|
||||
prefs->narrow_mode = NM_PAGE;
|
||||
|
||||
if (version > 5)
|
||||
prefs->indent_spaces = *p++;
|
||||
else
|
||||
prefs->indent_spaces = 2;
|
||||
|
||||
rb->memcpy(prefs->font_name, buf + read_size - MAX_PATH, MAX_PATH);
|
||||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
|
|
@ -204,6 +211,7 @@ static bool tv_write_preferences(int pfd, const struct tv_preferences *prefs)
|
|||
*p++ = prefs->horizontal_scrollbar;
|
||||
*p++ = prefs->horizontal_scroll_mode;
|
||||
*p++ = prefs->narrow_mode;
|
||||
*p++ = prefs->indent_spaces;
|
||||
|
||||
rb->memcpy(buf + 28, prefs->font_name, MAX_PATH);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue