Commit Graph

915 Commits (v2022.11)

Author SHA1 Message Date
greatyingzi 61364ffc33
[chore] CoverImage: unified call method for Device.screen (#9839)
Co-authored-by: greatyingzi <greatyingzi@github.com>
1 year ago
poire-z b1f77ac085
Calendar view's day view: tweak SQL data extraction (#9834)
Ensure any reading at 0h00 or 23h59 looks like it
continues from previous or to next page if DB data
seems to indicate so.
1 year ago
Martín Fernández ee94a575f1
calibre: fix attempt to index path_entry (#9837)
Fixes #9836
1 year ago
poire-z 3ef2811e59
Calendar view's day view: visual tweaks (#9832)
- Add vertical lines every 10mn
- If today, show an arrow indicator at current time
- Add "Today's timeline" to menu
- Rename badly named self.hour_width, which is a height
1 year ago
hius07 905d5610ba
OPDSbrowser: accept catalogs without header in response (#9829)
Such catalogs are not cached.
Closes #6088.
1 year ago
weijiuqiao 1c42641733
Calendar view: fancier day details with timeline (#9813) 1 year ago
melyux 78772fcbb1
BatteryStat: show current battery percentage (#9814) 1 year ago
hius07 5b889a0145
Reader style tweaks: register in Dispatcher manually (#9816)
Style tweaks can be applied with a gesture or added to a profile.
1 year ago
zwim 486d7071c7
[StatusBar] Allow status bars to be repainted if they are not covered (#9768) 1 year ago
weijiuqiao 81b2f22b04
ReaderStatistics: fix sync sql command (#9811)
Fixes sync sql command that uses left join instead of
inner join, which adds unnecessary comparisons and
might result in incorrect mapping between databases.
1 year ago
hius07 1b066cf1de
Exporter: fix orphan highlights (#9802) 1 year ago
weijiuqiao e8983d335d VocabBuilder: fix not updating book title in the more dialogue when the book title is changed but not reassigned. 2 years ago
NiLuJe 779a8e00de ExternalKeyboard: Harden the debugfs check
* Don't even attempt to run mount if we're not root (e.g., emu or PB)
* Deal with sane init systems that mount debugfs as debugfs and not none
  (e.g., Kindle).

Also, switch to debug logging for those errors, pluginloader is already
verbose enough.

Fix #9774
2 years ago
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.
2 years ago
weijiuqiao 5082289aad
Vocabulary builder: allow longer intervals (#9764) 2 years ago
Dylan Calvin c5cd87f09a
(OPDS) Progess Sync Support for Kavita & Various Refactor Fixes (#9750) 2 years ago
weijiuqiao 678d0c911c
Vocabulary builder: safer db migration (#9702)
Refactor db migration to allow restarting from
an intermediate stage.
2 years ago
zwim d6b67f42d8
[plugin, AutoWarmth] Add time offset for toggling frontlight off (#9755) 2 years ago
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.
2 years ago
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
2 years ago
NiLuJe ce02e92937 ExternalKeyboard: Map KEY_ESC to Back, to ease navigation 2 years ago
NiLuJe 6f29b48587 ExternalKeyboards: Drop the startup FM workaround
Unnecessary since 2db294d0b7,
as the delayed event takes care of our problem ;).
2 years ago
weijiuqiao 74eb001eca
Calendar view: adjust color palette to avoid pure black bars (#9739) 2 years ago
Roygbyte eb1e084d93
NewsDownloader: avoid some crashes (#9697)
Keep nil reference from being passed to UIManager.
2 years ago
Martín Fernández 9473c70dcc
exporter: prevent exporting documents when they're not open (#9753)
Fixes #9740

thanks to @hius07 for the hint!
2 years 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
NiLuJe 4a355f789d ExternalKeyboard: Add a note about the special drivers sysfs knob
Just so that I don't forget about it entirely, as I haven't had to use
it so far...
2 years ago
NiLuJe 8e31bc8a68 ExternalKeyboard: Simplify the menu shenanigans
checked_func implies keep_menu_open anyway
2 years ago
NiLuJe d585cd5d86 ExternalKeyboard: Don't keep the menu open on toggle, the event cascade
may reinit stuff and close it anyway.
2 years ago
NiLuJe 2db294d0b7 ExternalKeyboard: Debounce the Connected/Disconnected events
Until we find a way to fine-tune the evdev device parsing, we'll often
have at least two devices per keyboard, but we only need a single event
;).
2 years ago
NiLuJe b28d52a124 ExternalKeyboard: Map KEY_COMPOSE to "Menu" 2 years ago
NiLuJe 5a939553fc ExternalKeyboard: Flip the hasKeys Device cap, too
This allows navigation to work as expected ;).
2 years ago
NiLuJe 53c0a65a5b ExternalKeyboard: Don't spam the "Keyboard connected" InfoMessage
Only show it for the first keyboard
2 years ago
NiLuJe 5b6d2ab66f ExternalKeyboard: Workaround bad interaction with coverbrowser when
enabled on startup
2 years ago
NiLuJe 02020176a9 ExternalKeyboard: Only disable OTG on exit
We currently did so on plugin destruction, which was a bit
overkill/annoying, as plugin instances are torn down on view
changes (i.e., when FileManager/ReaderUI are torn down) ;).
2 years ago
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.
2 years ago
Martín Fernández 8b8d79275c
calibre metadata: prevent duplicates (#9725)
Fixes #9722
2 years ago
hius07 e1a52b5881
OPDSbrowser: fix uninitialized calibre (#9718) 2 years ago
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
2 years ago
NiLuJe 4e233aafc0 AutoSuspend: Update the standby help message.
Tone it down for everyone, as it's been running smoothly for a while
now, but add a dedicated extra warning on buggy boards that it might
randomly implode.
2 years ago
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).
2 years ago
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.
2 years ago
hius07 c36a2929ac
OPDSbrowser refactoring (#9703)
Refactoring:
-removed duplicated code
-removed passing of username/password through all the modules
-logical order of the methods
-some optimizing and drying
-comments

New features:
-subcatalog link can be saved to the list of servers (eg: direct link to the catalog of books by an author)
-more book information can be fetched and shown (Book information)
-fixed access to the Standard library (by @KGKopli, closes #9372)
2 years ago
Dylan Calvin 07be320722
[plugin] OPDS: Add stream from page (#9681) 2 years ago
Martín Fernández 3530aef891
exporter.koplugin: send the right mimetype when sharing text. (#9194)
Add an option to send title too. Currently unused.
2 years ago
zwim dc2cc5cba2
AutoDim: close trapper widget explicitly (#9675) 2 years ago
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.
2 years ago
hius07 b8d9944a07
Profiles: optional registration in Dispatcher (#9623) 2 years ago