2
0
mirror of https://github.com/koreader/koreader synced 2024-11-08 07:10:27 +00:00
Commit Graph

9444 Commits

Author SHA1 Message Date
NiLuJe
e1ac3c4853
Minor Input:inhibitInput followup to #9065 (#9139)
* GestureDetector: Downgrade probeClockSource log messages to debug

We're seeing a bit more of 'em between autostandby and inhibitInput now,
and the whole thing was implemented long enough ago that it's no longer
critical to see this in random non-debug logs ;).

* Input: Reset gesture state in inhibitInput

Should prevent bogus gestures when re-enabling the handlers if we were
called in the middle of gesture detection.
2022-05-29 03:05:15 +02:00
Utsob Roy
6804b77251
Markdown export (#9076)
Enables users to export markdown locally with some configuration options to allow users to format the output to a certain extent.
2022-05-28 10:32:36 +02:00
NiLuJe
ae5b2d68ca
AutoSuspend: Don't send LeaveStandby events from a zombie plugin instance (#9124)
Long story short: the LeaveStandby event is sent via `tickAfterNext`, so if we tear down the plugin right after calling it (in this case, that means that the very input event that wakes the device up from suspend is one that kills ReaderUI or FileManager), what's in UIManager's task queue isn't the actual function, but the anonymous nextTick wrapper constructed by `tickAfterNext` (c.f., 
https://github.com/koreader/koreader/issues/9112#issuecomment-1133999385).

Tweak `UIManager:tickAfterNext` to return a reference to said wrapper, so that we can store it and unschedule that one, too, in `AutoSuspend:onCloseWidget`.

Fix #9112 (many thanks to [@boredhominid](https://github.com/boredhominid) for his help in finding a repro for this ;)).
Re: #8638, as the extra debugging facilities (i.e., ebb81b9845) added during testing might help pinpoint the root issue for that one, too.

Also includes a minor simplification to `UIManager:_checkTasks`, and various other task queue related codepaths (e.g., `WakeupMgr`) ;).
2022-05-25 23:36:41 +02:00
Utsob Roy
46f09b9e6c
exporter.koplugin: use safe filename
fix #9130: files missing in some devices.
2022-05-25 18:14:05 +02:00
zwim
081bc6784f
[plugin, statistics] simplify ReaderProgress for better translations (#9113) 2022-05-25 17:44:14 +02:00
hius07
e336983fd2
Cloudstorage WebDAV: more fix slash in server address (#9128)
Honor server addresses with or without trailing slash.
Regression since #9061. Closes #9125.
2022-05-25 17:02:46 +02:00
zwim
d5d5867d4e
DoubleSpinWidget, SpinWidget: add units, make usage more consistent (#9046) 2022-05-24 00:25:50 +02:00
zwim
13274d6212
datetimewidget: simpler usage, allows 2 to 6 numberpickers for date and time (#9070) 2022-05-23 20:32:59 +02:00
yparitcher
8f316b1e8c
Merge discardEvents & inhibitInput (#9065)
Rename `discardEvents` to `inhibitInputUntil`
only discard Input events
2022-05-23 13:52:52 +02:00
yparitcher
a97dbb05ed
Page turn animations: add to dispatcher (#9123)
xref: https://www.mobileread.com/forums/showthread.php?p=4224443&postcount=1119
2022-05-23 09:19:47 +02:00
Glen Sawyer
cb95dcd4c9
Fix reMarkable crash bug v2022.05: event overwrite with new time module (#9121)
The change from timeval to time completely broke reMarkable.
frontend/device/remarkable/device.lua was using TimeVal:now() to manually overwrite event time values, as noted in the code comments.
Input:handleTouchEv is expecting those event time values to be timevals, not integer times.
So as soon as the user touches the screen, crash.
2022-05-22 08:01:24 +02:00
Frans de Jonge
2b3043796c
Update translations for 2022.05 (#9118) 2022-05-21 07:42:41 +02:00
hius07
f2c3fd54a1
filemanagershortcuts: fix adding the first shortcut (#9107)
Closes #9105.
2022-05-18 10:48:47 +02:00
NiLuJe
118e063ae2
PocketBook: Don't break synthetic power input events on suspend
Regression since #9036
Fix #9095
2022-05-14 17:20:29 +02:00
zwim
84dd58f9df
Power-savings in readerdevicestatus: Schedule on full minute and fix multiple scheduling. (#9032) 2022-05-09 18:23:50 +02:00
poire-z
e960c28d16
bump crengine: hyphen char and table thead fixes (#9088)
Includes:
- Font: use U+002D instead of U+00AD for the hyphen char
- Tables: fix FixRowGroupsOrder()
2022-05-09 16:41:47 +02:00
NiLuJe
60b043ebe9
ReaderFooter: Refresh the footer on frontlight state changes issued by the frontlight widget (#9084)
c.f, https://www.mobileread.com/forums/showpost.php?p=4220159&postcount=7
2022-05-09 08:36:13 +02:00
Martín Fernández
49c02790f6
fix: attempt to call local start_time (number) (#9086)
Follow up https://github.com/koreader/koreader/pull/8999
2022-05-09 08:27:58 +02:00
zwim
617bb896f9
OTAManager: Check for update -> immediately show hourglass (#9083) 2022-05-08 22:17:58 +02:00
Frans de Jonge
d09579586d
[i18n] Enable more languages (#9082)
Croatian (hr)
Finnish
Lithuanian

Georgian (ka)
Hindi
Serbian

Follow-up to <https://github.com/koreader/koreader/pull/9079>.

Croatian is 46% done, the others mostly 10-20%.
2022-05-08 13:52:34 +02:00
Frans de Jonge
a8db251bd8
[chore] Remove leftover debug print (#9080) 2022-05-07 18:38:26 +02:00
Frans de Jonge
8da18d403b
[i18n] Enable Latvian translation (#9079)
Cf. <https://github.com/koreader/koreader/issues/8225#issuecomment-1120181554>.
2022-05-07 18:36:06 +02:00
Frans de Jonge
57b9c08f5a
[doc] Update busted version mentioned in docs (#9078) 2022-05-07 18:22:55 +02:00
Frans de Jonge
4b0f7471f4
Fix docs after Exporter plugin refactor (#9075)
The file was moved in <https://github.com/koreader/koreader/pull/8944> but not changed in the docs config.
2022-05-07 08:59:12 +02:00
NiLuJe
fa76b9d615
Kindle: Fix retrieveNetworkInfo on the K4 (#9073)
Thanks to @hius07
(https://github.com/koreader/koreader/issues/7881#issuecomment-1028921755)
;).

Fix #7881
2022-05-07 00:36:42 +02:00
poire-z
f286787ff5 ReaderPageMap: fix page labels in 2-columns mode
Page labels on the right page could have some bad y position
(they were never above the last page label on the left page)
2022-05-06 23:53:45 +02:00
poire-z
f553545483 bump crengine: support for inline margin/border/padding
Includes:
- lvtext: tweak object flags implementation
- lvtext: rename LTEXT_WORD_IS_OBJECT to LTEXT_WORD_IS_IMAGE
- lvtext: add LTEXT_OBJECT_IS_EMBEDDED_BLOCK
- Text: support for inline margin/border/padding
- PageMap: allow building synthetic pages numbers

cre: add synthetic page map functions (not yet used)
2022-05-06 23:53:45 +02:00
Utsob Roy
bc0a55f093
Refactor exporter.koplugin (#8944)
Changed:
  - select multiple targets and export to them in a single click.
  - local targets (html, json and text) now are timestamped. Exporting booknotes on already exported documents will generate a new file with all the highlights present at export time. Previous files won't be deleted.

Fixed:
  - chapters are now correctly represented in html output.
  - json issues when exporting the whole history.
  - joplin and readwise crashes when they're unable to reach the server
  - joplin update notes mechanism.
  - joplin is able to recreate the notebook if the user deletes or renames its current one.
  - highlights of read-only documents are also added when exporting the whole history (affects mostly android, might affect desktop targets)

Co-authored-by: Utsob Roy <roy@utsob.me>
2022-05-06 22:44:28 +02:00
NiLuJe
2de2a8ab76
NetworkManager: Make sure we show an IM at the *start* of a Wi-Fi toggle action (#9064)
Ensures the worst-case scenario has minimal visual feedback.
2022-05-06 19:19:55 +02:00
Philip Chan
d6ff983243
Show TitleBar left and right buttons on non-touch devices (#9041)
Titlebar button navigation in menu, including ListMenu and MosaicMenu in FileManager, History, Favourites and Shortcuts.
Hide show password checkbox in non-touch devices
2022-05-06 10:44:25 +02:00
zwim
9b9cfe29a4
[feat] Replace TimeVal (RIP) with time, fixed point time seconds (#8999) 2022-05-05 21:00:22 +02:00
yparitcher
54ead5fc88 Page turn animations
Kindle PW5 (MTK) with hardware support
Currently only in Crengine
2022-05-05 10:48:16 -04:00
yparitcher
ca423f2887
Network: ToggleWiFi: check isWifiOn instead of isConnected (#9067)
Rationale from: https://github.com/koreader/koreader/pull/9064#issuecomment-1116485065

>While we are dealing with WiFi, a slight hijack, on my kindle when the WiFi is on but not connected the ToggleWiFi gesture tries to connect so i have no way of turning it off. For eample I use the gesture to turn it on, then leave the range I can't use it to turn off. I think the more direct approach would be to toggle On -> Off states so if i am disconnected and want to reconnect i can always go Off then On, but I am able to turn it off.

>TLDR: the tooglewifi gesture should check for iswififup not isconnected
2022-05-05 07:31:36 +02:00
hius07
9de0df81da
Cloudstorage WebDAV: fix leading slash for root folder (#9061) 2022-05-03 09:35:25 +03:00
NiLuJe
86c35ad066
A host of low power states related tweaks (#9036)
* Disable all non power management related input during suspend. (This prevents wonky touch events from being tripped when closing a sleep cover on an already-in-suspend device, among other things).
* Kobo: Use our WakeupMgr instance, not the class.
* WakupMgr: split `removeTask` in two: 
* `removeTask`, which *only* takes a queue index as input, and only removes a single task. Greatly simplifies the function (i.e., it's just a `table.remove`).
* `removeTasks`, which takes an epoch or a cb ref, and removes *every* task that matches.
* Both of these will also *always* re-schedule the next task (if any) on exit, since we can have multiple WakeupMgr tasks queued, but we can only have a single RTC wake alarm set ;).
* `wakeupAction` now takes a `proximity` argument, which it passes on to its `validateWakeupAlarmByProximity` call, allowing call sites to avoir having to duplicate that call themselves when they want to use a custom proximity window.
* `wakeupAction` now re-schedules the next task (if any) on exit.
* Simplify `Kobo:checkUnexpectedWakeup`, by removing the duplicate `WakerupMgr:validateWakeupAlarmByProximity` call, now that we can pass a proximity window to `WakeuoMgr:wakeupAction`.
* The various network activity timeouts are now halved when autostandby is enabled.
* Autostandby: get rid of the dummy deadline_guard task, as it's no longer necessary since #9009.
* UIManager: The previous change allows us to simplify `getNextTaskTimes` into a simpler `getNextTaskTime` variant, getting rid of a table & a loop.
* ReaderFooter & ReaderHeader: Make sure we only perform a single refresh when exiting standby.
* Kobo: Rewrite sysfs writes to use ANSI C via FFI instead of stdio via Lua, as it obscured some common error cases (e.g., EBUSY on /sys/power/state).
* Kobo: Simplify `suspend`, now that we have sane error handling in sysfs writes.
* Kobo.powerd: Change `isCharging` & `isAuxCharging` behavior to match the behavior of the NTX ioctl (i.e., Charging == Plugged-in). This has the added benefit of making the AutoSuspend checks behave sensibly in the "fully-charged but still plugged in" scenario (because being plugged in is enough to break PM on `!canPowerSaveWhileCharging` devices).
* AutoSuspend: Disable our `AllowStandby` handler when auto standby is disabled, so as to not interfere with other modules using `UIManager:allowStandby` (fix #9038).
* PowerD: Allow platforms to implement `isCharged`, indicating that the battery is full while still plugged in to a power source (battery icon becomes a power plug icon).
* Kobo.powerd: Implement `isCharged`, and kill charging LEDs once battery is full.
* Kindle.powerd: Implement `isCharged` on post-Wario devices. (`isCharging` is still true in that state, as it ought to).
2022-05-01 23:41:08 +02:00
slimpdev
7cac083db4
Kindle: Support warm light control on the Oasis 3 (#9054) 2022-05-01 18:38:13 +02:00
raffaem
f37699a12b
[doc] Build deps for Fedora (#9034)
The build deps listed in the README are not sufficient to build
KOReader. Inserting the full list of dependencies.
2022-04-24 10:30:28 +02:00
Utsob Roy
4e517f4839
[plugin] Exporter: properly sort highlights when exporting (#9021)
Since the bookmarks table is sorted based on the bookmarks'
position in the book, it is possible to sort clippings in
the exporter plugin based on that.
2022-04-22 20:13:36 +02:00
NiLuJe
5ac9463c09
AutoSuspend: Unbreak cohabitation between standby & suspend (#9009)
* Make sure AutoStandby cohabitates nicely with AutoSuspend (regression since #8985), specifically:
* Disable standby during suspend.
* Ensure that leaving standby restores the scheduled suspend properly, with the appropriate remaining amount of time based on the last user input.
* Handle devices with an auxiliary battery better when scheduling suspend (assume it's only charging when the aux battery is charging, not the ereader's).
* Tweak debug logging to be able to remote debug corner-cases more easily without requiring code changes.
* Fix erroneous behavior when awoken from standby by something that doesn't trigger an InputEvent Event (e.g., rtc alarm, gyro, or random bullshit).
2022-04-22 18:59:48 +02:00
lennonhill
08d6fbc9db
[plugin] Wallabag: archive instead of deleting read articles by default (#9018)
Fix <https://github.com/koreader/koreader/issues/8936>.
2022-04-19 17:39:47 +02:00
Dylan Garrett
8c58541c59 Add auto_tags setting. Combine UI code for auto_tags and ignore_tags 2022-04-18 15:46:12 +02:00
Dylan Garrett
7d04370558 Initial work to allow auto tagging 2022-04-18 15:46:12 +02:00
NiLuJe
e88bda6826
Kobo: Kill new FW 4.32 stuff on startup (#9010)
* Kill new services introduced in FW 4.32 on startup
* Murder BT on startup
2022-04-17 16:55:43 +02:00
Martín Fernández
4925cd7c97
Bump android-luajit-launcher (#9014)
Support for the following Onyx devices:

Faust 3
Leaf
Note Pro
Poke 3

#8482
2022-04-17 13:54:20 +02:00
hius07
74d0d22a15 readerhighlight: keep highlight for default action 'Translate' 2022-04-17 09:37:29 +02:00
hius07
b4314acb2c translator: clear highlight on close if needed 2022-04-17 09:37:29 +02:00
hius07
428edf90bd textviewer: add close_callback 2022-04-17 09:37:29 +02:00
zwim
af1251d83e
Manu: Fix menu entry, when no keyboards are activated (#9008) 2022-04-17 00:08:11 +02:00
zwim
71f6bd8ba5
ReaderFooter: Make setDirty happy (#9005)
Don't pass a non-window-level widget.
Painting is handled explicitly via widgetRepaint, so passing a widget to setDirty was just plain wrong anyway ;).
2022-04-16 18:57:37 +02:00
lennonhill
4fe39d6d43
[plugin] Wallabag: add basic error handling and abort synchronisation on request error (#8950)
Fixes <https://github.com/koreader/koreader/issues/8949>.
2022-04-15 19:25:58 +02:00