Commit Graph

160 Commits (30378eb2a82ac1b2f686b0db638b194b642af4ab)

Author SHA1 Message Date
Hzj_jie 30378eb2a8 Add restart koreader function and ensure FlushSettings event can be delivered to all widgets (#2772) 7 years ago
Martín Fernández 474c011f21 [kobo]: add reboot and poweroff menu actions (#2888) 7 years ago
Qingping Hou f2671a3e20 plugin(fix): catch crash in addToMainMenu 7 years ago
Frans de Jonge f1c0b4b3bb UIManager docs & lang: add some docs and correct "quiting" to "quitting" 7 years ago
Hzj_jie 3ad3452d1a System Stat plugin (#2699) 7 years ago
Hzj_jie 1a2e4f5b55 Force Kobo to suspend (#2691)
Without this change, the device resumed randomly. With this change, the device had not resumed randomly anymore. (Technically speaking, it still randomly resumed, but got suspended immediately.)
7 years ago
Hzj_jie 0b29e73e2e BatteryStat plugin and instruction of KoboLight plugin (#2643)
* Start battery stat plugin

* BatteryStat & kobolight

* Several minor improvements

* Remove a useless function

* flush settings

* Some review feedbacks

* Resolve review comments

* Remaining Minutes -> Remaining Hours

* Add dump_file

* typo

* realpath

* realpath on folder

* Remove useless os.time()

* Resolve review comments

* warning

* Add BatteryStat.debugging flag

* treat log as txt

* Minor improvement

* Charging hour should be positive

* Use warn instead of info

* onSuspend in Kobo

* Charging events for kobo and kindle

* More events

* dumpOrLog

* Warnings

* Typo

* More space

* Singleton

* slightly format change

* BatteryStat singleton

* Init

* Remove debugging flag

* sleeping percentage is still negative

* Read settings

* Do not need to change was_suspending and was_charging

* Typo

* Remove debugging flag

* Not charging should happen before suspend

* Resolve review comments

* was_suspend and was_charging should be updated each time in onCallback()
7 years ago
Qingping Hou f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 7 years ago
poire-z adbe76c156 Reset refresh rate counter on explicit full refreshs (#2394) 8 years ago
Bastien Dejean 64bc5cd63c Make the powered off state customizable
This changes the behavior of the powered off transition phase for the
Kobo devices: instead of displaying a confirmation dialog, a screensaver
is used after a 2 seconds press delay.

Users can specify separate directories/files/messages for the powered
off and sleeping states through the `path` and `message` attributes of
the `{poweroff,suspend}_screensaver` settings.

Fixes #2327 and closes #2306.
8 years ago
Qingping Hou 816d0a551a kobo: handle charging/uncharging event 8 years ago
Zijie He f36f8cb464 KOSync plugin should respect onNetworkConnected and onFlushSettings events 8 years ago
Qingping Hou 902403bf0a kobo(fix): prevent usb plug events from interrupting sleep 8 years ago
Qingping Hou 71afe3606c kobo(fix): set suspend wait timeout to 15 seconds
Otherwise, suspend might fail and the device will ended up in a false
sleep state and drain the battery.
8 years ago
Qingping Hou 4036e2c460 kobo(fix): do not wake up device when cover is closed 8 years ago
Qingping Hou 93b3262db7 kobo(fix): make sure sleep cover is not interrupting sleeping when ignore_power_sleepcover is set 8 years ago
Qingping Hou 22964a77a0 kobo(fix): always put device to suspend state when cover is closed 8 years ago
Qingping Hou ebc7055b43 chore: move kobo specific code into kobo/device.lua 8 years ago
chrox b0498ec9b9 revert 9ab005a changes to UIManager:sendEvent
which would make readerui handle swipe event twice.

And use broadcastEvent to emit `FlushSettings` event.

This should fix #2225 and fix #2226.
8 years ago
chrox 166aa52a24 move painting and drawing debug log to verbose 8 years ago
chrox 9ab005a1d3 fix unit test of readerlink and readerpaging
and have more confidence with the unit testing framework.

Now `make testfront` won't retry on failure and testing files are
ordered in each run so that it's possible to reproduce testing failure.

And this patch also fix flush settings not working before suspend issue:
at some point the `FlushSettings` event is sent to `UIManager` instead
of `ReaderUI`, but `UIManager` only delegated events to active widgets
and `ReaderUI` is actually not an active widgets thus will miss the event.

This patch also add a verbose debug mode with "-v" as a switch to turn
on this mode. With verbose mode on, event handling will be logged.
8 years ago
bingo619 43797ed813 Oasis orientation 8 years ago
chrox 41c79407b9 diable double tap by default in the widget stack
This should fix #2141 and fix #2130.
8 years ago
chrox 551857ce6e fix some luacheck warnings 8 years ago
chrox 03fda94562 fix #2110 by adding disable double tap option in screen options 8 years ago
chrox 3d7fe1002c we should disable double tap by default
Currently only column-zoom mode in PDF uses double tap gesture.
8 years ago
Qingping Hou 7d13d00eff uimanager(fix): honor second when calling Input:waitEvent 8 years ago
Qingping Hou fadad90447 uimanager(fix): handle stack change in close 8 years ago
Qingping Hou af2f3c30c7 uimanager(fix): handle last widget in broadcast event properly 8 years ago
chrox 5983050d79 PDF free zoom mode revisit
this should implement feature request of zoom mode for multi-columns
page in #501
This PR depends on koreader/koreader-base#435

How to use?
1. Tap the top left corner of a PDF/Djvu page to get into the flipping
mode
2. Double-tap on text block will zoom in to that column
3. Double-tap on any area will zoom out to an overview of the page
4. repeat step 2 to focus to another page block

How does it work?
1. We first find the mask of text blocks in the page. (Pic 1)
2. Then we intersect page boxes with user tap to form a page block. (Pic 2)
3. Finally we zoom the page to the page block and center current view to
that block. (Pic 3)
8 years ago
Qingping Hou ce7ae2dfac uimanager(fix): handle edge case where second widget in stack is ignored 8 years ago
Qingping Hou 8268d8d32c test(fix): clean up after screenshot test 8 years ago
Qingping Hou a92a88e063 uimanager(fix): check active widgets in the correct order 8 years ago
Qingping Hou 42dde82c43 uimanager(minor): simplify suspend event handler's signature 8 years ago
Cosmin Gorgovan 19338cb439 Kobo: Offer to power off if the power button is held for at least 3 seconds 8 years ago
Cosmin Gorgovan 18c0cee18f UIManager: add method for broadcasting an event to all widgets 8 years ago
Qingping Hou eb71d29716 kodev(minor): fix arg test 8 years ago
Qingping Hou 0166ff8add reader(fix): force draw info message before loading document
Since the doShowReader will run in nextTick, it will get picked up by
checkTask, which is in the beginning of next UI loop and blocks
UIManager from redrawing the screen for the info popup.
8 years ago
Qingping Hou 144fd170f1 uimanager(refactor): replace autosuspend if check with noop 8 years ago
Qingping Hou e3137134f8 dbg(add): guard method to toggle assert at based at runtimemode 8 years ago
Zijie He b86aa5a02b Implement auto-suspend function for Kobo. Add test case for UIManager:_checkTasks, which should not clear _task_queue_dirty bit before looping. 8 years ago
Qingping Hou e52c74afcc test: more uimanager scheduler test 8 years ago
NiLuJe a82fe3ac44 is_fl_on -> is_frontlight_on outside of powerd
Matches the reader setting we're reading/writing at that point,
and avoids confusion related to scoping because it doesn't necessarily
match powerd.is_fl_on at that point.

Well, at least I had to wrap my mind around it ^^
8 years ago
Qingping Hou 399d676cf0 kobo: rename frontlight_state config to is_frontlight_on 8 years ago
Qingping Hou cf3b97537b kobo: build fl_state based on fl_intensity if model does not support toggle 8 years ago
zijiehe e84093c414 Add a flState in Kobo, and KoboPowerD:toggleFrontlight uses flState to control the light instead of intensity. 8 years ago
Qingping Hou b63ddb8736 fix: kill in fly hinting event on document close 8 years ago
Qingping Hou 1f082d7f5c build: fix travis build 8 years ago
Qingping Hou e422842256 minor: a lot of luacheck fixes 8 years ago
Qingping Hou 1609becd61 Merge pull request #1772 from dset0x/frontlight-sync
WIP Synchronise frontlight level with nickel config
8 years ago