2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

4717 Commits

Author SHA1 Message Date
hius07
19271c08c4
Checkbutton widget optimization (#8522)
-checkmark toggling is separated from the callback
-default width added
2021-12-07 13:35:44 +02:00
Alberto
6ebcfd9e79
[fix, desktop] Use XDG_DATA_HOME to search for fonts (#8521)
Same as <https://github.com/koreader/koreader/pull/8507>.
2021-12-07 12:17:45 +01:00
Frans de Jonge
19a607b548
[i18n] Add context to "Update" (#8519)
In response to the comment by @ilyats on Weblate:

> Text appears in code twice, as menu item and as dialog button label. Ideally, translations should be different.
2021-12-06 13:07:06 +01:00
hius07
13d80739b6
docsettings fix no name file (#8517)
When trying to open/delete a supported document with empty name (eg .txt) got an error

./luajit: frontend/docsettings.lua:118: attempt to concatenate a nil value
2021-12-05 22:08:20 +01:00
Frans de Jonge
1c8ab19f83
[fix] gettext: don't replace backslash characters (#8511)
Everything in string.gsub() is replaced, not only the matching group. By using two groups, we can correctly return the full matched string when none of the special conditions apply.

Fixes <https://github.com/koreader/koreader/issues/8486>.
2021-12-04 19:01:12 +01:00
hius07
785eb5f3ef
Bookmark search (#8504)
From bookmark list, main menu and with a gesture.
2021-12-04 19:37:00 +02:00
Frans de Jonge
91c4aeb2e5
[i18n] Add context to CSS style vs highlight style (#8510)
Cf. <https://github.com/koreader/koreader/pull/8489#issuecomment-985319434>.
2021-12-04 12:51:38 +01:00
Frans de Jonge
d9730cf0fc
[chore, CI] Remove empty whitespace (#8506) 2021-12-03 07:48:40 +01:00
hius07
eda8379e8c
SpinWidget, DoubleSpinWidget: enable/disable OK button (#8495)
OK/Apply button is enabled only after changing the input value.
2021-12-01 19:58:48 +02:00
hius07
791bb380ab
ConfigDialog: fix set as default (#8498)
Fix "Set as default" action with SpinWidget and DoubleSpinWidget.
Correct name of the setting to be saved as default.
2021-12-01 17:41:30 +02:00
hius07
ad09411c3f
DoubleSpinWidget buttons move (#8490)
Move Default and extra buttons above Cancel/OK.
Default values shown in the default button.
Precisions can be set for both values separately.
Minor geometry fix for consistence with SpinWidget.
2021-12-01 12:42:54 +01:00
zwim
ef4d88ccd6
Battery stats plugin: tidy up, single page (#8491)
KeyValuePage: add a 'single_page' option to force
showing all items on a single page.
2021-12-01 12:39:48 +01:00
zwim
6a01abb52c
[doc] add documentation to a few widgets (#8425) 2021-12-01 12:37:18 +01:00
Dylan Garrett
7495ea29ef
InputDialog: add 'use_available_height' option (#8467)
Use it with bookmark edit, to allow entering longer notes.
2021-11-28 23:30:15 +01:00
Frans de Jonge
10305789dc
[i18n] Add context to various none/auto/small/medium/large (#8489)
Needed for Greek and possibly other languages.

Closes #8478.
2021-11-28 22:49:22 +01:00
zwim
b029a6a1ff
[autosuspend, plugin] Switch to datetimewidget and provide default values (#8480) 2021-11-28 22:18:44 +01:00
hius07
372dd9e36b
SpinWidget buttons move (#8485)
SpinWidget "Default value" and extra buttons move up.
Cancel/OK buttons row is in the bottom now.
Default value is shown in the Default button.
2021-11-27 19:10:54 +02:00
poire-z
56d54d2c1a Style tweaks: have "Justify most/all text" work on txt documents 2021-11-27 18:09:50 +01:00
Martín Fernández
3427c207b0
android: bump test activity (#8483)
Now users can test light drivers too. See https://github.com/koreader/android-luajit-launcher/pull/339#issuecomment-977822717
2021-11-25 22:04:09 +01:00
hius07
e66b26865b
Highlights backup fix (#8479)
Fixes opening book with old highlights, when (after deleting the last highlight on a page) empty table of highlights for this page was not deleted.
2021-11-24 19:14:13 +02:00
zwim
e9ba854ff0
DeviceMenu: Colons and more information (#8435)
Add information to device menu entries
2021-11-23 21:17:07 +01:00
hius07
3a7cba38c2
Customize page turns tap zones (#8475)
Settings for page turn tap zones position (vertical or horizontal) and width.
2021-11-23 19:16:10 +02:00
yparitcher
5dbeddd2a1
Wifi: toggle when connected even if offline (#8468) 2021-11-23 01:12:39 +01:00
hius07
1c9e21389d
Backup and restore bookmarks/highlights: fix logic (#8473) 2021-11-23 01:11:07 +01:00
Frans de Jonge
dcd34d409e
[chore] Change "filebrowser" to "file browser" (#8466) 2021-11-21 22:44:28 +01:00
Frans de Jonge
dc88fdc66d
[chore] Fix "Compact items" capitalization (#8465)
Follow-up to <https://github.com/koreader/koreader/pull/8424>.
2021-11-21 22:44:13 +01:00
Frans de Jonge
59d09f54f8
[bug] Don't translate empty strings (#8464)
Introduced in https://github.com/koreader/koreader/pull/8419

Unfortunately it's not just useless, but it causes some edge case issue.
2021-11-21 21:00:19 +01:00
yparitcher
8207bdc3e3
BookShortcuts plugin: folder support (#8449)
Allow setting a folder as a book shortcut, with 2 options:
- open file browser: opens the FM in that folder
- last book: opens the most recently read book (via
  ReadHistory) in that folder
2021-11-21 20:51:42 +01:00
hius07
0eeb8bd2b7
Backup and restore bookmarks/highlights when switching engines (#8455)
Bookmark/highlight formats in crengine and mupdf are incompatible.
This backups and restores bookmarks and highlights when opening the
document with an incompatible engine, instead of deleting them.
2021-11-21 20:41:58 +01:00
poire-z
6f2fdd96f8
[chore] Fix a few luacheck errors (#8461) 2021-11-21 19:33:09 +01:00
Aleksa Sarai
3461f8af31
Dictionary: disable fuzzy search when CJK words (#8458)
Fuzzy searching doesn't work with CJK text: with Japanese,
we get large numbers of useless results because sdcv
decides to strip off the wrong part of the word.
It seems unlikely that sdcv correctly handles Korean
or Chinese, so just disable fuzzy searching on all
CJK-containing word lookups.
2021-11-21 19:13:29 +01:00
zwim
8ef426d79f
ReaderMenu/FileManagerMenu: deduplicate Exit menu code (#8459) 2021-11-21 19:01:43 +01:00
zwim
1d92ee19fb
Navigation menu: cleanup, use colons in menu (#8442) 2021-11-21 18:47:00 +01:00
zwim
e56aae263a
AltStatusBar: cleanup, use colons in menu (#8436) 2021-11-21 18:45:59 +01:00
Frans de Jonge
c11ea4f389
[chore] Fix a few luacheck errors (#8460)
Inadvertently introduced in <https://github.com/koreader/koreader/pull/8432> and <https://github.com/koreader/koreader/pull/8445>.
2021-11-21 18:41:07 +01:00
hius07
217937a5bc
ReaderPaging/Rolling: deduplicate inverse_reading_order code (#8445) 2021-11-21 18:33:51 +01:00
hius07
c7229d90bc
ReaderHighlight: allow for 2-steps text selection (#8432)
Add a "Select" button in the highlight dialog to initiate
text selection; on the next text selection, the text between
these 2 points will be selected.
Limited to a single page with non-CRE documents.
Also move "Search" button at end, so it's the one that
will be wide in case of an odd number of buttons.
2021-11-21 18:31:10 +01:00
hius07
58c4db694e
readersearch: do not show regexp checkbutton in pdf (#8450)
Minor optimization.
2021-11-18 16:54:07 +01:00
poire-z
1004081098
DocSettings: fix settings not saved when book on read-only FS (#8448)
Witnessed on Android with books on the external SD card.
2021-11-16 19:02:42 +01:00
roygbyte
e995cf1355
Fix typo in ListView doc (#8444) 2021-11-15 09:02:00 +01:00
Aleksa Sarai
7e611ac50c
keyboard: japanese: always put digits as the south gesture for latin (#8443)
This is to match GBoard's layout for the latin keyboard mode.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2021-11-14 14:10:25 +01:00
Aleksa Sarai
5709b4c2f1
kopt: correctly handle CJK character detection for space insertion (#8438)
Previously getTextFromBoxes would just pass the first and last three
bytes of the current and previous words when trying to detect CJK
characters (which shouldn't have spaces inserted).

However, this handling was not correct because CJK characters can be
longer than 3 bytes, and internally BaseUtil.utf8charcode doesn't ensure
that it was only given a single utf8 character (it blindly does the bit
operations on whatever length code you give it).

As a result, before this patch selections in PDF documents would have
lots of spaces stripped because getTextFromBoxes would think that almost
all characters were CJK characters.

Fixes: 6f1b70e5eb ("util.utf8: improve CJK character detection")
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2021-11-11 16:09:05 +01:00
zwim
89064487b7
ReaderDictionary: Colons in menus (#8431) 2021-11-09 20:15:52 +01:00
zwim
c6e415d646
[Status bar] Consistent menu entries; Add "centered dot" as separator (#8424)
* Consistent menu entries; Add "centered dot" as separator

* Menu entry: Colon
2021-11-09 19:08:41 +01:00
zwim
abcd989ec4
[Status bar] Add custom text to footer (#8419)
Allows to add any text to the status bar. Can be a placeholder (empty space) for better positioning of the indicators.
2021-11-09 19:04:44 +02:00
hius07
3dabbd5d73
Typeset menu: adds "Reset document settings to default" (#8412) 2021-11-07 19:29:53 +01:00
hius07
e6d2c1cae6
ReaderGoto: adds Go to % (#8395) 2021-11-07 19:26:07 +01:00
Aleksa Sarai
cdae66a661 keyboard: japanese: switch to 12-key flick layout
This layout is far more commonly used on mobile devices, and allows for
much easier typing. The keyboard primarily functions through gestures in
the four cardinal directions to select which vowel kana to select. In
addition, users can cycle through each kana row by tapping the key
within a 2-second window (this is the equivalent to T9 input for
Japanese phone keyboards).

This also resolves the long-standing issue that the old keyboard did not
correctly handle dakuten (there was a standalone dakuten key which added
a stray dakuten mark, and the umlat mode which added dakuten to all of
the keys it could) and could not input handakuten characters at all.

In order to allow adding dakuten and cycling through the various
modifiers for the previous kana, we need to wrap the input-box (similar
to korean) but luckily we don't need any state machine magic since we
just need to modify the last character in the character buffer. However
because the tap timeout for T9-like-cycling needs to be reset after any
non-tap key we need to add some basic wrappers around a few other
input-box methods.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2021-11-07 19:23:56 +01:00
Aleksa Sarai
fb0e5fca94 menu: keyboard_layout: add ability for layout-specific settings
A layout might want to make some specific feature configurable, so
create an addToMainMenu-like system for allowing layouts to add their
own configuration sub-menu to the keyboard configuration menu.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2021-11-07 19:23:56 +01:00
Aleksa Sarai
cb702fb062 inputtext: add access methods for internal character list
This allows for InputText wrappers (namely the Japanese keyboard which
needs to be able to apply modifiers to the character before the cursor)
to nicely access the character list.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2021-11-07 19:23:56 +01:00