2
0
mirror of https://github.com/koreader/koreader synced 2024-11-04 12:00:25 +00:00
Commit Graph

9267 Commits

Author SHA1 Message Date
hius07
c5505879c3
ConfigDialog: fix bug in DoubleSpinWidget default values (#9580) 2022-10-04 07:44:55 -04:00
hius07
b0eb0ce0e1
FileManager: add Select button to the file long-press menu (#9571) 2022-10-04 07:44:17 -04:00
poire-z
3bd27c3a76 ReaderFont: add "Font-family fonts" submenu
Allow associating a font to each of the generic
font-family names.

Bump crengine:
- CSS parsing: accept (and ignore) namesspaces
- isImage(): more checks for <object> as it can have inner content
- getFontFileNameAndFaceIndex(): returns if font has math support
- getFontFileNameAndFaceIndex(): returns if font has emojis
- CSS/Fonts: add support for font-family to font name mapping
2022-10-03 23:27:44 +02:00
poire-z
defd9d1e02 TouchMenu: add support for checkmark_callback
Allows having a toggable checkmark on menu items
leading to a sub-menu.
2022-10-03 23:27:44 +02:00
poire-z
137b39416f ReaderLink:showAsFootnotePopup(): remove some logger.info() 2022-10-03 23:27:44 +02:00
weijiuqiao
24edbe162f Vocabulary builder: support manually adding words to vocabulary builder 2022-10-03 01:23:00 +02:00
weijiuqiao
91e5123ff0 Chinese keyboard: character level deletion apply to the last 2 chars 2022-10-03 01:23:00 +02:00
zwim
82d1381d49
Documentation: Fix documentation of infomessage (#9577) 2022-10-02 20:24:00 +02:00
NiLuJe
9bf19d1bb3
Assorted bag'o tweaks & fixes (#9569)
* UIManager: Support more specialized update modes for corner-cases:
  * A2, which we'll use for the VirtualKeyboards keys (they'd... inadvertently switched to UI with the highlight refactor).
  * NO_MERGE variants of ui & partial (for sunxi). Use `[ui]` in ReaderHighlight's popup, because of a Sage kernel bug that could otherwise make it translucent, sometimes completely so (*sigh*).
* UIManager: Assorted code cleanups & simplifications.
* Logger & dbg: Unify logging style, and code cleanups.
* SDL: Unbreak suspend/resume outside of the emulator (fix #9567).
* NetworkMgr: Cache the network status, and allow it to be queried. (Used by AutoSuspend to avoid repeatedly poking the system when computing the standby schedule delay).
* OneTimeMigration: Don't forget about `NETWORK_PROXY` & `STARDICT_DATA_DIR` when migrating `defaults.persistent.lua` (fix #9573)
* WakeupMgr: Workaround an apparent limitation of the RTC found on i.MX5 Kobo devices, where setting a wakealarm further than UINT16_MAX seconds in the future would apparently overflow and wraparound... (fix #8039, many thanks to @yfede for the extensive deep-dive and for actually accurately pinpointing the issue!).
* Kobo: Handle standby transitions at full CPU clock speeds, in order to limit the latency hit.
* UIManager: Properly quit on reboot & exit. This ensures our exit code is preserved, as we exit on our own terms (instead of being killed by the init system). This is important on platforms where exit codes are semantically meaningful (e.g., Kobo).
* UIManager: Speaking of reboot & exit, make sure the Screensaver shows in all circumstances (e.g., autoshutdown, re: #9542)), and that there aren't any extraneous refreshes triggered. (Additionally, fix a minor regression since #9448 about tracking this very transient state on Kobo & Cervantes).
* Kindle: ID the upcoming Scribe.
* Bump base (https://github.com/koreader/koreader-base/pull/1524)
2022-10-02 03:01:49 +02:00
weijiuqiao
5d9f036331
Vocabulary builder: add Undo study status (#9528)
Adds button to undo last study operation (got it/forgot)
in more (...).
2022-10-02 02:03:23 +02:00
weijiuqiao
05aba404b7
Keyboard: add Chinese stroke-based layout (#9572)
Basically it uses 5 keys for 5 basic stroke types and
inputs characters by their stroke order.
See https://en.wikipedia.org/wiki/Stroke_count_method
2022-10-02 01:58:36 +02:00
NiLuJe
8fcc712c76
Kobo: Clara 2E fixes (#9559)
* Handle the power button input device
* Handle the charging LED properly
* Handle the new Wi-Fi chip properly
* Handle frontlight warmth adjustments
* Handle the battery gauge properly
* Bump base (a lot of third-party updates) [https://github.com/koreader/koreader-base/pull/1523]
* Bump android-luajit-launcher to match the LuaJIT update [https://github.com/koreader/android-luajit-launcher/pull/386]

Fix #9552 (many thanks to @Bartvelp for bearing with my stupid tests ;)).
2022-09-28 21:31:52 +02:00
NiLuJe
2420557085
DocCache: Unbreak on !Linux platforms (#9566)
Regression since #9529
Fix #9565
2022-09-28 01:19:00 +02:00
NiLuJe
4d48b6e2fe
Misc: Use the ^ operator instead of math.pow (#9550)
And some minor code simplifications, thanks to @zwim ;).
2022-09-28 01:11:34 +02:00
NiLuJe
62059f8d68
Misc: Get rid of the legacy defaults.lua globals (#9546)
* This removes support for the following deprecated constants: `DTAP_ZONE_FLIPPING`, `DTAP_ZONE_BOOKMARK`, `DCREREADER_CONFIG_DEFAULT_FONT_GAMMA`
* The "Advanced settings" panel now highlights modified values in bold (think about:config in Firefox ;)).
* LuaData: Isolate global table lookup shenanigans, and fix a few issues in unused-in-prod codepaths.
* CodeStyle: Require module locals for Lua/C modules, too.
* ScreenSaver: Actually garbage collect our widget on close (ScreenSaver itself is not an instantiated object).
* DateTimeWidget: Code cleanups to ensure child widgets can be GC'ed.
2022-09-28 01:10:50 +02:00
hius07
46f729c248
ConfigDialog: show button with default values in spinwidgets (#9558) 2022-09-25 08:37:22 -04:00
hius07
46cdf8ed78
TextViewer: add navigation buttons (#9539) 2022-09-22 08:46:15 +02:00
NiLuJe
b0d8919399
ImageViewer: Followup to #9529 (#9544)
* ImageViewer: Minor code cleanups
* GestureDetector: Fix the `distance` field of `two_finger_pan` & `two_finger_swipe` gestures so that it's no longer the double of the actual distance traveled. Get rid of existing workarounds throughout the codebase that had to deal with this quirk.
2022-09-21 23:26:22 +02:00
NiLuJe
ab4b4b31bd
Kobo: Initial Clara 2E support (#9545)
Will need an actual tester to confirm FBInk gets the rotation right, as well as the touch input & frontlight situation.

* Bump base

https://github.com/koreader/koreader-base/pull/1519
https://github.com/koreader/koreader-base/pull/1521
2022-09-21 23:25:36 +02:00
hasezoey
a3fda69dd4
chore: update "platform/android/luajit-launcher" (#9541)
See https://github.com/koreader/android-luajit-launcher/pull/382
2022-09-21 11:30:33 +02:00
poire-z
a8c81a90c3
ReaderDict: fix use of dicts with ifo with DOS line endings (#9536)
Fixed in upstream sdcv, but we need to also do it in
our parsing of .ifo and picking out dict name.
Also includes minor bump of base/sdcv.
2022-09-21 00:26:10 +02:00
hius07
45e4f38c41
CloudStorage: remove cloudmgr (#9532)
Use downloadmgr instead.
2022-09-20 11:54:57 +02:00
NiLuJe
38919c22eb
ImageViewer: Clamp zoom factor to sane values (#9529)
Should avoid egregious values that would potentially alloc insanely large buffers (and likely fail to do so).

In the process, tweak the scale_factor computations when zooming so as to produce slightly less annoying behavior.
2022-09-19 23:25:18 +02:00
hius07
b81a407690
Profiles: add QuickMenu (#9526) 2022-09-17 18:11:03 -04:00
NiLuJe
83a2965d6b
Misc: Unify error logging on network errors (#9523)
Making sure we get the relevant information in the logs, and that the UI feedback (if any), is meaningful and readable.
2022-09-17 00:08:00 +02:00
zwim
6cb352bc03
AutoWarmth: nit (#9525) 2022-09-16 20:23:41 +02:00
hasezoey
c8d84ffc77
Version::getShortVersion: handle "rev" being empty (#9502)
In which case we reply "unknown" instead of an empty string ;).
2022-09-16 17:45:42 +02:00
hasezoey
61415a3723
add custom mapping for tolino buttons (#9509) 2022-09-16 12:42:45 +02:00
NiLuJe
2fe2515ace
FontList: Always use the binary cache format (#9519)
Since I never actually needed to look into that data ever until today, let's just get rid of the weird debug-specific behavior.

Instead, just add a dedicated "Developer options" entry that will dump it on demand (and it'll be sorted to boot, which makes it 500% more usable).

Plus, since yesterday's change, the cache format switch between debug or not miiiight actually be crashy, so re-trigger the migration ;p.

* Includes a couple of noteworthy base bumps:

https://github.com/koreader/koreader-base/pull/1516 (update to sdcv 0.5.4 + fixes pending upstream)
https://github.com/koreader/koreader-base/pull/1517 (fix ffiUtil.orderedPairs with keys of mixed types)
2022-09-15 04:42:13 +02:00
Hannes Krumbiegel
29985c9c5c
Add Russian Wiktionary dictionary (#9517)
This adds a Russian-Russian dictionary that I created, extracted from Wiktionary.
2022-09-14 21:28:12 +02:00
NiLuJe
13e8213e0a
A random assortment of fixes (#9513)
* Android: Make sure sdcv can find the STL
* DocCache: Be less greedy when serializing to disk, and only do that for the *current* document ;).
* CanvasContext: Explicitly document API quirks.
* Fontlist: Switch the on-disk Persist format to zstd (it's ever so slightly faster).
* Bump base for https://github.com/koreader/koreader-base/pull/1515 (fix #9506)
2022-09-14 03:49:50 +02:00
hius07
e89d856ad9
textboxwidget: add math.floor (#9516) 2022-09-13 19:04:03 -04:00
hius07
56388aa491
TextViewer: add Find (#9507) 2022-09-13 17:09:49 -04:00
poire-z
c3cd88e019 Wikipedia EPUBs: keep math SVG images 2022-09-12 00:40:08 +02:00
poire-z
8ff55b9c94 RenderImage: use crengine to render SVG image data
Mostly only used when rendering cover and wikipedia images.
Our SVG icons are still rendered with renderSVGImageFile()
and libkoreader-nnsvg.so (NanoSVG).
2022-09-12 00:40:08 +02:00
poire-z
76a7d83079 CRE/ImageViewer: get scaled blitbuffer when long-press on SVG
Get a Lua userdata wrapping a crengine LVSvgImageSource object
when long-press on a SVG image, and have crengine/LunaSVG render
it smoothly scaled to the requested size by ImageViewer.
2022-09-12 00:40:08 +02:00
poire-z
1c44c4c584 bump crengine: better SVG support with extended LunaSVG
Build crengine against LunaSVG instead of NanoSVG.
Includes:
- SerialBuf: allow serializing longer strings
- Support '<img src="data:image/svg+xml,<svg...', remove ;-cr-plain,
- CSS: attribute selectors: accept ' or " as the quote char
- Embedded fonts: fix ignored name when sharing same url
- LVImg: fix possible crash on GIF images
- Fonts: DrawTextString(): allow collecting glyphs as SVG paths
- Images parsing: cache native sizes
- SVG: enhanced SVG support with LunaSVG extended
- Add ldomNode::isImage(), handle <object> and <embed> as images
- Handle the <svg> element as an SVG image
- Support SVG images as first class documents

Make credocument the preferred engine for .svg files.
2022-09-12 00:40:08 +02:00
poire-z
087f605fd9 Allow F5 key to reload document 2022-09-12 00:40:08 +02:00
zwim
813bbe2ec9
AutoWarmth: add a choice to control warmth and/or night mode (#9504) 2022-09-11 19:31:36 +02:00
NiLuJe
faf240f481
Bump koreader-fonts to unbreak FreeFonts (#9508)
Fix #9475

https://github.com/koreader/koreader-fonts/pull/17
2022-09-11 19:08:35 +02:00
zwim
6f5c229c90
[UIManager] Outsource device specific event handlers (was: some nits) (#9448) 2022-09-10 13:45:31 +02:00
NiLuJe
e051d3d703
Kobo: Fix a few bad interactions between suspend & checkUnexpectedWakeup (#9499)
* Kobo: Make sure checkUnexpectedWakeup won't run between scheduled
suspend calls

Because of the suspend_wait_timeout, a previously scheduled check *could* shortcircuit a suspend scheduled a tiny bit later by a real Power event.
This led to fun breakage when you plugged/unplugged a "sleeping" device, for instance.

Fix #9457

* And clear up the unexpected_wakeup_count semantics

Bits of an older design seeped through and were causing weird corner-cases...
2022-09-10 01:56:01 +02:00
zwim
d972b7fcfa
[core] Remove a bunch of superflous semicolons (#9449) 2022-09-08 21:52:06 +02:00
NiLuJe
96930f230f
Add "Invert page turn buttons" to Dispatcher (#9494)
Fix #9492
2022-09-08 04:19:34 +02:00
NiLuJe
8de4e8d785
Kindle: Attempt to deal with sticky "waking up" hibernation banners (#9491)
Fix #9482
2022-09-06 23:05:00 +02:00
NiLuJe
1ac35cb865
Input: Minor simplification for the Mk. 3 input quirk (#9481)
I was afraid that ABS_PRESSURE could be sent out of order, but that appears to never be the case, so we can simplify the code a bit :}.
2022-09-05 22:44:06 +02:00
yparitcher
02ce99b231
Build: Make sure the STL has proper permissions (#9478) 2022-09-05 06:04:52 +02:00
NiLuJe
1b14ee36b3
Kobo: Fix input on Mk. 3 (i.e., Kobo Touch A/B). (#9474)
* Kobo: Discriminate between the Touch A/B and the Touch C properly, and implement actual support for the A/B input quirks. This means the clunky touchscreen probe widget shown on fresh installs on those devices is now gone :}.
* Input: Fix an off-by-one in most adjustTouchMirrorX/Y callers (only rM was doing it right), and adjust their documentation to avoid similar mistakes in the future.
* GestureDetector: Unify logging to always display transformed coordinates for simple gestures.
* GestureDetector: Fix two-contact hold lifts to be computed at the midpoint between the two contacts, like their holds counterpart already did.
2022-09-04 23:38:13 +02:00
NiLuJe
0967098a0d
Ship the STL if need be (#9470)
c.f., https://github.com/koreader/koreader-base/pull/1513 for the gory details ;).
2022-09-04 17:17:08 +02:00
NiLuJe
49e5200c8a
Kobo: Unbreak touch input on fresh setups on Trilogy (#9473)
By making sure we setup the right evdev parser first ;).
2022-09-04 03:33:07 +02:00