2
0
mirror of https://github.com/koreader/koreader synced 2024-11-04 12:00:25 +00:00
Commit Graph

3041 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
weijiuqiao
efb335e195 KeyValuePage: fix key value too close when keys are short and values are long 2022-11-16 22:51:38 +01:00
Hannes Krumbiegel
a23c30f862
Add dictionaries for languages with over 1000 entries on Wiktionary (#9767) 2022-11-14 22:59:35 +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
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
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
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
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
e0bfebb0b5 FileManager: Refresh key_events handlers on keyboard hotplug 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
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
Roygbyte
cf643c453b
KeyValuePage: Handle nil/empty kvp arrays (#9705) 2022-10-30 02:05:27 +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
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
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
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
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