Commit Graph

9317 Commits (v2022.10)
 

Author SHA1 Message Date
Martín Fdez ee35257f99 update metadata & translations 2 years ago
Martín Fdez 17246f0534 fix update-metadata script 2 years ago
Frans de Jonge 6139aab167
Update translations for 2022.10 (#9670) 2 years ago
poire-z 3dbcccb1a8
TextViewer: correct keyboard layout after long-press on Find (#9668) 2 years ago
hius07 e3fd612518
ConfigDialog: fix a bug with default values (#9666) 2 years ago
hius07 60a16c7e00
configdialog: fix bug with default values (#9662) 2 years ago
weijiuqiao bb03cf7310
Chinese keyboard: fix harmless typo (#9633) 2 years ago
Benoit Pierre 1d6f4acad0
CoverBrowser: fix some button callback overrides (#9647)
Broken since b0eb0ce0: the custom callbacks for the "Reset settings"
& "Book information" buttons are not being called anymore because
patching those is done to early (before instead of after creating
the new modified dialog).
2 years ago
weijiuqiao effddbc1ee
zh_keyboard: make number pad symbol mode (#9654)
This PR makes zh_keyboard's number pad symbol mode instead of shift mode, so that numbers are shown when the keyboard is called expecting numeral input.
2 years ago
sonix-github ac79da05f4
[plugin] AutoStandby: Make "Update" string translatable (#9655) 2 years ago
bigdale123 cda419dd7a
OPDS-PS: Fix hardcoded namespace in count (#9650)
Turns out the namespace is dynamic, so, just look for ':count' and hope there won't be any conflicts ;).
2 years ago
zwim dbafcb0311
UnitTests: Nits and misspellings (#9629) 2 years ago
NiLuJe 23c410344b
UIManager: Minor code cleanup (#9641)
* Remove a check made redundant by #9617
* Bump base (https://github.com/koreader/koreader-base/pull/1538)
2 years ago
NiLuJe 741562e84c
Cleanup: Use Lua's native setvbuf wrapper instead of reinventing the wheel (#9636)
Sidenote for the crazy win32 people out there: it doesn't has a concept
of line-buffering, so native win32 should use "no" here, but I'm
*hoping* MinGW transparently handles this nonsense.
2 years ago
NiLuJe d9eb6e9717
Kobo: Always use open/write/close for sysfs writes (#9635)
Also simplifies a few UIManager log messages (re: https://github.com/koreader/koreader-base/pull/1537)
2 years ago
hius07 2a354912f4
buttondialogtitle: align upper borders (#9631) 2 years ago
sp4ke f3620b6d1f
Exporter plugin: allow adding book md5 checksum when exporting highlights (#9610)
This allows interoperability between different readers who want to
import highlights on different devices/file systems. All that is
needed then to import highlights is to match the local books and
their path based on the checksum.
2 years ago
weijiuqiao 7fc803ffee
Vocabulary builder: supports review in reverse order (#9605) 2 years ago
weijiuqiao ae8156ff9e Vietnamese keyboard: TELEX method backed by generic_ime 2 years ago
weijiuqiao 6a5a13dfc8 Generic keyboard IME bump: supports auto seperation when code is unique 2 years ago
yparitcher e424fcf5de
Dispatcher: Fix subtle bug with modified items being added twice to the sort index (#9628)
Discovered by @poire-z in https://github.com/koreader/koreader/pull/9531#issuecomment-1274839234
2 years ago
NiLuJe da65ac8b02
Cleanup various varargs shenanigans (#9624)
* Iterate over varargs directly via select if possible
* Use table.pack otherwise (https://github.com/koreader/koreader-base/pull/1535).
* This allows us to simplify a few Logger calls, as logger now handles nil values.
2 years ago
weijiuqiao 8508689cea
[feat] Add Thai keyboard (#9620)
This PR adds support for a Thai keyboard. Layout mostly copied from my phone, with difference in diacritics placements: phone has only one key for all of them, while here we have a couple more. Swipe in different directions needed for inputing them.
2 years ago
hius07 a728e3b5fa
ReaderStatus: save status summary (#9619) 2 years ago
zwim 4969811c08
Optimization: Use constant folding for divisions not a power of two (#9609) 2 years ago
zwim a24548ed3f
UIManager: Optimize binary insert (#9600)
* Optimiz
2 years ago
NiLuJe 68dcc4f36c
Bump base (#9618)
* Bump base (https://github.com/koreader/koreader-base/pull/1534)
* And some fixups following #9617
2 years ago
NiLuJe 6ac7a0cd40
UIManager: Fix handling of toast widgets in sendEvent (#9617)
The ultimate goal is for toast widgets (i.e., Notification when flagged as such) to:
  * Not stop event propagation
  * Close themselves when the event was emitted by user input.

Instead of doing event filtering in UIManager, we simply overload the onGesture & onKey* handlers in Notification to do just that, and just make sure UIManager will *send* those events to toasts, but without affecting the usual semantics of top widget selection and event propagation (which is as simple as just calling handleEvent on them unchecked ;p).

Thanks to @poire-z for the brainstorming in https://github.com/koreader/koreader/issues/9594 ;).

This also happens to fix a bug in which we might have looped on the top widget twice, because of an array vs. hash mishap ;).
2 years ago
NiLuJe ed96b15a3f
util: Add a set of binary searches implementation (#9614) 2 years ago
NiLuJe c9ff0071e3
DocSettings: Fix candidates sorting (#9607)
The candidates array had a very very very high chance of being sparse, which effectively broke the logic.
It was mostly harmless since said logic is only here for a long and varied history of backwards compatibility ;).
2 years ago
NiLuJe 718b136c9a Bump base
https://github.com/koreader/koreader-base/pull/1532
https://github.com/koreader/koreader-base/pull/1531
2 years ago
NiLuJe 2e1b40c997 ScreenSaver: When adding an overlay message to a top message, position
it *below* the top message, instead of *over* ;).
2 years ago
NiLuJe 5e6b783d27 ScreenSaver: Never inhibit the event message (reboot/poweroff), unless
specifically requested.

Using a custom message would effectively prevent the event message from
showing up, which is... bad.

(In fact, I'm half of the mind to get rid of the option to hide the
event messages, because it's a goddamned terrible idea).
2 years ago
NiLuJe a62f076e56 DictQuickLookup: The window_list array needs to be a static class member
Also, make sure references are actually dropped,
no matter how the widget is closed, by relying on onCloseWidget ;).

Enable the "long-press-on-close" trick on the actual Close button,
too, instead of only on the title bar's cross.

Fix: https://github.com/koreader/koreader/pull/9586#issuecomment-1272332275
2 years ago
NiLuJe 93ae341823
UIManager: Don't lose track of the original rotation on reboot/poweroff (#9606)
And, actually, stop enforcing Portrait; Screensaver already handles
rotation as necessary depending on the exact screensaver mode.

Fix https://www.mobileread.com/forums/showthread.php?t=349522
2 years ago
NiLuJe c0dffe2012
Kobo: Add a debug option to turn the charging LED on PM entry failure (#9601)
This should be fairly unintrusive, but still noticeable enough without having to watch the battery gauge like a hawk, or resort to actual monitoring via kernel logs and/or usb meter and/or multimeter...
2 years ago
NiLuJe 7e209139d5
Resync w/ base (#9604) 2 years ago
NiLuJe 958b0a7c99 You're doing it wrong, inputtext_spec... 2 years ago
NiLuJe eef938996f MultiDialog: Fix an extremely nasty API misuse
Stuff was poking at the class object, not the instance's :s.

Fix #9599
2 years ago
NiLuJe b1bcafa833 Persist: unbreak serialize for serpent 2 years ago
NiLuJe 39e0f84959 LuaDefaults: Simplify defaults.lua loading
Forget about the crazy filemanagersetdefaults shenanigans:
the previous code just did require("defaults"), so, $PWD it is ;).
2 years ago
yparitcher a916a5e8a2 Dispatcher: QuickMenu: Fix footgun
Fixes: #9594
2 years ago
NiLuJe ad22942108 LuaDefaults: Look for defaults.lua in $PWD first
As DataDir may not exist yet.

Fix #9593
2 years ago
NiLuJe 6cb8297362 Deal with macOS's libc shenanigans
Fix #9595
2 years ago
NiLuJe 5c24470ea9
Logger: Use serpent instead of dump (#9588)
* Persist: support serpent, and use by default over dump (as we assume consistency > readability in Persist).
* Logger/Dbg: Use serpent instead of dump to dump tables (it's slightly more compact, honors __tostring, and will tag tables with their ref, which can come in handy when debugging).
* Dbg: Don't duplicate Logger's log function, just use it directly.
* Fontlist/ConfigDialog: Use serpent for the debug dump.
* Call `os.setlocale(C, "numeric")` on startup instead of peppering it around dump calls. It's process-wide, so it didn't make much sense.
* Trapper: Use LuaJIT's serde facilities instead of dump. They're more reliable in the face of funky input, much faster, and in this case, the data never makes it to human eyes, so a human-readable format didn't gain us anything.
2 years ago
NiLuJe fadee1f5dc
Clarify our OOP semantics across the codebase (#9586)
Basically:

* Use `extend` for class definitions
* Use `new` for object instantiations

That includes some minor code cleanups along the way:

* Updated `Widget`'s docs to make the semantics clearer.
* Removed `should_restrict_JIT` (it's been dead code since https://github.com/koreader/android-luajit-launcher/pull/283)
* Minor refactoring of LuaSettings/LuaData/LuaDefaults/DocSettings to behave (mostly, they are instantiated via `open` instead of `new`) like everything else and handle inheritance properly (i.e., DocSettings is now a proper LuaSettings subclass).
* Default to `WidgetContainer` instead of `InputContainer` for stuff that doesn't actually setup key/gesture events.
* Ditto for explicit `*Listener` only classes, make sure they're based on `EventListener` instead of something uselessly fancier.
* Unless absolutely necessary, do not store references in class objects, ever; only values. Instead, always store references in instances, to avoid both sneaky inheritance issues, and sneaky GC pinning of stale references.
  * ReaderUI: Fix one such issue with its `active_widgets` array, with critical implications, as it essentially pinned *all* of ReaderUI's modules, including their reference to the `Document` instance (i.e., that was a big-ass leak).
* Terminal: Make sure the shell is killed on plugin teardown.
* InputText: Fix Home/End/Del physical keys to behave sensibly.
* InputContainer/WidgetContainer: If necessary, compute self.dimen at paintTo time (previously, only InputContainers did, which might have had something to do with random widgets unconcerned about input using it as a baseclass instead of WidgetContainer...).
* OverlapGroup: Compute self.dimen at *init* time, because for some reason it needs to do that, but do it directly in OverlapGroup instead of going through a weird WidgetContainer method that it was the sole user of.
* ReaderCropping: Under no circumstances should a Document instance member (here, self.bbox) risk being `nil`ed!
* Kobo: Minor code cleanups.
2 years ago
NiLuJe 7b9f02e1ac
GH: Extend the issue template to request verbose debug logs for non-crash issues. (#9585)
Because it's literally 90% of our first replies :/.
2 years ago
NiLuJe 68b26c3a36
Keyboards/Menu: Lazy-load the layout-specific menu (#9584)
And do so only for the active layouts.

This prevents loading a potentially large amount of data without even having navigated to said menu (or having the layout enabled).
2 years ago
hius07 1ea7e16f3e
Cloud storage: add Dropbox short-lived tokens (#9496) 2 years ago
yparitcher 8a754cd271 Dispatcher: Fixes, Sort & QuickMenu
Fix condition check, simplify getNameFromItem

Allow sorting Dispatcher items and displaying them as a QuickMenu
2 years ago