Commit Graph

8743 Commits (3427c207b0dc8eca0ace1dc25633dd6a76e910ab)
 

Author SHA1 Message Date
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
2 years ago
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.
2 years ago
zwim e9ba854ff0
DeviceMenu: Colons and more information (#8435)
Add information to device menu entries
2 years ago
yparitcher 1b2b4da9e5
Multiswipe menu: return to item page when going up from submenu (#8474) 2 years ago
hius07 3a7cba38c2
Customize page turns tap zones (#8475)
Settings for page turn tap zones position (vertical or horizontal) and width.
2 years ago
yparitcher 66f97c25f6
Kindle: remove zsync plugin iptables rules (#8471)
zsync is not shipped anymore.
2 years ago
yparitcher 5dbeddd2a1
Wifi: toggle when connected even if offline (#8468) 2 years ago
hius07 1c9e21389d
Backup and restore bookmarks/highlights: fix logic (#8473) 2 years ago
poire-z a2d95f5a3f
bump cURL, libjpeg-turbo, crengine (#8463)
- (Update to HarfBuzz 3.1.1, but reverted)
- Update to cURL 7.80.0
- Update to libjpeg-turbo 2.1.2
- bump crengine: allows to open files from rclone mounts
  on Linux
2 years ago
Frans de Jonge dcd34d409e
[chore] Change "filebrowser" to "file browser" (#8466) 2 years ago
Frans de Jonge dc88fdc66d
[chore] Fix "Compact items" capitalization (#8465)
Follow-up to <https://github.com/koreader/koreader/pull/8424>.
2 years ago
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.
2 years ago
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
2 years ago
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.
2 years ago
poire-z 6f2fdd96f8
[chore] Fix a few luacheck errors (#8461) 2 years ago
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.
2 years ago
zwim 8ef426d79f
ReaderMenu/FileManagerMenu: deduplicate Exit menu code (#8459) 2 years ago
zwim 1d92ee19fb
Navigation menu: cleanup, use colons in menu (#8442) 2 years ago
zwim e56aae263a
AltStatusBar: cleanup, use colons in menu (#8436) 2 years ago
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>.
2 years ago
hius07 217937a5bc
ReaderPaging/Rolling: deduplicate inverse_reading_order code (#8445) 2 years ago
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.
2 years ago
Frans de Jonge 0824886fde
Update translations for 2021.11 (#8452) 2 years ago
hius07 58c4db694e
readersearch: do not show regexp checkbutton in pdf (#8450)
Minor optimization.
2 years ago
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.
2 years ago
Aleksa Sarai 6d40c7c7ea
koreader-base: update to include sdcv update (#8446)
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2 years ago
roygbyte e995cf1355
Fix typo in ListView doc (#8444) 2 years ago
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>
2 years ago
Dylan Garrett 26ec5bafe3
[plugin] Display OPDS download titles if available (#8441)
I've found that some OPDS catalogs have multiple downloads of the same filetype, but optimized or formatted in different ways. The Title of the download is much more descriptive in this case, so I thought it would be better to display the title if available.

The OPDS catalog at https://standardebooks.org/opds is a good example. Note how entries in https://standardebooks.org/opds/new-releases have three different epub downloads, titled "Recommended compatible epub", "Advanced epub", and "Kobo Kepub epub".
2 years ago
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>
2 years ago
zwim 15778ac939
[plugin] Autowarmth: Fix sanity check for longitude (#8434)
This PR will fix https://www.mobileread.com/forums/showthread.php?t=342905
2 years ago
zwim 89064487b7
ReaderDictionary: Colons in menus (#8431) 2 years ago
zwim eb4e958303
[Coverimage, plugin] Colons in menus; unlock sizespinner (#8430) 2 years ago
zwim c6e415d646
[Status bar] Consistent menu entries; Add "centered dot" as separator (#8424)
* Consistent menu entries; Add "centered dot" as separator

* Menu entry: Colon
2 years ago
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.
2 years ago
hius07 3dabbd5d73
Typeset menu: adds "Reset document settings to default" (#8412) 2 years ago
hius07 e6d2c1cae6
ReaderGoto: adds Go to % (#8395) 2 years ago
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>
2 years ago
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>
2 years ago
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>
2 years ago
Aleksa Sarai ac907df634 util: add reversible table method wrapping helper
In some cases, it's useful to be able to wrap a function and either
replace its contents entirely or have some callback be run before
calling the underlying function.

The most obvious users for this feature are the Japanese and Korean
keyboards (both of which need to wrap the inputbox methods with either
their own versions or have basic callbacks be run before the method is
executed).

This is loosely based on how busted/luassert spies work.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2 years ago
poire-z 1278e19e4a
bump crengine: CSS fixes and optimisations (#8427)
Includes:
- lString32Collection::erase(): fix bounds checking
- ldomDocumentFragmentWriter: fix OnTagBody called twice
- CSS: optimize E.class rule check
- CSS: optimize E#id rule check
- EPUB: forward class attribute from the html element
2 years ago
Aleksa Sarai 3fd931bb2f
readerhighlight: ignore cases where no text is selected (#8399)
It's possible for the user to have selected nothing, and trying to
operate on the nil highlight can cause confusion or crashes. This
restores the behaviour before commit 7a0e3d5e68 ("readerhighlight:
remove selected_word and use selected_text everywhere"), which missed
this case.

In addition, add some debug guards to ReaderHighlight methods which
cannot handle selected_text being nil (or at least, shouldn't be called
with selected_text being nil).

Fixes: 7a0e3d5e68 ("readerhighlight: remove selected_word and use selected_text everywhere")
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2 years ago
Aleksa Sarai 7baeebc2d4
dictionaries: switch to far more up-to-date JM(ne)dict (#8413)
The previous version of JMdict comes from 2009 and doesn't appear to
work at all when trying to do basic lookups (likely due to some kind of
encoding problem). In addition, the license information and sourcing was
not really in line with the requirements specified by the JMdict
license. This version is far more up-to-date and also includes synonym-based
deinflection (though because KOReader has a Japanese plugin now, this is
technically not necessary).

Since there didn't exist a nicely-maintained place to download these
dictionaries (because StarDict is not widely used for Japanese
dictionaries), I've set up a personal GitHub repository where I've
hosted them. Note that we're intentionally not pinning the commit hash
because GitHub only recommends we use gh-pages for CDN purposes, and one
of the requirements of the JMdict license is that you need to be able to
update to later versions.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
3 years ago
Frans de Jonge aa3fa5abfa
[fix, plugin] Gestures migration: check if setting exists instead of assuming it does (#8409)
Fixes <https://github.com/koreader/koreader/issues/8406>.
3 years ago
Martín Fernández 1bba05ff41
Bump android-luajit-launcher (#8404)
Fix #8355
3 years ago
NiLuJe d9fc34cbba
Bump base to unbreak lj_wpaclient (#8403)
https://github.com/koreader/koreader-base/pull/1425

Fix #8401
3 years ago
NiLuJe 4d261d29a4 ProgressWidget: Better contrast in thin mode
Re #8400

Also, use the proper colors when switching between thick & thin.
3 years ago
NiLuJe bc5da5276d NetworkManager: Always prefer system APs as intended.
If we had a local prefered AP with a higher RSSI,
we attempted to associate with it over wpa_supplicant
being already attempting to associate with its own preferred AP.
That... failed horribly.

Also adapt to the new lj-wpaclient API, fixing a few other edge-cases,
and making the whole thing slightly faster because we no longer
uselessly sleep.
And more reliable because we now actually wait for replies to our
requests.

Bump base

https://github.com/koreader/koreader-base/pull/1424
3 years ago
NiLuJe 1ff19f8ba7 Kobo: On sunxi, add a delay between the white flash and the sleep
screen.

Otherwise, on the Sage, weird flash glitches may happen, depending on
what was on screen...
(e.g., there's some weird update merging shenanigans going on
despite those updates being flagged NO_MERGE...).
3 years ago