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

5323 Commits

Author SHA1 Message Date
NiLuJe
5c1305719a
Kobo: Unbreak automagic_sysfs on the Libra 2 (#9998)
Regression since #9902, because I'd forgotten that the default Kobo block *does* set those...
Reported by @ptrm on Gitter, thanks!

Take two, essentially revert 8a16518918
We have defaults for most of those in the Kobo superclass, so these can never really be `nil`.
2023-01-06 21:23:18 +01:00
hius07
20ac8004d6
ReadHistory: further minor refactoring (#9991) 2023-01-04 01:24:23 +01:00
NiLuJe
4ce0058e2d
ReaderLink: Minor logic simplification in onGoToPageLink (#9987)
Abort earlier if the nearest link is too far, instead of computing stuff and creating an object we'll never actually use.

Includes minor logging tweaks to vaguely related codepaths ;p.
2023-01-03 20:48:49 +01:00
hius07
a8b333e4f9
Dictionaries: add Ukrainian explanatory dictionary (#9982) 2023-01-01 20:12:36 +01:00
zwim
f0b007bb31
Footer: avoid footer auto refresh over bottom menu (#9983) 2023-01-01 20:11:10 +01:00
poire-z
7448ad23e7 ReaderDogear: fix no y-offset after load with top status bar 2023-01-01 20:09:03 +01:00
poire-z
bbbcdffd3b ButtonTable: reset MovableContainer state on button tap
Prevent any later hold_release event from being handled
by MovableContainer as a moving touch+hold_release.
This issue was noticable when closing DictQuickLookup
with long-press on close, resulting in the movable
highlight actions ButtonTable moving to where the
long-press happened.
2023-01-01 20:09:03 +01:00
georgeto
cbe7775bc8
CheckMark: Fix on tap toggling of checkmarks in SortWidget (#9941)
The x and y coordinates of SortItemWidget's checkmark widgets were not updated, thus remained at their initial value 0.
Consequently the intersectWith check in SortItemWidget:onTap always evaluated to false, resulting in taps on checkmarks in the sort widget not being recognized.

Co-authored-by: NiLuJe <ninuje@gmail.com>
2022-12-31 01:01:17 +01:00
NiLuJe
8d133507ad Device: Handle screen_saver_lock + WiFi corner-cases
If Wi-Fi is restored on resume, going back to suspend while the
screensaver is shown via the screen_saver_lock flag would have attempted
to suspend *without* killing Wi-Fi first.

This implodes on the vast majority of NTX boards, so take the usual
precautions.
2022-12-31 00:53:29 +01:00
NiLuJe
144706654d Device: Drop unused device capabilities 2022-12-31 00:53:29 +01:00
NiLuJe
554520463d ScreenSaver: Get rid of gratuitous complexity
Screensaver isn't instantiated, so we don't really have any reason to go
through fancy class trickery to do this (as cool as it looked ;p)...
2022-12-31 00:53:29 +01:00
NiLuJe
9eac47e0df ScreenSaver: Refactor gesture lock to behave regardless of configuration
Go through a dedicated sticky invisible widget instead of piggybacking
on ScreenSaverWidget, so that we behave if there are other InputContainers
in ScreenSaverWidget, or if there isn't any ScreenSaverWidget at all.

Fix #9911, fix #9955
2022-12-31 00:53:29 +01:00
hius07
6e1683e313
KOSync: use MultiInputDialog instead of LoginDialog (#9962) 2022-12-30 18:38:42 +02:00
weijiuqiao
89af6d9385
KVPage: fix crash from empty page due to item deletion (#9974)
Fixes #9972.
2022-12-29 16:36:53 +01:00
zwim
54a105c24f
TouchMenu: simplify/remove enabled_func in some cases (#9966) 2022-12-29 08:44:37 +01:00
NiLuJe
d6ec148548 CenterContainer: Use an elseif instead of two ifs checking the same
variable
2022-12-28 19:52:50 +01:00
NiLuJe
78a21a0ecc WidgetContainer: Nitty cosmetic tweak 2022-12-28 19:52:50 +01:00
NiLuJe
3743229ffe TextWidget: Feed Geom a full-size table in getSize()
Might save a realloc down the line.
2022-12-28 19:52:50 +01:00
NiLuJe
04c8bc903e IconButton: Fix RTL highlighting
I'm not *quite* sure what's responsible for inverting the padding
values, since the only Widget I can see doing that is FrameContainer,
and I can't find any in that Widget chain, but, oh, well.

Easily reproducible with the FileManager's TitleBar left/right buttons
(i.e., Home & Plus).
2022-12-28 19:52:50 +01:00
zwim
ebaef61536
Make translateable: SystemStat, custom footer (#9945)
Fixes #9942.
2022-12-24 16:56:24 +01:00
Robert-Jan de Dreu
c9df3a000f
PB: Implement GSensor support for more moderm devices (#9873)
(Bumps base for https://github.com/koreader/koreader-base/pull/1566)
2022-12-23 19:22:22 +01:00
NiLuJe
788ccac561
Input/Device: Refactor Gyro events handling (#9935)
* Get rid of the `canToggleGSensor` Device cap, it's now mandatory for `hasGSensor` devices. (This means Kindles can now toggle the gyro, fix #9136).
* This also means that `Device:toggleGSensor` is now implemented by `Generic`.
* Update the Screen & Gyro rotation constants to be clearer (c.f., https://github.com/koreader/koreader-base/pull/1568) (/!\ This might conceivably break some `rotation_map` user-patches).
* Input: Move the platform-specific gyro handling to Device implementations, and let Input only handle a single, custom protocol (`EV_MSC:MSC_GYRO`).
* Input: Refine the `rotation_map` disable method implemented in 43b021d37c. Instead of directly poking at the internal field, use a new method, `disableRotationMap` (/!\ Again, this might break some `rotation_map` user-patches).
* Input: Minor tweaks to event adjust hooks to make them more modular, allowing the Kobo implementation to build and use a single composite hook. API compatibility maintained with wrappers.
2022-12-21 15:50:39 +01:00
Frans de Jonge
99df719562
[i18n] Make gateway strings translateable (#9933)
See <https://www.mobileread.com/forums/showthread.php?p=4282773#post4282773>.
2022-12-19 22:33:28 +01:00
hius07
ee75abd4a0
Statistics: show correct number of notes in a book (#9928) 2022-12-18 18:04:00 +02:00
poire-z
b1b7773237
TouchMenu: tweak menu search (#9926)
- Cleanup search and animation codes, fix inconsistencies
  between animation/no-animation opening, and refreshes
  glitches on eInk.
- Show menu item on tap, with buttons to either open
  directly, or to walk there (removed earlier "Animation"
  checkbox, so the choice can be decided later).
- Move event handlers into ReaderMenu/FileManagerMenu.
- Avoid duplicated and confusing results from gestures
  and font-family submenus.
2022-12-18 01:25:41 +01:00
NiLuJe
f6421abab0
Calibre: Log errors on wireless connection failures (#9914)
Also, get rid of the weird and clunky `failed_connect_callback` thingy, because it makes no sense?

Re: #9908
2022-12-17 22:37:23 +01:00
melyux
a53e9847fa
Footer: some menu items rewording (#9915)
Change footer status bar type setting label from 'Prefix' to 'Item style'.
2022-12-16 00:44:29 +01:00
melyux
6f39f6cb7b
Screensaver: exclude content when excluding cover, random image as fallback (#9912)
Exclude some screensaver option showing book content
(title, page image) when "Exclude this book cover" is checked. 
Random image as fallback, KOReader logo as 2nd-order fallback.
2022-12-15 00:30:38 +01:00
melyux
e3f6404eb2
Screensaver: tweak "Screensaver message" description text (#9909) 2022-12-15 00:06:56 +01:00
hius07
7719ad04f3
Reader: add open next file in folder to Dispatcher (#9916)
Closes https://www.mobileread.com/forums/showthread.php?t=350683.
2022-12-14 20:40:24 +01:00
NiLuJe
9b936d3f3c AutoSuspend: On Kindle, periodically reset the system's timeout so that
our own timeout can actually be honored.

Fix #7874, fix #9868
2022-12-13 00:17:25 +01:00
NiLuJe
3a8e9f0333 DocSettings: Refine the primary/backup mtime shenanigans
Use the same mtime (the newest) for both entries, so that priority order
wins the tie, giving priority to the primary.

Avoids preferring an older legacy sidecar in case of issues with the new
files.
2022-12-13 00:17:25 +01:00
NiLuJe
3a8d94ad56 Kindle: Unbreak ScreenSaver tracking on SO devices
Fix #9883, regression since c7f5bfb72a
2022-12-13 00:17:25 +01:00
NiLuJe
1ca0748ca7 DocSettings: Make sure that between a main/backup pair of sidecar files,
the main one *always* has priority, regardless of mtime.

Should help workaround weird local/UTC issues when USBMS is involved,
c.f., https://github.com/koreader/koreader/issues/9227#issuecomment-1345263324
2022-12-13 00:17:25 +01:00
NiLuJe
8a16518918 Kobo: Only probe necessary entries in automagic_sysfs codepath
e.g., on the Sage, only the power_dev stuff changes between HW revs,
the rest of the hardcoded stuff is still relevant, so skip probing
those.
2022-12-13 00:17:25 +01:00
NiLuJe
b16b215cbb ReaderHighlight: Appease newer versions of LuaCheck
Good to know: it now defaults to assuming that function arguments
prefixed with an underscore would be unused, which is... nice in theory ;).
2022-12-13 00:17:25 +01:00
NiLuJe
649af0be59 Startup: Unbreak last_file when the file is missing
Fix #9887, likely a regression since #9669
2022-12-13 00:17:25 +01:00
melyux
6c2d5c66da
Add linear flow wisdom to screensaver message magic variables (#9905)
If there are hidden flows, this calculates the current page, total pages, percent, time left in chapter, and time left in the magic variables used in screensaver message only for the current flow. If there are no hidden flows, the behavior is the same as before.
2022-12-12 18:22:48 +01:00
Robert-Jan de Dreu
9a573ae812
PocketBook: remove old input selection global (#9871) 2022-12-12 13:55:37 +01:00
charlesangus
cad4c24118
Kobo: Handle power button input device on new Sage HW revision (#9896)
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: NiLuJe <ninuje@gmail.com>
2022-12-12 00:51:32 +01:00
Roygbyte
3e49cf9a18
ReaderLink: allow buttons to be added to the External link dialog (#9746)
So plugins can register and advertize themselves
as handlers of external links (ie. Wallabag).
2022-12-11 16:52:40 +01:00
Frans de Jonge
e1fe897c9b
[i18n] Add a couple of explanatory comments for translators (#9878) 2022-12-11 10:08:46 +01:00
hius07
c53dd55b16
ReaderHighlight: new Select mode icon (#9869) 2022-12-11 09:55:47 +01:00
weijiuqiao
49d8ec2f4f
Cloudsync: dropbox token re-generation (#9862) 2022-12-11 09:54:58 +01:00
hius07
05cd59ebe5
ReaderBookmark: indicate current page with dimmed page numbers after current (#9872) 2022-12-09 09:08:14 +01:00
Frans de Jonge
e026598f72
TouchMenu: menu search without patterns (#9884)
See <https://github.com/koreader/koreader/pull/9876#issuecomment-1340090208>.
2022-12-07 18:41:48 +01:00
Frans de Jonge
e58a12ba04
TouchMenu: Search menu to search the menu (#9876)
Fixes #9800.
2022-12-06 22:02:21 +01:00
zwim
57ef9e6a55 TouchMenu: Button for date&time and battery 2022-12-06 17:36:08 +01:00
zwim
192a243b4d Add datetime.lua
Move date and time related functions from util.lua
(and the statistics plugin) to a new datetime.lua.
2022-12-06 17:36:08 +01:00
zwim
d1cd2a1c8d
Restart KOReader: add a ConfirmBox instead of a plain InfoMessage (#9853) 2022-12-03 21:29:13 +01:00
Steady Quad
fa9f0acf5e
cloudstorage: Fix directory listing for some WebDAV servers (#9847)
(sub)folders on some WebDAV servers are not listed in cloudstorage due to strict xml element matching of <d:collection> elements.
2022-12-02 23:47:16 +01:00
hius07
cd56dd2edf
ReaderHighlight: pdf multi-page highlights (#9850) 2022-12-02 20:22:27 +02:00
Frans de Jonge
b5e7ade880
[i18n] Fix Arabic translations (#9857)
They were still on the old ar_AA, notified in <https://github.com/koreader/koreader/pull/9822#issuecomment-1335439759>.
2022-12-02 18:39:47 +01:00
weijiuqiao
02c9f26f6c
Keyboard: add Chinese pinyin input-method (#9843) 2022-12-02 16:59:31 +01:00
melyux
cc53ceb039
History: remember status filter, show filtered count in title (#9822) 2022-12-02 16:56:00 +01:00
yparitcher
513c88d661
Dispatcher: only suspend if Device:canSuspend (#9842)
Closes #9838
2022-11-28 08:41:59 +01:00
Frans de Jonge
84be6fc226
[i18n] Fix 'Choose new folder to set as home?' can't be translated (#9841)
Reported in <https://www.mobileread.com/forums/showthread.php?p=4276962#post4276962>.
2022-11-27 21:55:26 +01:00
hius07
c35140e8d2
ReaderHighlight: new icon in select mode ConfirmBox (#9830) 2022-11-25 11:18:54 +02:00
melyux
38797498da
ScreenSaver: allow battery % in screensaver message (#9810) 2022-11-22 19:51:07 +01:00
hius07
90f6dd178e
CloudStorage: add DropBox starting folder (#9821) 2022-11-22 14:53:10 +02:00
hius07
5b889a0145
Reader style tweaks: register in Dispatcher manually (#9816)
Style tweaks can be applied with a gesture or added to a profile.
2022-11-22 13:46:44 +01:00
zwim
486d7071c7
[StatusBar] Allow status bars to be repainted if they are not covered (#9768) 2022-11-20 05:33:44 +01:00
Robert-Jan de Dreu
f953f041ea
PocketBook: use inkview to adjust image colors to look more bright (#9756)
Adjust image colors for PocketBook color devices to supply
brighter image colors. Make it a config option so we can
adjust it to a sensible default for all devices later.
Also enable HW Dithering for color devices: the dithering
flag allows us to figure out if what is viewed is an
image or text. This way we can enable color rendering
or not based on the dithering flag.
2022-11-18 20:23:35 +01:00
hius07
d95c692c78
ReaderHighlight: add abort select mode (#9786) 2022-11-18 20:17:25 +01:00
weijiuqiao
efb335e195 KeyValuePage: fix key value too close when keys are short and values are long 2022-11-16 22:51:38 +01:00
weijiuqiao
e481e60aa1 Syncservice: fix not updating services after adding new ones 2022-11-16 22:51:38 +01:00
NiLuJe
df890105e4 ReaderMenu: Use a dedicated handler for the Menu key
Piggybacking on the touch gesture handlers implied that the gesture
filter (tap and/or swipe) was still applied, which made no sense.

Also, stop the weird Event roundtrip for events we're actually the only
ones to handle, just call the handler ourselves directly.

Fix #9792
2022-11-16 22:11:19 +01:00
NiLuJe
3a92f3385c PB: Handle KEY_HOME
It possibly historically never made it out of InkView in the past, but
apparently that's no longer the case and/or every other key behaves the
same way anyway, so it's harmless at worst.

Fix #9791
2022-11-16 22:11:19 +01:00
Hannes Krumbiegel
a23c30f862
Add dictionaries for languages with over 1000 entries on Wiktionary (#9767) 2022-11-14 22:59:35 +01:00
hius07
9338b2e524
Dispatcher: show values (#9777) 2022-11-14 21:42:06 +01:00
hius07
06cec98d09
Filemanagerutil: let abbreviate manage extra slash (#9785) 2022-11-14 02:20:26 +01:00
Khoi Le
01975366b6
Add Vietnamese dictionaries (#9783) 2022-11-13 17:24:19 +01:00
hius07
80f818e757
Button: fix long wrapped text alignment (#9778) 2022-11-12 21:23:46 +01:00
weijiuqiao
77e0ac57de
Vocabulary builder: make a word's book title changeable (#9776)
Adds the ability to re-assign which book a word belongs to
and change the name of an existing book. It can be used as
a way to regroup words and hide/show them by book.
2022-11-12 21:22:58 +01:00
hius07
71c65d18f1
Page turns: add backward tap zone width setting (#9772) 2022-11-12 08:40:31 +02:00
poire-z
1fa706a2c5
Fix page stats messed up after rerendering (#9775)
Fix regression introduced by 48eb0231 #9651: on re-rerendering, the new pages count didn't reach the Statistics plugin.
So, if you change font size or margins, the stats for the page read since then were badly accounted, until a change of book or restart... I noticed that in Book map, strange nobody else did over the last 2.5 weeks.
2022-11-11 21:43:27 +01:00
weijiuqiao
8500fdd519
Cloud-based sync for 2 plugins: reading statistics and vocabulary builder (#9709)
This commit adds cross-device sync ability for two plugins: reading statistics and vocabulary builder. It relies on user setting up a Cloud server (DropBox and WebDAV but not FTP though) and designating a path. Behind the curtains sqlite databases are being passed around and updated.

UI-wise, for the statistics plugin, two new menu items Synchronize now and Cloud sync to set it up (might not be the best wording) are added. As for vocabulary builder, a similar Cloud sync button is added to the menu and a shortcut icon button to Synchronize now is pinned at the bottom corner.

CloudStorage new features: WebDAV creating folders and uploading files. And a new widget-like sync server chooser. In the end I decided not to add automatic sync, as the SQL commands part seem a bit much.
2022-11-11 15:53:06 +01:00
hius07
4f3000e882
ReaderHighlight: fix ending fragment check (#9769) 2022-11-10 18:13:18 +02:00
NiLuJe
c5700b718d Android: Get rid of the Camera key hack
Unnecessary now that we have a standard mechanism to disable touch input
;).
2022-11-09 00:20:12 +01:00
NiLuJe
58ba4076a8 Kobo: Detect the original Touch "A" variant properly.
Because, of course, it has different input quirks than the B...

Fix #9742
2022-11-09 00:20:12 +01:00
NiLuJe
c7f5bfb72a ScreenSaver: Handle Power button presses properly if the screensaver
lock is enabled

Fix #9744
2022-11-09 00:20:12 +01:00
NiLuJe
1ec6fb5fcf InputContainer/Dispatcher: Allow toggling touch input
This is made easier by the fact that only a single method in a single
widget actually handles Gesture, and that we barely ever overload it.
So, apply a bit of monkey-patching trickery to handle the magic :).

Fix #9695
2022-11-09 00:20:12 +01:00
NiLuJe
47734eefef DeviceListener: Unify Notification usage 2022-11-09 00:20:12 +01:00
zwim
a1256f6758
Fix regression (introduced in #9657) (#9759)
This should fix #9741.
2022-11-07 16:33:12 +01:00
zwim
cd69382934
[plugin] AutoWarmth: fix frontlight toggle during day (#9735) 2022-11-04 09:31:06 +01:00
Frans de Jonge
0f52499d37
Dispatcher: add unused singular to action plurals (#9734)
Tools and humans alike are confused by leaving it empty. It should be inoffensive to resolve the problem this by having an unused singular. Doing anything else would make it so we couldn't have the correct plurals in Slovak, among others.

Follow-up to https://github.com/koreader/koreader/pull/9726
2022-11-03 08:46:16 +01:00
zwim
48a1f53d21
[doc] RadioButtonWidget (#9733) 2022-11-02 20:50:39 +01:00
zwim
07748b0999
[UIManager] Reverse order of _task_queue (#9706) 2022-11-02 20:08:15 +01:00
hius07
c3ed51aded
ReaderHighlight: set default long-press action with a gesture (#9723) 2022-11-02 13:58:12 -04:00
NiLuJe
8e31bc8a68 ExternalKeyboard: Simplify the menu shenanigans
checked_func implies keep_menu_open anyway
2022-11-02 03:48:39 +01:00
NiLuJe
925fd647dc InputContainer/FocusManager: Simplify key_events clearing on unplug
Thanks to @poire-z for the idea, it's indeed much nicer this way ;).
2022-11-02 03:48:39 +01:00
NiLuJe
09498d4bbb ReaderUI: Refresh key_events handlers on keyboard hotplug 2022-11-02 03:48:39 +01:00
NiLuJe
e0bfebb0b5 FileManager: Refresh key_events handlers on keyboard hotplug 2022-11-02 03:48:39 +01:00
NiLuJe
8cba303b96 ReaderPanning: Don't crash in the key event handler.
I'm unclear on where this is supposed to do anything, though.
But at least it no longer crashes, so, yay?
2022-11-02 03:48:39 +01:00
NiLuJe
9863a9c0bb ExternalKeyboard: Use the evdev number passed along by base to avoid sweeping the full list of input devices
This required some... creative thinking to avoid complexifying common
Input/UIManager codepaths ;p.
2022-11-02 03:48:39 +01:00
NiLuJe
25dce4d1b5 WebDAV: Fix a warning with the latest LuaCheck version
(error-prone negation)
2022-11-02 03:48:39 +01:00
NiLuJe
1e24a1c7a3 ReaderUI: Properly neuter gesture handling from InputContainer modules
None[1] of them actually rely on their own onGesture handler, they
all register their own stuff to ReaderUI's.
Hotfix #9710 revealed that the way this was handled didn't exactly
work as expected ;).

The only thing that consumes ges_events is InputContainer's onGesture
method. All these modules *extend* InputContainer, but none of them
*implement* a custom onGesture, so self.onGesture = nil was just a NOP,
they always access InputContainer's method via inheritance.
If we actively want to neuter it, we *have* to implement it in that
module (with a NOP).

[1] The exception being ReaderZooming, but that only when in flip mode.
2022-11-02 03:48:39 +01:00
Frans de Jonge
71cad1e49c
Fix broken translation metadata (#9726)
Should fix https://github.com/koreader/koreader/discussions/9719

Regression introduced in https://github.com/koreader/koreader/pull/9682 by my fault.

See the xgettext error message:

```
frontend/dispatcher.lua:573: warning: Empty msgid.  It is reserved by GNU gettext:
                                      gettext("") returns the header entry with
                                      meta information, not the empty string.
xgettext: warning: msgid '' is used without plural and with plural.
                   xgettext.c:1975: Here is the occurrence without plural.
                   frontend/dispatcher.lua:573: Here is the occurrence with plural.
                   Workaround: If the msgid is a sentence, change the wording of the sentence; otherwise, use contexts for disambiguation.
```

Co-authored-by: Frans de Jonge <frans@clevercast.com>
2022-11-01 20:59:19 +01:00
hius07
e3f134da78
KeyValuePage: enhance TitleBar (#9713)
Add left button.
Allow title centering (may be useful with the left button).
2022-11-01 19:22:03 +01:00
zwim
94d3d3b487
[timeval] RIP on All Saints Day (#9686) 2022-11-01 00:03:22 +01:00
poire-z
f10ea7d339
TextViewer: allow close on any multiswipe (#9720)
Similar to most fullscreen widgets.
2022-10-31 23:15:42 +01:00
weijiuqiao
42d4056f8f
Virtual keyboard: auto releasable Shift and keypopups (#9659)
Long-press on Shift to keep it non-auto-released.
2022-10-31 15:48:05 +01:00
NiLuJe
f58d1c0449
Cleanup: Track color constant name change (#9716)
* Bump base

https://github.com/koreader/koreader-base/pull/1547
https://github.com/koreader/koreader-base/pull/1548
2022-10-30 22:34:48 +01:00
yparitcher
4d8e2f0ea1 ges_events must be a table
regression in #9691 b523c2e8b9
2022-10-29 23:30:16 -04:00
Roygbyte
cf643c453b
KeyValuePage: Handle nil/empty kvp arrays (#9705) 2022-10-30 02:05:27 +02:00
NiLuJe
c740ee3174 Kindle: Make sure Device:untar actually works
The fuse proxy strikes again... Fix #9704
2022-10-29 22:55:20 +02:00
NiLuJe
0382e0d4c2 OTM: Handle syntax errors at *both* stages when migrating
defaults.persistent.lua

We were pcall'ing the parsing, but not the execution...
The funky Lua syntax quirks means that it is possible to pass the former
but not the latter ;).

Fix #9700, de-facto regression since #9546
2022-10-29 22:55:20 +02:00
NiLuJe
5cb358f653 PocketBook: Move low-level input event type translation to the low-level
input modules.

There was a weird mix of touch being handled there, and key/msc here,
which was weird and made the logs extremely confusing to read.
2022-10-29 22:55:20 +02:00
NiLuJe
3dd87a38b3 Kindle: Oh, hey, turns out that was the new Basic
I'd completely forgotten they'd announced one ;o).
2022-10-29 22:55:20 +02:00
NiLuJe
43b021d37c Input: Allow disabling rotation_map entirely
(This involves moving it to the instance object to avoid inheritance).

Pocketbook: Disable rotation_map on the Era (fix #9556)
It would appear that InkView handles the translation for us, now...
2022-10-29 22:55:20 +02:00
NiLuJe
9470d473da Kindle: Lower some PM log messages to debug 2022-10-29 22:55:20 +02:00
NiLuJe
b1504ea718 Kobo: Downgrade some suspend logging messages to debug, and *all*
standby logging messages to debug (except for warnings/errors, of course).
2022-10-29 22:55:20 +02:00
NiLuJe
dbc559c0e0 USBMS: Add a human-readable log message when entering USBMS
Because apparently people are confused by the UIManager:quit ones...
2022-10-29 22:55:20 +02:00
NiLuJe
cac37ad018 Kobo: Flag all the boards similar to the Libra 2 as unreliable (Clara 2E
& Nia).

And also disable the jump marker on those, like we did for the Libra 2.
2022-10-29 22:55:20 +02:00
NiLuJe
bf574bfaaf GestureDetector: Only show the final adjustGesCoordinate log if the gesture actually was adjusted. 2022-10-29 22:55:20 +02:00
NiLuJe
b656b9f5af Persist: Make sure data is flushed to disk on save
(i.e., do the usual flush & fsync dance, because FAT32 is the worst).
2022-10-29 22:55:20 +02:00
NiLuJe
b523c2e8b9 InputContainer: Fall cleanup ;).
Get rid of the doc & seqtext fields, as they are not actually used (nor
are they particularly useful, the event handler's name should be pretty
self-explanatory).

Also, tweak the key_events documentation to highlight the quirks of the
API, especially as far as array nesting is involved...

Random drive-by cleanup of the declarations of key_events & ges_events
to re-use the existing instance object (now that we know they're sane
;p) for tables with a single member (less GC pressure).
2022-10-29 22:55:20 +02:00
Borys Lykah
9b2201a438
Initial hotpluggable keyboard handling (#9540)
* Added a new plugin external-keyboard. It listens to USB events. When keyboard is plugged in or plugged out, it updates device and input configuration accordingly.
* Added new fake events UsbDevicePlugIn and UsbDevicePlugOut that are emitted when a device is connected to a book reader that plays the role of USB host. The usage of the existing events UsbPlugIn and UsbPlugOut has not changed - they are used when a reader is connected to a host. The koreader-base has a related PR for those events.
* Did a small refactoring of initialization for the modules FocusManager and InputText. They check device keyboard capabilities on their when the module is first loaded and store it. Some of the initialization code has been extracted into functions, so that we can re-initialize them when keyboard is (dis)connected.
* Initial implementation centered around text input, and tested with USB keyboards on devices with OTG support.
* Said OTG shenanigans are so far supported on devices with debugfs & the chipidea driver, or sunxi devices.
2022-10-29 22:46:35 +02:00
hius07
a8ff3a6571 readerzoomin: add zoom mode translation, simplify zoom mode validation 2022-10-29 17:48:21 +02:00
hius07
0919c4ef17 readerkoptlistener: simplify zoom mode validation 2022-10-29 17:48:21 +02:00
weijiuqiao
e8cd2ba498
WebDAV: fix bugs when start folder starts with "/" (#9688) 2022-10-29 17:45:52 +02:00
zwim
d7c63edca6
Random optimizations (#9657) 2022-10-28 07:51:27 +02:00
zwim
31b16ba3e1
UIManager: get rid of self._running and self._run_forever (#9669) 2022-10-27 22:08:38 +02:00
hius07
d37803a8e7
Dispatcher: preserve profile name, show actions count (#9682)
(1) Preserve profile name when selecting the "Nothing" action.
(2) Show number of actions instead of "Many".
2022-10-27 14:29:50 +02:00
weijiuqiao
ad89742e9b
Keyvaluepage: better alignment (#9672) 2022-10-25 21:50:40 +02:00
hius07
1d9c81de6e
ScrollableContainer: fix 'argc' (#9680) 2022-10-25 14:51:14 -04:00
Roygbyte
724db87755
ButtonDialog: add documentation about layout (#9505) 2022-10-25 13:50:21 +02:00
sonix-github
eb56948fac
Keyboard: add Slovak virtual keyboard (#9656) 2022-10-25 13:44:19 +02:00
poire-z
48eb02318d
Dispatcher: avoid multiple cre rerenderings when many settings changed (#9651)
When a gesture/profile was updating multiple cre settings,
each setting handler would emit UpdatePos which each would
force a re-rendering.
When this might be happening, postpone the rerendering
until all are set.
Needs some bit of refactoring to the events at play:
introduce "DocumentRerendered" event, and use it where
we used "UpdatePos" or "UpdateToc" to mean exactly that.
2022-10-25 13:16:01 +02:00
hius07
d1abbbfdd8
Document settings submenu: add Save as default (#9643) 2022-10-25 12:34:23 +02:00
weijiuqiao
edf7cc9a61
Vocabulary builder: support extracting context from pdfs (#9622)
Move getSelectedWordContext(), now document specific,
from ReaderHighlight into each document module.
2022-10-25 12:23:18 +02:00
weijiuqiao
58613d66e7
UI font fallbacks: use bold fonts if present for bold (#9621) 2022-10-25 12:18:46 +02:00
hius07
4d4b04359c
ReadHistory: refactoring with binary search (#9603)
Get rid of indexing and sorting, reduce flushing.
2022-10-25 12:15:59 +02:00
NiLuJe
54fae2987e
Support Android AArch64 (#9645)
c.f., https://github.com/koreader/koreader-base/pull/1540 & https://github.com/koreader/android-luajit-launcher/pull/390
2022-10-25 01:54:18 +02:00
NiLuJe
82b5f64178 time: Fix another subtle FP issue in split_s_us
The us part wasn't actually truncated properly.
2022-10-25 01:47:01 +02:00
NiLuJe
318d0e0ff0 UIManager: Modernize commented out debugging code
If you've ever enabled the main loop debugging, you'll know that
actually dumping the full window stack was *hilarious*.
Just print table counts, it's often good enough to debug what's
happening in the exceedingly rare cases you need this ;).
Also, it'll actually be readable, unlike the previous insanity ^^.
2022-10-25 01:47:01 +02:00
NiLuJe
390c875c80 Fix: key_events cannot be nil anymore since #9586 2022-10-25 01:47:01 +02:00
NiLuJe
d2ac2ca6e7 Cleanup: Remove unused onAnyKeyPressed handlers
And simplify the few we do catch by using aliases instead of duplicated
functions;).
2022-10-25 01:47:01 +02:00
NiLuJe
78381c3afa ScreenSaverWidget: Actually enable the onAnyKeyPressed handler
Which allows us to exit the screensaver on, well, any key press ;o).
2022-10-25 01:47:01 +02:00
NiLuJe
854cbe9f94 Kobo: Unbreak frontlight toggle for some specific values
Because of floating point computery math stuff.

Regression since #9609
c.f., https://github.com/koreader/koreader/pull/9609#issuecomment-1288187080
2022-10-25 01:47:01 +02:00
poire-z
3dbcccb1a8
TextViewer: correct keyboard layout after long-press on Find (#9668) 2022-10-23 09:21:11 +02:00
hius07
e3fd612518
ConfigDialog: fix a bug with default values (#9666) 2022-10-22 07:28:43 -04:00
hius07
60a16c7e00
configdialog: fix bug with default values (#9662) 2022-10-21 14:33:07 -04:00
weijiuqiao
bb03cf7310
Chinese keyboard: fix harmless typo (#9633) 2022-10-20 21:15:54 +02:00
weijiuqiao
effddbc1ee
zh_keyboard: make number pad symbol mode (#9654)
This PR makes zh_keyboard's number pad symbol mode instead of shift mode, so that numbers are shown when the keyboard is called expecting numeral input.
2022-10-20 19:37:22 +02:00
NiLuJe
23c410344b
UIManager: Minor code cleanup (#9641)
* Remove a check made redundant by #9617
* Bump base (https://github.com/koreader/koreader-base/pull/1538)
2022-10-16 01:43:47 +02:00
NiLuJe
d9eb6e9717
Kobo: Always use open/write/close for sysfs writes (#9635)
Also simplifies a few UIManager log messages (re: https://github.com/koreader/koreader-base/pull/1537)
2022-10-14 01:50:03 +02:00
hius07
2a354912f4
buttondialogtitle: align upper borders (#9631) 2022-10-13 07:12:53 -04:00
weijiuqiao
ae8156ff9e Vietnamese keyboard: TELEX method backed by generic_ime 2022-10-12 23:41:48 +02:00
weijiuqiao
6a5a13dfc8 Generic keyboard IME bump: supports auto seperation when code is unique 2022-10-12 23:41:48 +02:00