Commit Graph

49 Commits (master)

Author SHA1 Message Date
Max Ignatenko b872191dc9
Stop touching night mode when control_nightmode == false (#11685)
This is a regression introduced in #10762
2 weeks ago
zwim 58cb1ff42b
[AutoWarmth] Fix sanity checks with disabled schedule entries (#11062) 6 months ago
zwim 2ba3353d8a
[AutoWarmth] use CheckButton for night mode toggle (#10762) 9 months ago
hasezoey d087710140
Autowarmth: Change strings "set" / "unset" to "turn on" / "turn off" where appropriate (#10733) 9 months ago
zwim 3e3cc690f3
Fix regression after 10557 (#10570) 11 months ago
zwim c9e1b76a14
[plugin] AutoWarmth: Fix nightmode issue on non natural light devices (#10556)
This should fix #10491.
11 months ago
zwim 1ce1fe1780
[plugin] AutoWarmth: Fix resume and frontlight issue (#10557)
Fixes a regression introduced in #10426, when suspending during night and resuming during daylight.
11 months ago
zwim d718682502
Autowarmth: suntime.lua minimal documentation update (#10405) 12 months ago
zwim 4dbaca180a
PM: Optimize task queue handling around standby (#10203)
Instead of firing on(Enter|Leave)Standby Events, and having every other piece of code that might care about that handle re-scheduling their stuff themselves; simply make the standby implementation (i.e., AutoSuspend's) shift the whole task queue by the amount of time spent in standby to re-sync everything automatically.

(This is necessary in the first place because Linux, as the task queue ticks in CLOCK_MONOTONIC, which does *not* tick during suspend/standby; while we expect most of the tasks scheduled to actually reflect real world clock delays).
1 year ago
zwim 8861955aeb
Recalculate timezone, (DST) (#10125) 1 year ago
zwim b3a7d32d54
[AutoWarmth] Simplify translations (#9996) 1 year ago
zwim 54a105c24f
TouchMenu: simplify/remove enabled_func in some cases (#9966) 1 year ago
zwim 192a243b4d Add datetime.lua
Move date and time related functions from util.lua
(and the statistics plugin) to a new datetime.lua.
1 year ago
zwim 7b2ac4769f
[plugin] AutoWarmth: cleanup code (#9788) 1 year ago
zwim d6b67f42d8
[plugin, AutoWarmth] Add time offset for toggling frontlight off (#9755) 1 year ago
zwim cd69382934
[plugin] AutoWarmth: fix frontlight toggle during day (#9735) 2 years ago
zwim 6717852825
AutoWarmth: add message on user change of night mode (#9715) 2 years ago
zwim 629304adce
AutoWarmth: Fix frontlight flash after resume and weird true midnight settings (#9730) 2 years ago
zwim 4969811c08
Optimization: Use constant folding for divisions not a power of two (#9609) 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
zwim 6cb352bc03
AutoWarmth: nit (#9525) 2 years ago
zwim 813bbe2ec9
AutoWarmth: add a choice to control warmth and/or night mode (#9504) 2 years ago
zwim 615072c777
[AutoWarmth] optimisations and fixes to progressive warmth setting (#9442) 2 years ago
zwim d98fa04d13
[plugin] Fix crash in AutoWarmth (#9411)
Fixes the crash mentioned in https://github.com/koreader/koreader/issues/9409#issuecomment-1207484444?
2 years ago
zwim ed34a3078e
AutoWarmth: fix stupid typo (#9382)
See https://github.com/koreader/koreader/pull/9337#issuecomment-1198008045
2 years ago
zwim 9d71333ade
AutoWarmth: add option to toggle/set frontlight on day/night (#9337) 2 years ago
zwim 834dd9682a
AutoWarmth: update footer on menu actions (#9325) 2 years ago
zwim 7d73a86a12
AutoWarmth: reduce schedulings for power saving (#9252) 2 years ago
zwim 05c586c4be
AutoWarmth: force setWarmth after resume (#9289) 2 years ago
zwim 84c7e33606
AutoDim: Allow to dim the frontlight on idle (#9028) 2 years ago
zwim d5d5867d4e
DoubleSpinWidget, SpinWidget: add units, make usage more consistent (#9046) 2 years ago
zwim 13274d6212
datetimewidget: simpler usage, allows 2 to 6 numberpickers for date and time (#9070) 2 years ago
zwim 158f4be724
Autosuspend: add autostandby (#8815)
Allows the device to go into standby (if available in `/sys/power/state`) to save power.
Adds an entry in the device menu to tune the timeout for standby.
(Shows total standby- and suspend-time in system statistics.)
2 years ago
Philip Chan 107156c0a8
[feat] Non-touch improvements (#8859)
FocusManager: fix round x use y layout
FocusManager: add tab and shift tab focus navigation support
FocusManager: handle Press key by default
FocusManager: make sure selected in instance level
FocusManager: add hold event support
FocusManager: Half move instead of edge move
FocusManager: add keymap override support
FocusManager: refocusWidget will delegate to parent FocusManager
Focusmanager: refocusWidget can execute on next tick
inputtext: can move out of focus on back
inputtext: fix cannot exit for non-touch device
inputtext: fix cannot input text with kindle dx physical keyboard
fontlightwidget: add non-touch support
datetimewidget: add non-touch support
datetimewidget: fix set date failed in kindle DX, fix datetimewidget month range to 1~23 by default
datetimewidget: make hour max value to 23
multiinputdialog: add non-touch support
checkbox: focusable and focus style
virtualkeyboard: no need to press two back to unfocus inputtext
virtualkeyboard: collect FocusManager event key names to let VirtualKeyboard disable them
openwithdialog: add non-touch support
inputdialog: can close via back button
enable all InputDialog and MultiInputDialog can be close by back
keyboardlayoutdialog: non-touch support
readertoc: non touch device can expand/collapse in toc
bookstatuswidget: non touch support
keyvaluepage: non-touch support
calendarview: non-touch support
2 years ago
zwim 4fd4861d09
Fix unused variable (#8518) 2 years ago
zwim e1f62e6098
[autowarmth, plugin] fix CI (#8513) 2 years ago
zwim c676aa6f0d
[autowarmth, plugin] use date time widget, optimize (#8502) 2 years ago
hius07 ad09411c3f
DoubleSpinWidget buttons move (#8490)
Move Default and extra buttons above Cancel/OK.
Default values shown in the default button.
Precisions can be set for both values separately.
Minor geometry fix for consistence with SpinWidget.
2 years ago
zwim 15778ac939
[plugin] Autowarmth: Fix sanity check for longitude (#8434)
This PR will fix https://www.mobileread.com/forums/showthread.php?t=342905
3 years ago
zwim 23a1ef2db2
[Autowarmth plugin] Optimisations; Documentation (#8397)
* Documentation; Improved accuracy
* Documentation update
* Remove todo tag for circleCI
* Cleanup
3 years ago
zwim 6aa0d802ec
[autowarmth, plugin] Bug if all scheduler entries are deleted (#8386) 3 years ago
zwim 54605d8313
[Autowarmth, plugin] Corner case for warmth setting; warmth on resume for KA1 (#8373) 3 years ago
zwim 09725e518a
Autowarmth: wording, move expert-mode menu entry down (#8350) 3 years ago
zwim 6492583e96
Autowarmth: wording, help_text, menu tweaks (#8338) 3 years ago
zwim 6b5cf63d07
Autowarmth: fix info text alignment issues (#8271) 3 years ago
zwim cde13360ae
Fix bug when leaving/entering FM/reader (#8295)
This should fix #8293
3 years ago
zwim 2dfbf56624
Autowarmth: Make Information in easy mode more beautiful (#8264) 3 years ago
zwim c8e55ec997
Autowarmth text formatting (#8262)
* Wordings; easier translation formatting

* use variable for tab_width (18)

* Add an indent parameter for formatting
3 years ago
zwim 20f7d14495
Plugin: Auto warmth and night mode (#8129)
("Auto nightmode" only on devices without warmth.)
3 years ago