Commit Graph

27 Commits (master)

Author SHA1 Message Date
hius07 fe7b10f18d
Datastorage: do not create unnecessary folders (#10162) 1 year ago
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)
2 years ago
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.
2 years ago
NiLuJe 6dc1c1efca Unbreak ReaderFooter test
Tests: Update the ffi.metatype wrapper

(Better idea: move to busted master).
3 years ago
poire-z 962fd02c98
Tame BackgroundRunner: stop running when no more job (#6605)
A BackgroundRunner plugin instance will stop running
(rescheduling a check every 2 seconds) when there is no
(or no more) job to run.
Clients of this service now have to emit an event after
adding a job into PluginShare.backgroundJobs, so an
already loaded but stopped BackgroundRunner can notice
it and start running again.
4 years ago
Frans de Jonge 27ddd6f313
[spec] Better insulation (#4972)
Some combination of Travis and/or older Busted necessitated insufficient insulation.

Follow-up to https://github.com/koreader/koreader/pull/4970

Space condensing carried over; reset at the start of readertoc.
5 years ago
Qingping Hou 080c079d01 chore: add test for screen color toggle 5 years ago
Qingping Hou 1605409c60 rename runtimectl to document/canvascontext 5 years ago
Qingping Hou 4d8da96177 fix test 5 years ago
Frode Austvik f12f317e9d [spec] Replace custom assert[Not]AlmostEquals with assert.is[_not].near (#3885)
Also, change "make static-check" to also check the tests.
6 years ago
Frans de Jonge e3c17aa6d0 Travis: run luacheck on unit tests (#3059)
* Travis: run luacheck on unit tests
7 years ago
Hzj_jie c9a997f42c BackgroundRunner (#3008)
* Use getCapacityHW() to ensure latest battery capacity can be retrieved

* BackgroundRunner

* Start background_runner_spec.lua

* AutofrontLight plugin now uses BackgroundRunner plugin
7 years ago
Hzj_jie 53eb4dee50 AutoFrontlight plugin (#2941)
* Add AutoFrontlight plugin

* Add configuration to control autofrontlight feature
7 years ago
Qingping Hou 9b7aba3fba fix: override readerhighlight hold in readerfooter
Also fix touch zone dependency graph generation code.

ReaderHighlight has now been migrated to use touch zone

Inputcontainer's touch event handling logic changed to only stop
propagation when handler returns `true`. Previously, it stops
propagation when a handler is found. This is needed to support
both readerhighlight_tap and tap_forward touch zones.
7 years ago
Qingping Hou 20eb36a03d feat: add network management UI for kobo 8 years ago
Qingping Hou e3137134f8 dbg(add): guard method to toggle assert at based at runtimemode 8 years ago
Qingping Hou e5c1ff1ef6 test(bookmark): purge doc settings before test 8 years ago
Qingping Hou adc7ddccfc test: start every test suit with a clean reader setting 8 years ago
chrox 54f5166254 add koptinterface spec 9 years ago
chrox f0dbd5939c fix travis build segfault hopefully 9 years ago
chrox a59621953d use turbo library in coverage test 9 years ago
chrox 2f2611af42 fix Travis test 9 years ago
chrox 0191dc6530 revert busted to v1.10.0 to avoid segmentation fault in testing 9 years ago
chrox 4f35834b2e wrap computation intensive functions in hook free env when makeing coverage test
so that Travis CI job won't fail because of timeout.
10 years ago
chrox 08dff3a158 turn off debug in unit test by default
Uncommnet the `DEBUG:turnOn()` line to turn it on.
10 years ago
Hans-Werner Hilse 3066c86e38 Refactoring hardware abstraction
This is a major overhaul of the hardware abstraction layer.
A few notes:

General platform distinction happens in
  frontend/device.lua
which will delegate everything else to
  frontend/device/<platform_name>/device.lua
which should extend
  frontend/device/generic/device.lua

Screen handling is implemented in
  frontend/device/screen.lua
which includes the *functionality* to support device specifics.
Actually setting up the device specific functionality, however,
is done in the device specific setup code in the relevant
device.lua file.

The same goes for input handling.
10 years ago
chrox d0b4fa2665 refactoring unit testsuite 10 years ago