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

8160 Commits

Author SHA1 Message Date
hius07
b907386933
Fulltext search: show notification when nothing found (#7436) 2021-04-01 11:19:36 +00:00
hius07
d465799c94
Text editor: option to show/hide keyboard on start (#7460)
Allows to hide keyboard on start to see more text.
Default is to show keyboard.

Some wordings unification.
`Open file` goes down, closer to the history of opened files.

* 'Lua check' button
2021-04-01 13:08:07 +02:00
NiLuJe
8a923e3e77
Input: Followup tweaks to #7415 (#7478)
* Actually load librt properly on old Linux systems (fix #7472)
* Made sure SDL & Android honored timeouts properly in some edgy (or not so edgy, in SDL's case) cases (c.f., https://github.com/koreader/koreader-base/pull/1343).
* Try harder not to consume a timer callback when the timerfd backend is in use and `select` timed out *not* because of a timerfd expiring. This would take some particularly heinous timing to reproduce (e.g., a timerfd set, but a task deadline expiring *before* it). May or may not help with #7473.
* Decode `BTN_` KEY codes in verbose debug logs.
* Fix MultiTouch on the H2O (GestureDetector was hard-coding the two slots as 0 & 1, but the H2O kernel is a special snowflake that doesn't use slot 0, instead switching to slot 1 & 2).
2021-04-01 04:30:48 +02:00
NiLuJe
dfc9d16a19
ScreenSaver: Fix default settings (#7479)
* ScreenSavers: Fix default settings

Awesome typo ;D.
2021-04-01 03:39:25 +02:00
hius07
91262f9647
File manager: some broken actions for parent folder (#7475)
For parent folder (..):
disabled `Copy`, `Cut`, `Delete`, `Rename`.
enabled `Paste`, `Set as HOME folder`.
2021-03-31 22:37:08 +02:00
NiLuJe
de543b3484
Statistics: Properly initialize default settings. (#7471)
* Statistics: Properly initialize default settings.

Regression since #7371
Fix #7470
2021-03-31 01:08:05 +02:00
NiLuJe
766ec91a84
ReaderFooter: Workaround a bad interaction with ReaderHighlight (#7466)
Related to hold handlers.

Fix #7464
2021-03-30 20:01:38 +02:00
Frans de Jonge
975e2d4b80
Add DBNL footnotes styletweak (#7467)
`.voetnoten` is standard in DBNL ebooks.

A good test book can be found at <https://www.dbnl.org/tekst/veld028jnot01_01/>.
2021-03-30 19:13:37 +02:00
NiLuJe
f0f69e9a7a
ReaderZooming: Fix defaults handling (#7463)
It appears the fancy split settings from #6885 were not being honored at all.

Also:

* Made sure "pagewidth" is actually the default zoom mode again, "full" had sneaked in as the default state of the zoom type toggle).
* Display human-readable values in the "Make as default" popup, instead of the raw, meaningless numerical setting.
* Disable zoom options when reflow is enabled, and restore 'em properly when it's disabled.

Fix #7461, #7228, #7192
2021-03-30 18:47:52 +02:00
poire-z
b9ffc3d05b
bump crengine: add support for MathML (#7465)
Includes (among others):
- LVImg: Tweak JPEG decoding some more
- toStringV2(): fix (again) when target node is a boxing node
- LVFontCache::find(): give more weight to first fonts in list
- Page splitting: more accurate rendering progress
- getRenderedWidths(): fix nowrap around image/inlineBoxes
- Tables rendering: tweak column widths algorithm
- CSS: parse/handle "currentcolor", default for border-color
- CSS: add units 'ch' (just like 'ex')
- SVG images: proper alpha blending
- MathML: add parsing and rendering support files
- MathML: plug MathML code into crengine core
- MathML: <epub:switch/case/default>: accept MathML
- (Upstream) Make crengine.font.fallback.faces plural
- (Upstream) Option to not limit font size to a set
- Text: dont adjust space after consecutive initial marks/dashes
- Update German hyphenation patterns
2021-03-30 15:25:13 +00:00
Hzj_jie
ffc7ccb576
PluginLoader should update lookup_path_list if data_dir is not ".". (#7447)
Should update lookup_path_list instead of extra_paths

It looks like a problem introduced by dee72a431c (diff-b3b0e0e90ea7b43a9d97a1c7572acef3f1dc7d1d2f75fe634345a1b841c624fa).
2021-03-30 10:02:06 +02:00
NiLuJe
1f15184bbb
Kindle: Fix gyro events on Zelda (#7459)
* Kindle: Fix gyro event on Zelda

Like on Kobo, only honor the face-up events.
2021-03-30 03:05:10 +02:00
NiLuJe
6d53f83286
The great Input/GestureDetector/TimeVal spring cleanup (a.k.a., a saner main loop) (#7415)
* ReaderDictionary: Port delay computations to TimeVal
* ReaderHighlight: Port delay computations to TimeVal
* ReaderView: Port delay computations to TimeVal
* Android: Reset gesture detection state on APP_CMD_TERM_WINDOW.
  This prevents potentially being stuck in bogus gesture states when switching apps.
* GestureDetector:
  * Port delay computations to TimeVal
  * Fixed delay computations to handle time warps (large and negative deltas).
  * Simplified timed callback handling to invalidate timers much earlier, preventing accumulating useless timers that no longer have any chance of ever detecting a gesture.
  * Fixed state clearing to handle the actual effective slots, instead of hard-coding slot 0 & slot 1.
  * Simplified timed callback handling in general, and added support for a timerfd backend for better performance and accuracy.
  * The improved timed callback handling allows us to detect and honor (as much as possible) the three possible clock sources usable by Linux evdev events.
    The only case where synthetic timestamps are used (and that only to handle timed callbacks) is limited to non-timerfd platforms where input events use
    a clock source that is *NOT* MONOTONIC.
    AFAICT, that's pretty much... PocketBook, and that's it?
* Input:
  * Use the <linux/input.h> FFI module instead of re-declaring every constant
  * Fixed (verbose) debug logging of input events to actually translate said constants properly.
  * Completely reset gesture detection state on suspend. This should prevent bogus gesture detection on resume.
  * Refactored the waitEvent loop to make it easier to comprehend (hopefully) and much more efficient.
    Of specific note, it no longer does a crazy select spam every 100µs, instead computing and relying on sane timeouts,
    as afforded by switching the UI event/input loop to the MONOTONIC time base, and the refactored timed callbacks in GestureDetector.
* reMarkable: Stopped enforcing synthetic timestamps on input events, as it should no longer be necessary.
* TimeVal:
  * Refactored and simplified, especially as far as metamethods are concerned (based on <bsd/sys/time.h>).
  * Added a host of new methods to query the various POSIX clock sources, and made :now default to MONOTONIC.
  * Removed the debug guard in __sub, as time going backwards can be a perfectly normal occurrence.
  * New methods:
    * Clock sources: :realtime, :monotonic, :monotonic_coarse, :realtime_coarse, :boottime
    * Utility: :tonumber, :tousecs, :tomsecs, :fromnumber, :isPositive, :isZero
* UIManager:
  * Ported event loop & scheduling to TimeVal, and switched to the MONOTONIC time base.
    This ensures reliable and consistent scheduling, as time is ensured never to go backwards.
  * Added a :getTime() method, that returns a cached TimeVal:now(), updated at the top of every UI frame.
    It's used throughout the codebase to cadge a syscall in circumstances where we are guaranteed that a syscall would return a mostly identical value,
    because very few time has passed.
    The only code left that does live syscalls does it because it's actually necessary for accuracy,
    and the only code left that does that in a REALTIME time base is code that *actually* deals with calendar time (e.g., Statistics).
* DictQuickLookup: Port delay computations to TimeVal
* FootNoteWidget: Port delay computations to TimeVal
* HTMLBoxWidget: Port delay computations to TimeVal
* Notification: Port delay computations to TimeVal
* TextBoxWidget: Port delay computations to TimeVal
* AutoSuspend: Port to TimeVal
* AutoTurn:
  * Fix it so that settings are actually honored.
  * Port to TimeVal
* BackgroundRunner: Port to TimeVal
* Calibre: Port benchmarking code to TimeVal
* BookInfoManager: Removed unnecessary yield in the metadata extraction subprocess now that subprocesses get scheduled properly.

* All in all, these changes reduced the CPU cost of a single tap by a factor of ten (!), and got rid of an insane amount of weird poll/wakeup cycles that must have been hell on CPU schedulers and batteries..
2021-03-30 02:57:59 +02:00
Frans de Jonge
7a925a3caf
Improve fit to … help text (#7462)
Cf. https://github.com/koreader/koreader/issues/7461#issuecomment-809582341
2021-03-29 20:32:38 +02:00
NiLuJe
e33476996a
Rotation icons: make 'em dynamic. (#7440)
Followup to #7306.

As discussed there, the only way to make everybody happy is to make 'em context-aware. At which point, trying to make the fact that it's a *device* rotation and not a *content* one come across in the icon design loses its interest, and would actually only further muddy the issue.

So, these are similar is spirit to the traditional rotation icons in pretty much anything that can rotate text content, with a special inspiration from the Kindle 4 & PocketBook UI.

Fix #7429
2021-03-29 05:12:22 +02:00
NiLuJe
f3341d9dc0
PdfDocument: Unbreak highlights (#7457)
Regression since #7411
Fix #7456
2021-03-29 05:11:02 +02:00
hius07
17129915f9
Standardize directory/folder to folder (#7410)
Follow-up to https://github.com/koreader/koreader/pull/7328
2021-03-28 13:35:56 +02:00
NiLuJe
dce8fa866a Bump base
https://github.com/koreader/koreader-base/pull/1340
2021-03-27 20:49:29 +01:00
NiLuJe
00eeb4b82b OPDSBrowser: Only update the title on plain navigation
Previously, it was updated with *acquisitions*, too, which was weird.
2021-03-27 20:49:29 +01:00
Frans de Jonge
81eb5f8c49
Add Lua 5.1 to sample Debubuntu apt-get command (#7421)
To ensure it gets installed.

Cf. <https://github.com/koreader/koreader/issues/7409#issuecomment-800267291>.
2021-03-27 10:41:01 +01:00
Frans de Jonge
a1e3eeabe7
Update translations for 2021.03 (#7450) 2021-03-27 10:40:34 +01:00
NiLuJe
b325fa4a50
Initial KOA3 support (#7446)
* Move MXCFB capchecks to front

The fact that this was halfway in front/halfway in base was weird and
mistake-prone (c.f., the amount of times I forgot to update one bit or
the other).

* Initial KOA3 support

Assume it's essentially a KOA2. Meaning no warmth handling for now.

* Bump base

https://github.com/koreader/koreader-base/pull/1339
https://github.com/koreader/koreader-base/pull/1338
2021-03-26 17:13:27 +01:00
poire-z
79f0b8a132
TOC settings: fix ticks disappearing (#7443)
Don't assume self.ticks is usable, but get them updated
with :getTocTicks(), even after a :resetToc().
2021-03-23 13:40:30 +00:00
Toromtomtom
3706196bfe
Update PDF annotations when changing bookmark text (#7411) 2021-03-23 10:31:52 +01:00
NiLuJe
dbb4bbbee4
Bump base again ;p. (#7438)
https://github.com/koreader/koreader-base/pull/1336
2021-03-21 22:44:13 +01:00
NiLuJe
bea04836c8
Bump base (#7437)
https://github.com/koreader/koreader-base/pull/1331
https://github.com/koreader/koreader-base/pull/1333
https://github.com/koreader/koreader-base/pull/1335
https://github.com/koreader/koreader-base/pull/1334
2021-03-21 20:39:15 +01:00
John Beard
70c79fd27d
Unbreak HTTP authentication (#7425)
Fixes a regression in #7405 that broke Basic auth (OPDS/WebDav).
2021-03-21 14:00:13 +01:00
NiLuJe
2944d53e7e
DictQuickLooup: Fix a few bad interactions with ReaderHighlight's dialog (#7432)
* Disable the Search button when docless and highlight-less.
* Make sure launching a Search closes ReaderHighlight's dialog in all cases. Fix #7430
2021-03-21 13:57:18 +01:00
NiLuJe
861214ce2a
Kobo: Allow toggling the WAIT_FOR_UPDATE_COMPLETE hack (#7431)
* Allow toggling the MXCFB_WAIT_FOR_UPDATE_COMPLETE bypass

* Drive-by: enable the abort_on_crash menu on Pb & rM, since they support
it
2021-03-21 10:56:21 +01:00
poire-z
932df881b4
TOC settings: fix possible crash (#7434) 2021-03-20 19:27:07 +01:00
Hzj_jie
1cd478fd70
Use PluginShare to share the keepalive state (#7416)
* use pluginshare to share keepalive state

* oops, formatting error
2021-03-17 15:00:34 -07:00
NiLuJe
29dbb98b8b
Bump base (#7412)
https://github.com/koreader/koreader-base/pull/1325
https://github.com/koreader/koreader-base/pull/1327 (re: #7411)
https://github.com/koreader/koreader-base/pull/1328
https://github.com/koreader/koreader-base/pull/1330
https://github.com/koreader/koreader-base/pull/1329 (fix #7340)
2021-03-15 05:48:10 +01:00
NiLuJe
2f9db25969
Unify LuaSocket usage (#7405)
* Add a new socketutil module with a few helper functions that allow us to:
  * Always use a sane User-Agent (previously, only Wikipedia did so)
  * Set timeouts in an almost sane manner. Doing it explicitly prevents an interaction with KOSync that does crazy stuff I don't even want to try to understand.
* Unified said timeouts based on the request's intended usage (except for Wikipedia, which already had meaningful timeout values).
* Stopped using LuaSec directly, LuaSocket defers to LuaSec sanely on its own. Everything now transparently supports HTTPS without code duplication.
2021-03-15 01:25:10 +01:00
hius07
89c0578c8d
SkimToWidget: swap '1' and '10' buttons (#7408)
More logical buttons allocation, increasing from left to right.
2021-03-14 00:10:30 +01:00
NiLuJe
41182349bc
Re-implement the PB fb fixup insanity (#7404)
* Re-implement the PB fb fixup insanity

It's apparently still necessary on a number of devices.
Fix #7072

* Bump base

(Fix FBInk on the same devices, for another reason).
2021-03-10 18:11:58 +01:00
NiLuJe
0b3747927c
WakeupMgr: Minor usage tweak (#7400)
* Unify logging with AutoSuspend (e.g., keep ourselves to showing the delay in seconds, not the raw timestamp, as that's way harder to interpret, and the RTC module and/or logger will do that for us when the time comes).
* Speaking of, minor revamp of RTC related logging to make it more human-readable.
* On Kobo, if we hit the unexpected wakeup limit, re-engage AutoSuspend's *suspend* check, so that the device has a chance to poweroff instead of being kept awake.
2021-03-10 02:21:02 +01:00
Glen Sawyer
3f0654f530
Hold "Wi-Fi" menu to show network selection instead of auto-connecting (#7395)
* Hold "Wi-Fi connection" to show network connection options.
* Honor backend connections (e.g., if wpa_supplicant found a matching AP in its own config first).
* When user clicks "Wi-Fi connection" in menu, only prompt if state is ambiguous.
2021-03-10 02:16:17 +01:00
NiLuJe
601d2fc3d2
Screensaver: Unbreak screensaver_stretch_images (#7403)
* Screensaver: Unbreak screensaver_stretch_images

We don't have real ternary operators in Lua, if the second argument evaluates to false, it doesn't work.
Invert the test to avoid this pitfall.
(c.f., http://lua-users.org/wiki/TernaryOperator).

Fix #7402, regression since #7371

* Free a few similar constructs (incidentally, some of 'em also tweaked in #7371 ^^).
2021-03-10 02:14:26 +01:00
NiLuJe
0674e6060a
Screensaver: Fix a fallback snafu (#7397)
* Screensaver: Don't assume a missing show_message setting means that type
setting is, too.
2021-03-08 06:30:14 +01:00
NiLuJe
08648d8870 Menu/KVP: Make sure icons are hidden when no items are to be shown.
Fix #7394
2021-03-08 01:29:29 +01:00
NiLuJe
681c00ecac Screensaver: Use the current ReaderUI instance if available.
Instead of always opening the document & docsettings twice...
2021-03-08 01:29:29 +01:00
NiLuJe
fba0b8eec7 Kobo: Refresh the system clock on resume.
Mimics Nickel's behavior, should fix #7092

Thanks to @gtalusan for the pointers ;).

Bump base

(https://github.com/koreader/koreader-base/pull/1322)
2021-03-08 01:29:29 +01:00
NiLuJe
48b0f2242c
OPDSBrowser: Unbreak test (#7393) 2021-03-07 00:05:41 +01:00
NiLuJe
bf6c0cdd6c
LuaSettings: Add a method to initialize a setting properly (#7371)
* LuaSettings/DocSettings: Updated readSetting API to allow proper initialization to default.
Use it to initialize tables, e.g., fixing corner-cases in readerFooter that could prevent settings from being saved.
(Fixes an issue reported on Gitter).
* LuaSettings/DocSettings: Add simpler API than the the flip* ones to toggle boolean settings.
* Update LuaSettings/DocSettigns usage throughout the codebase to use the dedicated boolean methods wher appropriate, and clean up some of the more mind-bending uses.
* FileChooser: Implement an extended default exclusion list (fix #2360)
* ScreenSaver: Refactor to avoid the pile of kludges this was threatening to become. Code should be easier to follow and use, and fallbacks now behave as expected (fix #4418).
2021-03-06 22:44:18 +01:00
Glen Sawyer
15ef1a3a1b
reMarkable 2 clean wakeup from sleep (#7345) 2021-03-06 21:03:20 +01:00
Georgelemental
053df60553
Account for result pagination when fetching notes or notebooks from Joplin API (#7162)
The Joplin Web Clipper API now paginates results for the APIs for fetching notes or notebooks

Iterate through Joplin API results in order
2021-03-06 19:32:56 +01:00
Martín Fernández
eb57c4e0da
Add a couple of modern android dicts (#7359)
https://play.google.com/store/apps/details?id=gaurav.lookuppro and its free version.

From https://www.mobileread.com/forums/showpost.php?p=4097548&postcount=8
2021-03-06 19:32:01 +01:00
yparitcher
78c34e60fa
FileSearcher: Do not crash on space, show unsupported files if enabled. (#7362) 2021-03-06 19:31:39 +01:00
Alex Vanderpot
7b2eba73ba
Do not include author in OPDS download filename if nil or empty (#7384) 2021-03-06 19:29:36 +01:00
Alex Vanderpot
ac26ccdc58
OPDS: Parse Open Search Definition for feeds that support it (#7380) 2021-03-06 19:29:15 +01:00