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

10736 Commits

Author SHA1 Message Date
Benoit Pierre
88aea09f73
input: fix pocketbook init (#12555)
Regression from #12486.
2024-09-25 21:17:30 +02:00
David
08205c47c8
[ReaderFooter] Update status bar in real time when inverting page turning (#12424) 2024-09-25 21:16:06 +02:00
Benoit Pierre
beaad4d337
input: fix kobo init (#12553)
I missed converting one call of `Input.open` to a method call in #12486.
2024-09-25 20:16:25 +02:00
Benoit Pierre
c6dc34b937
small base bump (#12550)
- https://github.com/koreader/koreader-base/pull/1936
- https://github.com/koreader/koreader-base/pull/1937
2024-09-25 11:40:11 +02:00
Benoit Pierre
a4a04ac356
ci/circle: fix tests parallelism (#12551)
Use `BUSTED_OVERRIDES`, as `BUSTED_SPEC_FILE` was
removed in 93c7ceccd9.
2024-09-25 08:10:40 +02:00
Benoit Pierre
72b7a1a92a sdl: use versioned library for the AppImage 2024-09-24 16:08:58 +02:00
Benoit Pierre
0c0d2ab9f1 input: drop use of ffi/input
Get rid of the weird interaction between device implementations,
`ffi.util` (`isSDL`, `noSDL`) and the device input code: each
device knows if it's using SDL or not, so rely on that to load
the right underlying input implementation.
2024-09-24 16:08:58 +02:00
Benoit Pierre
283c764351 sdl: minor cleanup; remove dead code 2024-09-24 16:08:58 +02:00
hius07
e15c1abe8b
Statistics: fix null terminated strings, add toggle stats (#12547)
(1) Followup to koreader/koreader-base#1921, #12503: when getting a pdf book id in the stats db, check for old records with null terminated authors and title.
Discussed in #11318. There are some other reasons for disappearing old stats for pdf (md5 changes when converting/writing to pdf or something else), hence not closing the issue.
(2) Add Dispatcher action for toggling statistics. Closes #11422.
2024-09-23 20:46:20 +02:00
Benoit Pierre
ca569c1355
bump base (#12543)
- https://github.com/koreader/koreader-base/pull/1932
- https://github.com/koreader/koreader-base/pull/1933
- https://github.com/koreader/koreader-base/pull/1934
- https://github.com/koreader/koreader-base/pull/1935
2024-09-22 20:17:49 +02:00
Frans de Jonge
776cc21f1d
Bump luajit-launcher for Onyx Boox Go 10.3 support (#12533)
https://github.com/koreader/android-luajit-launcher/pull/509
2024-09-19 18:30:01 +02:00
Frans de Jonge
7ee598c667
Revert "Profiles: make sure to close menu/quickmenu before executing action (…" (#12534)
This reverts commit 880b7c5ed1.
2024-09-19 18:29:25 +02:00
ElimGarak1
6dcafb329a
Add PocketBook Verse Pro Color (PB634K3) (#12476) 2024-09-18 20:07:05 +02:00
weijiuqiao
2e6407357d
VocabBuilder.koplugin: save dict headword as entry (#12530)
Closes #12529.
2024-09-18 18:54:09 +02:00
NiLuJe
3401bed3d1
Kindle: Restore hall effect sensor state on startup (#12521)
Fix #11744
2024-09-18 15:06:23 +02:00
NiLuJe
03aa96dc7d optionsutil: Document optionsutil.showValues
Specifically, the whole unit interactions ;).
2024-09-16 17:12:43 +02:00
NiLuJe
e887be693f optionsutil: Simplify the public formatFlexSize wrapper
Pull the dimension_units from in there,
instead of asking callers to do that.
2024-09-16 17:12:43 +02:00
NiLuJe
3cbd75b385 ReaderTypeset: Use formatFlexSize in onSetPageMargins
Instead of enforcing px.

Also decouple the footer from the bottom margin report to make things
clearer given this change.
2024-09-16 17:12:43 +02:00
NiLuJe
e47aeb77b7 optionsutil: Switch to PostScript point
Because that's what most people are probably thinking of.

But, more importantly, it's what *FreeType* assumes ;).
2024-09-16 17:12:43 +02:00
NiLuJe
9dfd4f949c CREOptions: Simplify a few name_text_hold_callback calls when we want to
display a size unit

Rely on `name_text_unit` instead of wrapping `optionsutil.showValues`
2024-09-16 17:12:43 +02:00
NiLuJe
cd0d8ca8bd UI: Support appending the value in pixels when formating metric/imperial dimensions 2024-09-16 17:12:43 +02:00
NiLuJe
f8890a310d optionsutil: Rename real_size_string to formatFlexSize, and make it public
Use it in the ReaderView:onPageGapUpdate notification, instead of
enforcing "px" there.
2024-09-16 17:12:43 +02:00
NiLuJe
d537ef5c76 UI: Expand the "Units" configuration menu to include "Pixels"
Rename it to "Dimension units", and make it a radio submenu.

Migrate the previous metric_length setting to this new dimension_units
one.

Update optionsutil to follow it.
2024-09-16 17:12:43 +02:00
NiLuJe
77b6ef785a koptoptions: Stop making page gap a special snowflake
Use the user-preferred display unit for dimensions.
2024-09-16 17:12:43 +02:00
NiLuJe
7239cf391d optiuonsutil: unbreak real_size_string
Don't mangle string input values when a unit was passed.
(i.e., keep displaying them as their actual string instead of as nil).

(e.g., when current is set to a number, but default is still unset,
which translates to "not set" in showValues).
2024-09-16 17:12:43 +02:00
NiLuJe
9333843919 optionsutil: tweak showValuesHMargins text string
Attempting to align the numbers on the same column was a fool's errand.
Our default UI font is not monospaced, to begin with,
and to do it right, we'd need to align the rightmost number, not the
leftmost ;).

i.e., T() would need to have much fancier justification capabilities ;).
Or, err, *any* text justification features, really ^^.
2024-09-16 17:12:43 +02:00
NiLuJe
da2957392a optionsutil: Refactor size conversion/printing
DRYer, simpler. Will make it easier to make "px" a real viable display
format.
2024-09-16 17:12:43 +02:00
NiLuJe
65ce72df27 KOptOptions: Make Page Gap a buttonprogress instead of a toggle
We want to be able to set a custom value (i.e., more_options),
because on high-dpi devices, the scaling can lead to pretty large
differences; but more_options on a toggle is ugly and clunky.

So, switch to something more suited to what this actually sets,
which is ultimately an absolute pixel value, like margins.

Add a few more steps on the low end to fill out the bar (and because
that's where I found them most useful on high-dpi devices).
2024-09-16 17:12:43 +02:00
NiLuJe
af51bfafad ReaderView: Fix onPageGapUpdate
The input value should go through Screen:scaleBySize(), as in onReadSettings

Otherwise, choosing an option from ConfigDialog leads to different
results than on document open, as one is scaled, but not the other.

Issue extant since the inception of page gap configuration,
way back in #5705

(The intended and correct behavior if of course to scale this, e.g., the
setting is a "koreader flex pixel", not an absolute actual px value ;).
2024-09-16 17:12:43 +02:00
NiLuJe
a55b1038d7 optionsutil: Make sure showValues can actually use the real_size_string helper effectively
configdialog doesn't actually pass a unit argument to
name_text_hold_callback, so pull it instead from a new name_text_unit
field.

Expand said helper to support a "px" unit, which simply converts from
our arbitrary pixels to actual on-device pixels (e.g., a plain
scaleBySize).

Enable real_size_string usage when name_text_true_values is set
(it's a NOP in terms of the generated string if no unit is specified).
2024-09-16 17:12:43 +02:00
NiLuJe
da74691515
Chore: Don't cache static data tables (ui/elements, ui/data, kb layouts & co) (#12519)
Using `require` didn't make much sense since most of them are only used in a single place anyway, and it takes care of a few weird interactions in the process (besides not polluting `package.loaded` with useless crap ;)).
2024-09-16 17:11:42 +02:00
NiLuJe
aa6cadb1ee
SyncService: Only require online connectivity when using Dropbox (#12520)
Aligns with the CloudStorage behavior.

Fix #12518
2024-09-16 17:10:45 +02:00
hius07
bf290e0c2b
Write highlights into PDF: revisited (#12509) 2024-09-14 15:21:26 +03:00
weijiuqiao
33525a80a0
VocabBuilder.koplugin: better handling of word context (#12469)
Closes #12465.
2024-09-14 14:09:49 +02:00
weijiuqiao
04aa0cbde3
CloudSync: handles potentially incompatible backup and incoming dbs (#12470)
This pr removes the backup db (sync db) of the cloud syncing strategy when a different server location is used. This is to avoid the situation when later incoming db is not based on previously uploaded sync db.
2024-09-14 14:08:03 +02:00
hius07
d3beecd3f5
ReaderAnnotation: skip old highlights with invalid xpointers (#12494) 2024-09-14 11:17:26 +03:00
NiLuJe
57ceaf3f07 SetDefaultsWidget: Don't crash on unknown custom keys
Just warn about it in the logs.
This will only show up when opening the advanced settings UI, so we'll
keep it for now instead of *also* deleting the offending kv pair,
for the sake of not randomly destroying user content...
2024-09-11 13:20:39 +02:00
NiLuJe
89cceee9f1 Defaults: Deprecate DKOPTREADER_CONFIG_DOC_LANGS_TEXT
It's unused since #11977, dropping it ensures we no longer show it in
the advanced settings UI.
2024-09-11 13:20:39 +02:00
Benoit Pierre
7ff40a3412
bump base (#12503)
- https://github.com/koreader/koreader-base/pull/1921
- https://github.com/koreader/koreader-base/pull/1922
- https://github.com/koreader/koreader-base/pull/1923
- https://github.com/koreader/koreader-base/pull/1924
- https://github.com/koreader/koreader-base/pull/1926
- https://github.com/koreader/koreader-base/pull/1927
- https://github.com/koreader/koreader-base/pull/1928
- https://github.com/koreader/koreader-base/pull/1930
- https://github.com/koreader/koreader-base/pull/1931

Close #12462, #12473.
2024-09-10 18:36:08 +02:00
cccslater
94c57b9f42
[NT] Call GotoViewRel for page up/down on useDPadAsActionKeys devices (#12495)
Page buttons call `GotoViewRel` again (not `GotoPosRel`). Fixes https://github.com/koreader/koreader/issues/12380
2024-09-09 21:17:48 +02:00
David
5b2cc5f632
Doc: Update quickstartguide on kindle non touch (#12426) 2024-09-09 14:40:17 +02:00
David
adbf3be6ec
[Dispatcher] new events for selecting links (#12474) 2024-09-07 20:53:14 +02:00
hius07
5476301034
ButtonDialogTitle: remove (#12394) 2024-09-07 20:11:35 +03:00
hius07
7572a812cc
Highlights popup dialog: add "Color" and "Details" buttons (#12461) 2024-09-07 17:56:40 +03:00
NiLuJe
ffc4929504
ReaderHighlight: Fix an old typo in the OCR help string (#12479)
Noticed while triaging #12478 ;)
2024-09-07 16:23:56 +02:00
NiLuJe
f8df76e5c4
misc: Move cleanupSelectedText to util (#12477)
Instead of duplicating it across ReaderHighlight, languagesupport, and potentially VocabBuilder.

Re: #12469
2024-09-06 23:06:28 +02:00
NiLuJe
8f5215abfd
ReaderView: Fix a couple of edge-cases in onReaderFooterVisibilityChange (#12466)
Namely, it trips a `recalculate` that snaps `visible_area` to `page_area` edges (depending on zoom/reading direction), while we do *NOT* actually want to move the view, just increase/decrease its height ;).

(This *might* happen more reliably than it used to since https://github.com/koreader/koreader/pull/11425 & https://github.com/koreader/koreader/pull/11557)

Also deal with scroll mode while I'm here, as recalculate doesn't affect scroll mode at all, since that uses an *array* of on-screen pages, each with their own visible_area, page_area & state.

Fix #12454
2024-09-06 15:28:35 +02:00
David
802a906870
[Dispatcher] add [missing] conditions to dispatcher items (#12453)
* add [missing] conditions to dispatcher items

* add book map to NT supported devices
2024-09-05 20:07:35 +02:00
Ichnilatis
00984ba6bc
Keyboard: update el_popup.lua (#12463)
Some minor changes for consistency.
2024-09-04 15:31:30 +02:00
NiLuJe
ae5222b97a
InputText: Unbreak onTapTextBox on an already in-focus field (#12449)
The drive-by fix for the original issue noticed late in #12361 turned out to be a bit heavy-handed ;).

Fix #12444
Regression since #12361
2024-09-02 23:38:57 +02:00