Commit Graph

10625 Commits (49a991e82fccbbddb92354eb79631fd7ade7666e)
 

Author SHA1 Message Date
David 49a991e82f
[TextViewer] Add hamburger menu to FocusManager and Menu key (#12365) 1 month ago
Benoit Pierre c2d58e525e
czmq & libzmq: update to 4.2.1 & 4.3.5 respectively (#12350) 1 month ago
Benoit Pierre 6de2a59bd8
bump base (#12360)
- https://github.com/koreader/koreader-base/pull/1900
- https://github.com/koreader/koreader-base/pull/1902
- https://github.com/koreader/koreader-base/pull/1903
- https://github.com/koreader/koreader-base/pull/1905
1 month ago
Benoit Pierre f586613f94 kodev: rewrite most of it
Factorize (options handling, target setup, …), add explicit
Android targets (`android-arm`, `android-arm64`, etc…).

build:
- support `--no-build` / `-b`: only run setup phase

check: simplify implementation (re-use `.ci/check.sh`)

cov & test:
- forward to makefile rules (no need to guess install directory)
- support `--no-build` / `-b`: use existing build

log:
- drop the target argument (since only Android is supported anyway)

prompt & wbuilder:
- forward to makefile rules (no need to guess install directory)
- support `--no-build` / `-b`: use existing build

release:
- support `--no-build` / `-b`: use existing build

run:
- forward to makefile rules (no need to guess install directory)
- correctly support relative arguments, and whitespace in arguments
- drop support for catchsegv: Glibc 2.35 (2022) dropped catchsegv and
  associated `libSegFault.so` shared library
- drop support for nemiver debugger: project is dead, last release
  was 8 years ago, repo is archived, and package has been dropped
  from newer Debian / Ubuntu releases
- support running an APK passed as argument when using `android` target
- rename short `-d`, `-h`, and `-w` options to `-D`, `-H` and `-W`
  respectively (to avoid conflicts with standard options)
- drop support for `-p` / `--graph` argument: code moved to a dedicated
  wrapper script (`tools/graph_memory.sh`) that can be used with the new
  `-w` / `--wrap` argument: `./kodev run -w tools/graph_memory.sh …`
- drop `--tui` argument when using GDB: said TUI does not cohabit well
  with KOReader console outputs (and cgdb is better fancy TUI anyway)
1 month ago
Benoit Pierre 9c70a3d6a9 kodev: error out if bash is too old 1 month ago
Benoit Pierre 93c7ceccd9 make: tweak emulator `test` rules
So `make --assume-old=all` can be used for both `testbase` & `testfront`.
1 month ago
Benoit Pierre b5c4ccc5b3 make: fix emulator `coverage` rule
- use same busted launch script as for tests
- build & install necessary test data so it can be run from scratch
1 month ago
Benoit Pierre 050c7a96ac make: add `run` rule for android targets 1 month ago
Benoit Pierre 387a9de305 make: add `run` rules for emulator targets 1 month ago
Benoit Pierre 59b533a83d make: move emulator specific rules to a dedicated file 1 month ago
hius07 20ac3c3489
Dispatcher: minor wording fixes (#12356) 1 month ago
NiLuJe a51bd7a7fd
Nit: Make some cache keys prettier (#12354)
Completely pointless commit because I got triggered by a missing pipe in a log ;).
1 month ago
David 3450aaba99
Bug Fix: DPad conflict on Kindle Keyboard (#12341)
* fix conflicting panning and content selection

* accurate keyboard info message
1 month ago
hius07 27e2efcbd2
Annotations: fix page numbers (#12324) 1 month ago
David f3c0af49c2
Support 'Ctrl' shortcuts on hasKeyboard (#12347) 1 month ago
Frans de Jonge 6eddc66516
[doc] Build: update Android instructions to openjdk-17-jdk-headless (#12345)
Closes #12344.
1 month ago
David d706a129fa
[Menu] Remove title bar buttons from layout on hasSymKey or hasScreenKB devices (#12328) 1 month ago
NiLuJe 4264d915b1
Kobo: Refactor suspend in order to be able to catch input events sent during the 2s window of ntx madness (#12330)
I don't even remember how badly things broke (at least on old devices) without it, despite it making absolutely no sense at all (state-extended just flips a global that dictates whether some things get flagged as wakeup sources or not).

So, don't rock the boat too much: we don't remove it, but instead of using a sleep, we use a task deadline instead, which ensures we'll keep processing input events in the right order in the meantime. We'll already have neutered input by this point, so we'll only process power events anyway.

That means that the only iffy things are potentially *when* and *where* we have to potentially cancel that task. Resume makes sense, of course, and we log an info message to make the log flow clear; but we also do so in suspend... just in case. With a warning log because that probably indicates something fishy went on.

Also cleanup the comments while I'm there, and actually rewrite the wakeup_count stuff properly so it could actually theoretically be used if ntx kernels were actually reliable. Spoiler alert: they're not, this is still horribly broken on at least Mk < 7. Works just fine on a Forma, though, so, yay.

Fix #12325
1 month ago
NiLuJe 59476d38f4
OTM: Unbreak #11999 (#12337)
Steps need to happen in chronological order, (mostly) always.

Fix https://github.com/koreader/koreader/issues/12326
1 month ago
NiLuJe 4689e4f257
ImageWidget: Don't attempt to pan if we haven't rendered the bb yet (#12331)
Input events from ImageViewer can be caught between it clearing an old
ImageWidget & instantiating a new one, but before the new one has had a
chance to actually render anything.

Fix #12327
1 month ago
Benoit Pierre de2a9d54f1 make: reword comment 1 month ago
Benoit Pierre 5fe0d4a4a2 make: fix missing android APK asset
Missing `module/version.txt` would trigger a "new install" on every launch.
1 month ago
hius07 c46578aece
BookInfo: rating, review (#12313) 1 month ago
Benoit Pierre bd4a651fbf make: improve android update
- out-of-tree luajit-launcher build: no leftovers after `make clean`
- use the luajit library compiled by base: no point wasting time
  building a second (different, possibly incompatible) version
1 month ago
Benoit Pierre ede4ca8b36 make: improve `fetchthirdparty` rule
- fix running `make` from new checkout
- fetch all submodules recursively (don't defer to base), including luajit-launcher
1 month ago
David 466971c0e2
ReaderFooter: add page-turn item (#12249) 1 month ago
zwim dc3b638378
TextWidget: allow numbers in setText and updateSize (#12310)
Closes #12318.
1 month ago
zwim 92de5821bb
[AutoWarmth] Delay front light actions after resume (#12315) 1 month ago
Benoit Pierre 2d2921032d
bump luajit-launcher (#12317)
- https://github.com/koreader/android-luajit-launcher/pull/495
- https://github.com/koreader/android-luajit-launcher/pull/500
- https://github.com/koreader/android-luajit-launcher/pull/501
- https://github.com/koreader/android-luajit-launcher/pull/503
- https://github.com/koreader/android-luajit-launcher/pull/503
1 month ago
NiLuJe cafa9c8251
Disable the legacy ReaderRotation module (#12309)
AFAICT, this has never worked since the KPV -> KOReader refactor, as it relies on a weird little DrawContext "feature", while the actually in-use rotation framework is handled via BlitBuffer.

That kludge pollutes *a lot* of both the backend and frontend code, so I plan to annihilate that in a followup PR.

See #12303 for more context
1 month ago
NiLuJe 46a5d20513
Document: Do not cache panel-zoom tiles to disk and fix their caching and rendering (#12303)
* Use a dedicated cache hash for partial tiles from panel-zoom
* Never dump them to disk, as it confuses DocCache's crappy heuristics that rewinds the cache to skip over the hinted page to try to dump the on-screen page to disk.
* Apply the zoom factor in the exact same way as any other page rect (i.e., floor coordinates, ceil dimensions), and make sure said rect is actually a Geom so it doesn't break the cache hash, which relies on Geom's custom tostring method for rects. Said scaling method *also* belongs to the Geom class anyway.
* Handle such pre-scaled rects properly in renderPage, so as not to apply the zoom factor to the full page, which would attempt to create a gigantic buffer.
* And now that the rect is rendered properly in an appropriately-sized buffer, use the rendered tile as-is, no need to blit it to another (potentially way too large because of the above issue) blank BB.
* The zoom factor is now computed for a scale to best-fit (honoring `imageviewer_rotate_auto_for_best_fit`), ensuring the best efficiency (ImageViewer won't have to re-scale).
* Cache: Reduce the maximum item size to 50% of the cache, instead of 75%.
* Warn about the legacy ReaderRotation module, as it turned out to be horribly broken. The whole machinery (which is spread over *a lot* of various codepaths) is left as-is, peppered with notes & fixmes hinting at the problem. Thankfully, that's not how we actually handle rotation, so it was probably hardly ever used (which possibly explains why nobody ever noticed it breaking, and that nugget possibly dates back to the inception of the kpv -> ko refactor!). (#12309)
1 month ago
Benoit Pierre 5daff2579b
bump base; mostly thirdparty bumps (#12311)
- https://github.com/koreader/koreader-base/pull/1885
- https://github.com/koreader/koreader-base/pull/1886
- https://github.com/koreader/koreader-base/pull/1887
- https://github.com/koreader/koreader-base/pull/1888
- https://github.com/koreader/koreader-base/pull/1889
- https://github.com/koreader/koreader-base/pull/1890
- https://github.com/koreader/koreader-base/pull/1891
- https://github.com/koreader/koreader-base/pull/1892
- https://github.com/koreader/koreader-base/pull/1893
- https://github.com/koreader/koreader-base/pull/1895
- https://github.com/koreader/koreader-base/pull/1896
- https://github.com/koreader/koreader-base/pull/1897
- https://github.com/koreader/koreader-base/pull/1898
1 month ago
David 2900eef276
Show/Hide Virtual keyboard and more keyboard shortcuts (#12162) 1 month ago
hius07 975efae929
ReaderSearch: "All text" improve (#12287) 1 month ago
Frans de Jonge 880b7c5ed1
Profiles: make sure to close menu/quickmenu before executing action (#12299)
Mainly a difference without distinction, but in some edge cases like screenshots it keeps the menu on the screen.
See <https://github.com/koreader/koreader/pull/12293#issuecomment-2269680044>.

The "Show as QuickMenu" is really just for balance; it makes little to no difference.
1 month ago
mbays fd8c9be57f MultiInputWidget: add addWidget 2 months ago
mbays 092649338b InputDialog: add setAllowNewline 2 months ago
mbays f122e0082b MultiInputDialog: add enter_callback applying to all fields 2 months ago
mbays b5203686e3 InputDialog: call edited_callback on edit even when no Save/Close buttons 2 months ago
NiLuJe 7e8cdbcf65
PowerD: Keep track of frontlight state change by interactive callers for suspend/resume purposes (#12283)
While #12256 papered over the tracking of a *single* suspend -> (resume->suspend) series of events, things still go out of sync if you tack on *more* suspend/resume events after that.

The upside is that our *actual* tracking of suspend/resume is solid, so at least we're actually doing the right thing as far as PM is concerned.

The downside is that on Kobo, the frontlight handling code is full of delays, and the ramping down/up itself also takes some time, so things can quickly overrun into the wrong event.

This means a couple of things:

* We need to cancel any scheduled frontlight toggles and ramps on Kobo, to ensure that only the one from the *last* event received goes through, in an attempt to limit the amount of potential crossover.
* Tracking fl_was_on *cannot* reliably be done from the suspend/resume handlers (especially on Kobo), as the ramps themselves may cross over the event barriers (and we potentially cancel the task anyway), so this was moved to the very few interactive callers that will actually change the frontlight state.
* On Kobo, crossover is still *somewhat* possible because the ramps take time. It's mostly harmless for the ramp down, we just need to tweak the ramp down to start from the actual intensity to avoid a weird jump on the initial step if there's an inconsistency. For the ramp up, we potentially need to manually kill the light first, because off -> on assumes it *really* starts from off ;).

Followup to #12256
Fix #12246 (again)
2 months ago
Frédéric Brière 9e6f3dac65
Panel zoom: Properly handle `renderPage()` not rendering the whole page (#12296)
When zooming to a small panel on a device with a large display, the
resulting zoom factor often causes `renderPage()` to only render the
panel itself instead of the whole page.  `getPagePart()` needs to
account for that when extracting the panel from the rendered tile.

Fixes half of #7961 (namely the black/half-black rectangles)
2 months ago
Benoit Pierre a6663202b7
NetworkMgr: fix debug trace (#12297)
Prevent crash:
```
./luajit: frontend/util.lua:1092: attempt to get length of local 'str' (a nil value)
stack traceback:
        frontend/util.lua:1092: in function 'fixUtf8'
        frontend/ui/network/manager.lua:1109: in function 'requestToTurnOnWifi'
[…]
```
2 months ago
Benoit Pierre f22e8bbbc2
doc: update building documentation (#12295)
Meson is now required.
2 months ago
David 3992438872
[CoverBrowser.MosaicMenu] Increase focus underline thickness (#12189) 2 months ago
poire-z 949b996ad7
Fix early unhighlight after Add to vocab builder (#12288)
Getting text from xpointers to get the current selected
word context would have crengine unhighlight that word.
Allow to get it selected again when done getting context.
2 months ago
ziz57 c213bd779c
ReaderUI: add `seamless` argument to switchDocument (#12290) 2 months ago
NiLuJe 030f4a15d4
ReadHistory: On remove, trust the index from FileManagerHistory if possible (#12253)
The item's idx field is based on the current view settings, so only trust it when there's no filtering or searches involved, which ensures the order matches the actual history array layout.
2 months ago
zwim f6f8b38cac
[plugin] Reader footer: check if header resp. footer are available (#12264) 2 months ago
Benoit Pierre 13cc21b769
make: fix android update sdcv (#12275)
Need the real stuff, not a symlink.
2 months ago
hius07 74e863c9bb
readerannotation: fix matchFunc (#12270) 2 months ago