Commit Graph

1111 Commits (master)

Author SHA1 Message Date
hius07 fc7181419f
CoverImage: custom cover support (#10553) 11 months ago
hius07 01e6593dd4
File popup dialog buttons (#10537) 11 months ago
hius07 6cb245f86f
MoveToArchive register to Dispatcher (#10524) 11 months ago
Glen Sawyer 128f205324
[plugin] Statistics: fix sync caused by semicolon in SQL comment (#10503)
Follow-up to <https://github.com/koreader/koreader/pull/10498>.
11 months ago
Glen Sawyer 2aa11b13ad
[plugin] Statistics: sync the `last_open` field (#10498) 11 months ago
Frans de Jonge 710614752d
[doc, plugin] Exporter: manually specify module name (#10465)
Follow-up to <https://github.com/koreader/koreader/pull/10464>.
12 months ago
hius07 09425ea729
Exporter: fix comment for ldoc (#10464) 12 months ago
hius07 3d5775241d
Exporter: selected files (#10453)
Export highlights for selected files.
Having a button "Select all files in folder", it is easy to export the whole folder.
So, closes #10402.

To keep even number of buttons, added a feature "Show selected files list". May be useful to check selections before an operation. Just a sorted list, no titlebar or popup menu, tapping a file jumps to its folder.
12 months ago
hius07 7ab832081b
[plugin] Exporter: choose folder (#10448)
Default is still koreader/clipboard.
12 months ago
夏鲁豫 4c9231a8f8
[plugin] Exporter: add memos export (#10411)
Add an export method for memos, which originates from [flomo](https://flomoapp.com/) and now has an open-source self-deployment solution:[memos](https://github.com/usememos/memos)
12 months ago
hius07 8665929a5e
Exporter: correct access to doc settings (#10407) 1 year ago
zwim d718682502
Autowarmth: suntime.lua minimal documentation update (#10405) 1 year ago
Frans de Jonge 3da24046c0
[plugin] Exporter: avoid passing newlines to translators (#10400) 1 year ago
poire-z 2aeb4a87df
Statistics: fix ReaderProgress bad layout in RTL UI (#10389) 1 year ago
hius07 4f23a6fafa
Custom book covers (#10329) 1 year ago
zwim 662bd65a5f
Fix some screen refresh effects (#10306) 1 year ago
Mochitto 0db042fd0c
Fix crash exporting to Markdown with missing authors (#10278) 1 year ago
Mochitto 53079441f9
Fix: exporting all notes and single doc now both use metadata for author and title (#10280) 1 year ago
Mochitto c0615c3bda
Feature: Export to kindle's myClippings (#10263)
* Feature: Added the possibility to export using kindle's myClippings formatting
* Fix: files that have the same extension don't collide anymore
1 year ago
hius07 fd8cb14c00
CoverBrowser: fix getting cached info (#10346) 1 year ago
weijiuqiao 34c2dab54b
statistic.koplugin: fix today's timeline showing next day when within custom offset (#10299)
Continuing https://github.com/koreader/koreader/pull/10254#issuecomment-1494697269
1 year ago
zwim 4dbaca180a
PM: Optimize task queue handling around standby (#10203)
Instead of firing on(Enter|Leave)Standby Events, and having every other piece of code that might care about that handle re-scheduling their stuff themselves; simply make the standby implementation (i.e., AutoSuspend's) shift the whole task queue by the amount of time spent in standby to re-sync everything automatically.

(This is necessary in the first place because Linux, as the task queue ticks in CLOCK_MONOTONIC, which does *not* tick during suspend/standby; while we expect most of the tasks scheduled to actually reflect real world clock delays).
1 year ago
weijiuqiao 86ddfc856d
SSH.koplugin: fix cant stop SSH server bug when pid file's stale (#10300)
Fixes #9812.
1 year ago
hius07 483a005cc2
File browser: show Folder Menu on long-press on Home icon (#10298) 1 year ago
poire-z 7c5c7bb9cf Calendar view's day view: thicker separator at 00:00
When using the new option "Daily timeline starts at",
make the separator line between 23:00 and 00:00 thicker.
Also tweak time picker to pick minutes by units of 10,
and remove max hour (06:00) limitation.
1 year ago
hius07 b7c4e1c21b
ListMenu: show mark for books with highlights (#10276) 1 year ago
hius07 34ab0d8ac6
Folder Menu: sign for Home folder (#10288) 1 year ago
Mochitto d39cc78f9c
[plugin] Exporter: use util.getSafeFilename() to remove illegal characters from output filename (#10282)
Fixes #10281.
1 year ago
Piotrek Marciniak 2e630286df
Sync book statistics: add to dispatcher (#10285) 1 year ago
weijiuqiao 5648c942c1
Calendar view: add options to change start time of days (#10254)
Can be set for example to 04:00 to see after-midnight readings
with those of the previous evening in day timeline.
Also fix possible shifts in day start when crossing DST changes
with prev/next.
Also fix sorting (by reverse reading duration) of books at top
1 year ago
Mochitto 3a894f954c
Fix: Updated legacy directory, which crashed the program (#10260)
Fixes #10259
1 year ago
hius07 4d26650ad6
Filesearcher: add search in book metadata (#10198) 1 year ago
hius07 aedb713f82
Menu widget: cleanup (#10241) 1 year ago
poire-z f0122cf457 Button: handle 'width' as the final outer width
All our widgets are considering their provided 'width'
as the outer width, except Button which considered it
as some 'inner width', to which padding/border/margin
were added. Let's have them all consistent.
Some other widgets using Button had tweaks to account
for that odd behaviour: fix and simplify them.
Also fix Button layout when text is left aligned.
1 year ago
hius07 cc3e48fa3a
Coverbrowser: unify display modes (#10188) 1 year ago
weijiuqiao 6267249b1e
vocabbuilder: fix reset word progress bug (#10195)
fixes #10194.
1 year ago
hius07 a3d42ac344
Classic display mode: add popup file dialog buttons (#10185) 1 year ago
Frans de Jonge 4e78b081f9
[i18n] Calibre plugin: improve clarity for translators (#10172)
The path list will start with \n already, but an extra newline
won't hurt and this string is really weird (i.e., people will
naturally put a space or a newline in front of it).
1 year ago
hius07 38bd768d5e
DocSettings: Move book metadata to preferred location (#10149) 1 year ago
hius07 55f1b8c974
UX: a set of minor fixes (#10165)
- AutoFrontlight plugin: update checkmark on toggling
- KeepAlive plugin: update checkmark on toggling
- ReaderPageMap: font size menu entry
- ReaderStatus, common_settings_menu_table: book status "read" -> "finished"
1 year ago
Frans de Jonge 26dc43553b
[fix] CoverBrowser: fix calling upvalue crash in MosaicMenu (#10164)
Regression introduced in #10140.
1 year ago
Frans de Jonge 03a9551565
[i18n, plugin] Exporter: fix some incorrect uses of translation (#10159)
Fixes #9231.
1 year ago
hius07 5c9ba53353
History: update last book access time (#10156) 1 year ago
hius07 54fc6533b1
MoveToArchive fix DocSettings (#10152) 1 year ago
hius07 d38c71a7bc
Wallabag: fix doc settings (#10147) 1 year ago
melyux 55259846a8
Fix N_() usages, rearrange a SQL select (#10146)
Fix some of my early blunders in using the `N_()` gettext function. Mini-PR from https://github.com/koreader/koreader/pull/9924#discussion_r1104298501 (@Frenzie).

There was also one line for generating this same `%1 (%2 pages)` text that confusingly uses different ordering in the SQL query output; switched the two SELECT arguments around to make it match the other 5 usages. Works the same as before
1 year ago
hius07 5cf72b6eea
MosaicMenu: correct access to doc settings (#10140) 1 year ago
hius07 15605291c2
DocSettings: add support of centralized sdr storage (#10132) 1 year ago
melyux e55b60175b
CoverBrowser Mosaic: improve book status, floating progress bar (#9939)
- New dogear icons in Mosaic cover view to indicate each
  possible book status: 'Reading', 'On hold', 'Finished'
- Progress bar redesigned to be floating, taller, thicker
  bordered in Mosaic cover view
- Don't show progress bar if book is finished
- FakeCover bottom text (filename) adjusted to not overlap
  with progress bar and dogear if they exist
- Mosaic book shortcut letter moved from bottom left to
  top left
1 year ago
hius07 d1081fa982
Docsettings: add centralized sdr storage (#10074)
Added an option to choose a new location to save document settings, highlights and bookmarks 
(koreader/docsettings folder).
1 year ago
poire-z 81f2aed086 ReaderRolling: quicker partial rerenderings with EPUBs
Only available with EPUBs containing 2 or more fragments,
and a file size large enough to ensure a cache file is used.
The idea is simply, on any rendering setting change, to
skip the rerendering of the full book and to defer any
rerendering to the moment we draw a DocFragment, and
render only it.
So, on a setting change, only the fragment containing the
current page will be rerendered, and the new fragments we
may cross while turning pages.
When having done so, KOReader is in a degraded state (the
full page count is incorrect, the ToC is invalid...).
So, a full rerendering is needed, and one will happen
in the background, and when the user is idle, we reload
seamlessly and quickly from the cache file it has made.
ReaderFlipping will show some icons in the top left
corner to let it know at which steps in this procress
we are.
1 year ago
zwim 8861955aeb
Recalculate timezone, (DST) (#10125) 1 year ago
hius07 da841f3d87
ListMenu: correct access to doc settings (#10119) 1 year ago
NiLuJe 8e9fc9953f
Calibre: Allow authors/title metadata browse/searches (#10113)
c.f., https://www.mobileread.com/forums/showthread.php?t=352142

This adds dedicated "browse by" buttons for authors & tags, and adds series & tags to the search settings for the meta "Search books" button.
1 year ago
Frans de Jonge dbad14e20b
ExternalKeyboard: make metadata capitalization abide by styleguide (#10081) 1 year ago
Utsob Roy c9007b1e29
Exporter: add seconds in markdown export (#10065) 1 year ago
melyux 8b99c50b2d
Duration format: add "Letters" format (1h30m10s) (#9924) 1 year ago
Melik bc92ad923e Move cache update logic into CoverMenu:updateCache 1 year ago
Melik 7d6da81233 Compact covermenu addn. to for loop, fix collections bug, further gimp genStatusButton to use upvalues 1 year ago
Melik d9b0785a96 Reset button gen to util, collections current file check
- filemanagerutil.resetDocumentSettings()'s doc_settings:close() -> doc_settings:flush()
- Remove current_status from filemanagerutil.getStatusButtonsRow() args, get it inside from file
- Move genStatusButton() inside filemanagerutil.getStatusButtonsRow()
- Move "Reset settings" button generation to filemanagerutil
- Rename "Reset settings" button to "Reset" and update popup box text
- Disable "Reset settings" for file if it's currently open in Collections (same as History)
1 year ago
Melik fb7ec830c6 Create getStatusButtonsRow() for status buttons, hide row if history item deleted 1 year ago
Melik 502bb0ccbf Create genStatusButton() for buttons, use item.dim for deleted in history 1 year ago
Melik 9e7e68beb6 Shorten status button names 1 year ago
Melik 1b2adfd201 Return to callback fudging, fix book info callback replacement 1 year ago
Melik a9313dda1a Add buttons to collections 1 year ago
Melik 57849b3f7c Add buttons to history, use id for button-getting 1 year ago
Melik 086d4622e6 Add buttons to file manager, lay groundwork 1 year ago
NiLuJe 45a4aac3d3
Notification: Fence the *display* update in an attempt to avoid upsetting some boards... (#10083)
Re: https://github.com/koreader/koreader/issues/9806#issuecomment-1416827447

Depends on https://github.com/koreader/koreader-base/pull/1576

Includes assorted cosmetics tweaks related to duplicate `setDirty` calls when instantiating widgets that already have an `onShow` handler doing it. (I left widgets doing it in `update` instead of `init` alone, on the assumption that callers *may* be relying on that behavior when updating widgets at runtime. This might actually never matter, and it certainly didn't for ScreenSaverWidget, which is why I removed it from there ;p).
1 year ago
zwim 4e944dc918 patch management
Use texteditor if available

Auto disable if patches folder doesnt exist

And show a restart message after file edit

Sort menu entries in execution order

Warning sign for failing patches
1 year ago
zwim cf9d3a0d70 Add quickEditFile method to texteditor 1 year ago
hius07 c403b3bd25
Profiles: create profile with current document settings (#10036) 1 year ago
NiLuJe 21210800c1
ReaderFooter/Header: Refine autorefresh repaint-or-not checks (#10045)
Use both a whitelist for targeted widget repaints, a blacklist for no repaint at all, and a fallback for a full in-order ReaderUI repaint when unsure.

Use a similar approach in ReaderHeader (i.e., prevent explicit refreshes while ReaderMenu is open).

Re #9979, re #9768
1 year ago
hius07 b83a009dff
Profiles: various fixes related to registration and gestures (#10033)
- Keep profile registration in a duplicate.
- Fix profile menu update on register/unregister.
- Update gestures and profiles after renaming a profile.
- Update gestures and profiles after deleting a profile.
- Update gestures and profiles after unregistering a profile.
- Fix Profiles touchmenu stack update.
1 year ago
Utsob Roy 64fefc7a22
Exporter: add highlight markdown style (#9976) 1 year ago
NiLuJe 7863a7ad70
Misc: Natural sorting refactor (#10023)
* Move natural sorting algo to a dedicated sort module to avoid code duplication
* Use a slightly more accurate algorithm, and speed it up by caching intermediary strings
* Calibre: Use natural sorting in metadata search (fix #10009)
1 year ago
zwim b3a7d32d54
[AutoWarmth] Simplify translations (#9996) 1 year ago
poire-z 581a943c42 TextEditor: use a file symbol instead of numbers in history 1 year ago
hius07 6e1683e313
KOSync: use MultiInputDialog instead of LoginDialog (#9962) 1 year ago
zwim 180cebe7ee
[CoverImage] use units in SpinWidget (#9938) 1 year ago
zwim 54a105c24f
TouchMenu: simplify/remove enabled_func in some cases (#9966) 1 year ago
zwim ebaef61536
Make translateable: SystemStat, custom footer (#9945)
Fixes #9942.
1 year ago
hius07 ee75abd4a0
Statistics: show correct number of notes in a book (#9928) 1 year ago
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.
1 year ago
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
1 year ago
Glen Sawyer 932ed44a9f
[plugin] Statistics: do not increment db sequences unnecessarily during cloud sync (#9921)
When you do an insert using either ON CONFLICT [...] DO NOTHING or INSERT OR IGNORE to prevent duplicate rows, sqlite still increments the sequence counter for each of the duplicate rows that it did not insert.
The only way around that is to explicitly write the SQL statement so that it doesn't try to insert the duplicates in the first place.
1 year ago
melyux b1bbd590db
Statistics: cleanup and tweaks (#9904)
Many tweaks (alignment, dates...), reordering and
rewording in "Current statistics", per-book stats,
and Reading progress.
1 year ago
NiLuJe 9b936d3f3c AutoSuspend: On Kindle, periodically reset the system's timeout so that
our own timeout can actually be honored.

Fix #7874, fix #9868
1 year ago
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).
1 year ago
poire-z 24a3c722c8
Calendar view: properly use datetime module (#9893)
No need to pass the translations from main.lua
to calendarview.lua.
Also use datetime translations in ReaderProgress.
1 year ago
Frans de Jonge c01a9fd213
[i18n] Remove stray newline from ExternalKeyboard string (#9890) 1 year ago
weijiuqiao a76f3f5bf5
Vocabulary builder: add search ability (#9881)
And allow circle multiswipe to reload words.
1 year ago
Frans de Jonge e1fe897c9b
[i18n] Add a couple of explanatory comments for translators (#9878) 1 year ago
weijiuqiao 49d8ec2f4f
Cloudsync: dropbox token re-generation (#9862) 1 year ago
greatyingzi a6f0c3a31c
ReadTimer: allow repeat when time is up (#9844) 1 year ago
zwim 192a243b4d Add datetime.lua
Move date and time related functions from util.lua
(and the statistics plugin) to a new datetime.lua.
1 year ago
zwim 7b2ac4769f
[plugin] AutoWarmth: cleanup code (#9788) 1 year ago
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. 1 year 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
1 year 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.
1 year ago
weijiuqiao 5082289aad
Vocabulary builder: allow longer intervals (#9764) 1 year 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
weijiuqiao 6bd7dfdf41
Vocabulary builder: add "Open..." to Dispatcher (#9634)
So it can be called from a gesture.
Also accommodate reset all in reversed order.
2 years ago
weijiuqiao edf7cc9a61
Vocabulary builder: support extracting context from pdfs (#9622)
Move getSelectedWordContext(), now document specific,
from ReaderHighlight into each document module.
2 years ago
NiLuJe d2ac2ca6e7 Cleanup: Remove unused onAnyKeyPressed handlers
And simplify the few we do catch by using aliases instead of duplicated
functions;).
2 years ago
Benoit Pierre 1d6f4acad0
CoverBrowser: fix some button callback overrides (#9647)
Broken since b0eb0ce0: the custom callbacks for the "Reset settings"
& "Book information" buttons are not being called anymore because
patching those is done to early (before instead of after creating
the new modified dialog).
2 years ago