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

8529 Commits

Author SHA1 Message Date
Frans de Jonge
e107aad42e
[fix] Use template 2021-04-22 22:32:07 +02:00
Frans de Jonge
b81b8cfb2f
[chore] Fix typo 2021-04-22 22:30:46 +02:00
Frans de Jonge
36b40e02e7
[chore] Directory to folder (#7584) 2021-04-22 22:28:10 +02:00
NiLuJe
dadab9267f Bump base
https://github.com/koreader/koreader-base/pull/1359
https://github.com/koreader/koreader-base/pull/1358
2021-04-22 21:33:02 +02:00
NiLuJe
6d752f32c0 Update android-laujit-launcher
https://github.com/koreader/android-luajit-launcher/pull/302
https://github.com/koreader/android-luajit-launcher/pull/301
https://github.com/koreader/android-luajit-launcher/pull/300
2021-04-22 21:33:02 +02:00
gbyl
617ed2c078
Gestures: Allow disabling tap and/or swipes for page turns (#7572)
Co-authored-by: gbyl <gbyl@users.noreply.github.com>
Co-authored-by: NiLuJe <ninuje@gmail.com>
2021-04-22 18:35:08 +02:00
yparitcher
dde3c80e73
do not exit when opening unsupported file by last for FM (#7580)
fixes: #7577

see prior art in #3935 #3933
2021-04-22 16:35:00 +02:00
zwim
e4c9409f97
[plugin] Add a caching mechanism for CoverImage (#7510) 2021-04-22 08:38:49 +02:00
Frans de Jonge
85085b545a
Update translations for 2021.04 release (#7579) 2021-04-21 22:43:12 +02:00
NiLuJe
14f9f9d3fc
FileManager: Tweak #7564 (#7571)
Tweak the goHome handler directly, instead of only the Home button.
Also, limit it to when it's actually needed, as changeToPath already
does it.
2021-04-19 21:29:26 +02:00
NiLuJe
9e9a87434b
NetworkManager: Just warn if the gateway is unreachable after a (#7570)
successful authentication.

Fully tearing down Wi-Fi was a bit optimistic, as the AP list can
technically still be up, so the user might want to try again and/or
connect to another AP.

Fix #5912, regression since #4616.

The reasoning behind #4616 doesn't really apply anymore anyway, as the
Wi-Fi prompt now handles this inconsistent state properly.

The whole codepath should be *extremely* rare anyway (and/or require
super-broken network conditions).
2021-04-19 21:29:12 +02:00
Martín Fernández
53234fcdc1
add hasSystemFonts device property (#7535)
Add system + user paths to the ReMarkable (has normal linux paths)
2021-04-19 09:04:31 +02:00
NiLuJe
9988eab1a1
ReaderToc: Unbreak ToC depth detection (#7569)
No need to reinvent the wheel.

Fix #7568, regression since #7553
2021-04-19 02:21:58 +02:00
hius07
3df1ce3644
Style tweaks: add links italic style (#7567) 2021-04-19 02:21:44 +02:00
gbyl
508a294016
ScreenSaver: Allow toggling the reboot/poweroff overlay message (#7566)
Co-authored-by: gbyl <gbyl@users.noreply.github.com>
2021-04-19 02:20:46 +02:00
NiLuJe
d3213e6b80 UIManager: Follow the same ScreenSaver preparations than Generic's
PowerEvent handler

(i.e., flash to white befor eimages).

Re #7519
2021-04-18 01:03:33 +02:00
NiLuJe
14cd6febbb Kindle Legacy: Cleanup key mappings
The K3 has a mapping similar to the K4, not to the DX & K2.

Fix #7561
2021-04-18 01:03:33 +02:00
NiLuJe
d6c6b3eb71 ReaderHeader: Skip the refresh if we're not visible
Similar in spirit to the previous commit, although since we're drawn as
part of the CRe page, this is just the refresh per-se that's optimized,
it had no chance to actually be visible.
2021-04-18 01:03:33 +02:00
NiLuJe
079418d3cd ReaderFooter: Smarter hardware event handlers
Make sure we don't repaint the footer over anything else than ReaderUI,
as some events are fired without direct UI interaction, so we can't be
assured of the actual state of the UI.

Fix #7556

Exposed since #7379, but could arguably happen with other existing
handlers before.
2021-04-18 01:03:33 +02:00
NiLuJe
832d915795 SortWidget: More tweaks
* Support cancelling individual moves.

Coopt the cancel button to actually do just that, cancel, instead of close.

* Don't close when hitting the accept button, allowing to chain multiple moves.

Changes are still propagated to the caller on each individual move, though.

* Update the new icons to match our usual stroke width.
2021-04-18 01:03:33 +02:00
gbyl
32802ee7f2
reMarkable: Remove refresh before poweroff (#7563)
This is now handled in a platform-agnostic manner (#7558).

Co-authored-by: gbyl <gbyl@users.noreply.github.com>
2021-04-18 01:02:59 +02:00
gbyl
915c5c7755
FileManager: Also refresh content when tapping the "Home" button (#7564)
Co-authored-by: gbyl <gbyl@users.noreply.github.com>
2021-04-18 01:01:59 +02:00
hius07
7b169dfa5e
FileManager: Hold the "+" button to refresh content (#7559) 2021-04-18 00:58:52 +02:00
yparitcher
475f46c427 fix for #7553: missing comma 2021-04-16 16:53:02 -04:00
NiLuJe
6def0bb7f0 FrontLight: Workaround potential crashes when swiping the frontlight bar.
This whole widget is a mess.
2021-04-16 22:12:15 +02:00
NiLuJe
956ecdc910 FrontLight: Ensure the warmth bar is empty at 0
Fix #7548
2021-04-16 22:12:15 +02:00
NiLuJe
7f3a9f4761 ReaderToc: Minor look'n feel tweaks
* ReaderToc: Tweak padding around items to be a tad more balanced for multi-level ToCs, and perfectly balanced for flat ToCs. (Re #7548)
* ReaderToc: Make the onHold popup's width match said padding. (Re #7548)
* InfoMessage: Allow passing the alignment flag to TextBoxWidget
* ReaderToc: Center text inside the InfoMessage onHold popup
2021-04-16 22:12:15 +02:00
NiLuJe
1ac0ad2f1a Android: More input handling tweaks
* Android: Fix #7552 by simply ensuring we drain the input/cmd queue first, simply by scheduling the task to the next tick, instead of locally re-implementing part of the event loop ;). (Requires https://github.com/koreader/koreader-base/pull/1356 for extra safety).
* Android: Clear input state when the window loses focus. (Related to the above fix).

* Bump base:

https://github.com/koreader/koreader-base/pull/1356
https://github.com/koreader/koreader-base/pull/1357

* Bump android-luajit-launcher:

https://github.com/koreader/android-luajit-launcher/pull/293
https://github.com/koreader/android-luajit-launcher/pull/298
https://github.com/koreader/android-luajit-launcher/pull/299
2021-04-16 22:12:15 +02:00
NiLuJe
97b81a7eb6 Menu: Don't share the dimen object across Menu instances (!)
The object was never re-assigned, so closing a smaller menu (e.g.,
Calibre metadata search) made the underlying one (e.g., CoverBrowser's
ListMenu) inherit the smaller dimensions...

Instead of creating the object in the Class constructor, create it in the
instance constructor (i.e., :init).

Similar cleanups in other Menu* related classes.
2021-04-16 22:12:15 +02:00
NiLuJe
3274183466 Minor Input & TimeVal cleanups
* Input: Don't create a new TimeVal object for input frame timestamps, just promote our existing table by assigning it the `TimeVal` metatable.
* TimeVal: Export (const) `zero` & `huge` TimeVal objects, because they're common enough in our codebase. (NOTE: not actually const, that's a Lua 5.4 feature ;p).
* GestureDetector: Explain the behavior of the `last_tevs` & `first_tevs` tables, and why one needs a new object and not the other.
* Speaking of, simplify the copy method for `first_tevs`, because it doesn't need to create a new TimeVal object, we can just reference the original, it's unique and re-assigned for each frame.
2021-04-16 22:12:15 +02:00
hius07
fce63d3c0f
Numberpicker: show hint with boundaries instead of the current value (#7529)
* Numberpicker: show hint with boundaries

* Show current value in the hint
2021-04-16 22:01:24 +02:00
hius07
c560be3740
SortWidget: Redesign the footer to be more in line w/ Menu & KeyValuePage 2021-04-16 22:00:02 +02:00
hius07
d879062eeb
ReaderToc: Add an option to display a separator between entries (#7551) 2021-04-16 21:59:01 +02:00
hius07
7092df7f4e
Button setIcon: Allow keep button width (#7546)
Useful when said Button was instantiated with a custom width, as is the case in SortWidget.
2021-04-16 01:35:04 +02:00
NiLuJe
ea3fa5c2c7
Calibre: More QoL tweaks (#7545)
* Wireless: Optimize memory usage in StreamMessageQueue (use an array of string ropes, that we only concatenate once). Allowed to relax the throttling, making transfers that much faster.
* Persist: Add a "zstd" codec, that uses the "luajit" codec, but compressed via zstd. Since both of those are very fast, it pretty much trounces everything in terms of speed and size ;).
* Persist: Implemented a "writes_to_file" framework, much like the existing "reads_from_file" one. And use it in the zstd codec to avoid useless temporary string interning.
* Metadata: Switch to the zstd codec.
2021-04-14 00:35:20 +02:00
NiLuJe
47c59e0e5a
Persist: Add the new native LuaJIT serializer to the list of supported codecs (#7543)
And swap the Calibre metadata cache to it.
2021-04-13 18:11:39 +02:00
NiLuJe
22b9396696
Centralize one time migration code after updates (#7531)
There have been a couple of these this month, and keeping stuff that should only ever run once piling up in their respective module was getting ugly, especially when it's usually simple stuff (settings, files).

So, move everything to a dedicated module, run by reader.lua on startup, and that will actually only do things once, when necessary.
2021-04-13 17:54:11 +02:00
NiLuJe
f2e90f505b
Input: Minor cleanups (#7542)
* TimeVal: Log the results of the COARSE probes in debug logs
* GestureDetector: Print details of failed clock probes in debug logs
* GestureDetector: Skip the BOOTTIME probe when CLOCK_BOOTTIME is unsupported.
* Input: Decode ABS_DISTANCE events in debug logs
* Get rid of duplicated <linux/input.h> constants, use the FFI module everywhere (re #7536)
* Kobo: Get rid of the `touch_alyssum_protocol` quirk. Replace it by setting `main_finger_slot` to `1`, like on the H2O.
2021-04-13 17:53:15 +02:00
Glen Sawyer
b6b332e311
Fix for PR #7415 breaking reMarkable touch input (#7536)
The Wacom pen reports sane CLOCK_REALTIME timestamps, but the Touchscreen reports timestamps frozen at the boot time ts (in REALTIME) :s.

So, make everyone use synthetic CLOCK_MONOTONIC timestamps in order to make gesture detection behave.
2021-04-12 18:54:12 +02:00
NiLuJe
b8d0cc4c35
Calibre: Minor QoL fixes (#7528)
* CalibreMetadata: Get rid of the now useless NULL-hunt: here, this was basically looking for `rapidjson.null` to replace them with... `rapidjson.null` :?. IIRC, that's a remnant of a quirk of the previous JSON parser (possibly even the previous, *previous* JSON parser ^^).
* CalibreSearch: Update the actually relevant NULL-hunt to make it explicit: replace JSON NULLs with Lua nils, instead of relying on an implementation detail of Lua-RapidJSON, because that detail just changed data type ;).
* UIManager: Make sure tasks scheduled during the final ZMQ callback are honored. e.g., the Calibre "Disconnect" handler. This happened to mostly work purely by chance before the event loop rework.
* Calibre: Restore a proper receiveCallback handler after receiving a book, in order not to break the "Disconnect" handler's state (and, well, get a working Disconnect handler, period ^^).
* Calibre: Unbreak metadata cache when it's initialized by a search (regression since #7159).
* Calibre: Handle UTC <-> local time conversions when checking the cache's timestamp against the Calibre metadata timestamp.
* Bump base (Unbreak CRe on Android, update RapidJSON)
2021-04-12 02:31:53 +02:00
hius07
ad924e3c1c
Dict/Wiki lookup results window: improve the 'pencil' button (#7523) 2021-04-10 22:08:59 +00:00
hius07
25b40fd1b6
Input dialogs: do not allow blank input cont'd (#7516) 2021-04-10 22:08:29 +00:00
Glen Sawyer
75661abd59
Calibre - pull files from device (#7492)
Add a proper implementation of `GET_BOOK_FILE_SEGMENT`, so calibre is now able to pull files from the device.
2021-04-10 20:07:24 +02:00
NiLuJe
bbe197bd4b
Bump base (#7527)
* Bump android-laujit-launcher

https://github.com/koreader/android-luajit-launcher/pull/297

* Bump base

https://github.com/koreader/koreader-base/pull/1351
https://github.com/koreader/koreader-base/pull/1350
https://github.com/koreader/koreader-base/pull/1349
https://github.com/koreader/koreader-base/pull/1348
2021-04-10 02:48:51 +02:00
NiLuJe
d31dc1e450 FileManager modules: Slightly less hackish onSetRotationMode handlers...
And, also, rotate the parent widget (i.e., FM/RV) to avoid leaving the
user with a broken layout when they exit in a different orientation ;).
2021-04-10 00:39:49 +02:00
NiLuJe
732ab56104 OPDS: Fix Search when the server's template is a relative path
Fix #7482
2021-04-10 00:39:49 +02:00
NiLuJe
e27925f4bb FileManagerShortcuts: Handle rotation events 2021-04-10 00:39:49 +02:00
NiLuJe
99372e8c63 FileManagerCollection: Handle rotation events 2021-04-10 00:39:49 +02:00
NiLuJe
a185290549 FileManagerHistory: Handle rotation events
Fix #7518
2021-04-10 00:39:49 +02:00
NiLuJe
5f9f7ce1da ReaderBookmark: Don't confuse bookmarks with highlights
Attempting to update a highlight when matching on a bookmark doesn't
make sense, and no longer works since #7411

Also, switch to ipairs(), and stop piggybacking on a new local that
shadows or uses the function's item argument.
It works in Lua, but it's super weird and error-prone.

Fix #7520 (regression since #7411).
2021-04-10 00:39:49 +02:00