Commit Graph

8376 Commits (9f097da4f0c9f5b1e695e61fd556b31f9030d8bc)
 

Author SHA1 Message Date
gbyl d3f3e37f23
hidden setting: highlight lighten factor (#7497) 3 years ago
NiLuJe e4adcdf422 ReaderHighlight: Allow customizing the highlight lightening factor.
Followup to #7497
3 years ago
NiLuJe 01224e5f49 Hide the zoom spiel when swicthign to continuous mode with reflow
enabled.

Zoom modes are disabled w/ reflow since #7463

Fix #6572
3 years ago
hius07 aef1e271b5
[UX] Search dialogs: don't close when searching with nothing entered (#7501)
File search, Fulltext search, Search dictionary, Search Wikipedia, DictQuickLookup: do nothing when nothing entered and search is pressed.
3 years ago
zwim 10922561dd
Add update of the top and bottom status bars, on +/-Charging (#7379) 3 years ago
Frans de Jonge 627065c354
Add a period (#7493) 3 years ago
NiLuJe cbfcb2373d
ScreenSaver: Get rid of automagic settings (#7496)
By which I mean, explicitly initialize default settings, making everything seven hundred billion percent less weird.

Also, split the background option between image and (solo) message, because the defaults for those are different, and trying to twist the one into the other was leading to pure madness.
3 years ago
NiLuJe 03e9fac156
Input: Process input events in batches (#7483)
Requires https://github.com/koreader/koreader-base/pull/1344 & https://github.com/koreader/koreader-base/pull/1346 (fix #7485)

Assorted input fixes:

* Actually handle errors in the "there's a callback timer" input polling loop.
* Don't break timerfd when the clock probe was inconclusive.

Not directly related, but noticed because of duplicate onInputEvent handlers:

* HookContainer: Fix deregistration to actually deregister properly. "Regression" extant since its inception in #2933 (!).
* Made sure the three plugins (basically the trio of AutoThingies ;p) that were using HookContainer actually unschedule their task on teardown.
3 years ago
poire-z 25aabd69d9 Style tweaks: remove "Toggle alternative EPUB content"
With MathML support, this is no longer all or nothing.
As it's quite rare and technical, let this be handled
via user style tweaks.
3 years ago
poire-z bc5881668e TOC: highlight first chapter on page instead of last
So its in sync with the chapter shown in the footer,
which was previously fixed with a482baac.
3 years ago
poire-z fbb4f21720 Notifications: add some top margin
68a5fcdb moved them a bit to near the top than before,
and it can overlap with CRE rendering progress bar.
Also makes it nicer when multiple notications are stacked.
3 years ago
poire-z 247085ad3e Font menu: open on page with currently selected font
Generic feature added to TouchMenu: an optional callback
'open_on_menu_item_id_func()' set on an items table can
tell which menu item should be shown when opening a menu.
TouchMenu: allows jumping to first or last page with
long-press on the chevrons.
3 years ago
Steady Quad 8fb6ae715b
Update tests in opds_spec for Gutenberg http → https (#7489)
See #7439
3 years ago
hius07 052e19ead5
Standardize search/find to search (#7398)
* Change 'Find a file' to 'File search' for consistency

There is 'File search' in the Gesture manager already.
There is 'Fulltext search' in the readermenu.
Some help text added.
3 years ago
zwim 6d6760c2b3
bump luajit-launcher (#7480) 3 years ago
zwim c19a449c62
bump base (#7481) 3 years ago
hius07 b907386933
Fulltext search: show notification when nothing found (#7436) 3 years ago
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
3 years ago
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).
3 years ago
NiLuJe dfc9d16a19
ScreenSaver: Fix default settings (#7479)
* ScreenSavers: Fix default settings

Awesome typo ;D.
3 years ago
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`.
3 years ago
NiLuJe de543b3484
Statistics: Properly initialize default settings. (#7471)
* Statistics: Properly initialize default settings.

Regression since #7371
Fix #7470
3 years ago
NiLuJe 766ec91a84
ReaderFooter: Workaround a bad interaction with ReaderHighlight (#7466)
Related to hold handlers.

Fix #7464
3 years ago
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/>.
3 years ago
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
3 years ago
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
3 years ago
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).
3 years ago
NiLuJe 1f15184bbb
Kindle: Fix gyro events on Zelda (#7459)
* Kindle: Fix gyro event on Zelda

Like on Kobo, only honor the face-up events.
3 years ago
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..
3 years ago
Frans de Jonge 7a925a3caf
Improve fit to … help text (#7462)
Cf. https://github.com/koreader/koreader/issues/7461#issuecomment-809582341
3 years ago
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
3 years ago
NiLuJe f3341d9dc0
PdfDocument: Unbreak highlights (#7457)
Regression since #7411
Fix #7456
3 years ago
hius07 17129915f9
Standardize directory/folder to folder (#7410)
Follow-up to https://github.com/koreader/koreader/pull/7328
3 years ago
NiLuJe dce8fa866a Bump base
https://github.com/koreader/koreader-base/pull/1340
3 years ago
NiLuJe 00eeb4b82b OPDSBrowser: Only update the title on plain navigation
Previously, it was updated with *acquisitions*, too, which was weird.
3 years ago
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>.
3 years ago
Frans de Jonge a1e3eeabe7
Update translations for 2021.03 (#7450) 3 years ago
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
3 years ago
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().
3 years ago
Toromtomtom 3706196bfe
Update PDF annotations when changing bookmark text (#7411) 3 years ago
NiLuJe dbb4bbbee4
Bump base again ;p. (#7438)
https://github.com/koreader/koreader-base/pull/1336
3 years ago
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
3 years ago
John Beard 70c79fd27d
Unbreak HTTP authentication (#7425)
Fixes a regression in #7405 that broke Basic auth (OPDS/WebDav).
3 years ago
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
3 years ago
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
3 years ago
poire-z 932df881b4
TOC settings: fix possible crash (#7434) 3 years ago
Hzj_jie 1cd478fd70
Use PluginShare to share the keepalive state (#7416)
* use pluginshare to share keepalive state

* oops, formatting error
3 years ago
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)
3 years ago
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.
3 years ago
hius07 89c0578c8d
SkimToWidget: swap '1' and '10' buttons (#7408)
More logical buttons allocation, increasing from left to right.
3 years ago