Commit Graph

8012 Commits (a5768c741180b66551caded25213fa96c2947492)
 

Author SHA1 Message Date
Martín Fernández a5768c7411
calibre plugin: handle huge metadata files (#7159)
metadata files > 30MB will be parsed manually to prevent OOM
3 years ago
Frans de Jonge 2db763c6f7
Bump base for nnsvg libm stuff (#7191)
Fixes #7190.

See <https://github.com/koreader/koreader-base/pull/1292>.
3 years ago
Martín Fernández 9f4e7456cf
bump base (#7181) 3 years ago
Glen Sawyer 34b177aa69
Wifi toggle for reMarkable 2 (#7122)
reMarkable 1 is no-op for the moment
3 years ago
Jason Benwell 41ab04b49e
Fix crash attempting to set compact items in status bar (#7172) 3 years ago
NiLuJe 0c76c73e4f
Assorted fixes after #7118 (#7161)
* I'd failed to notice that ButtonTable *also* instantiates seven billion Buttons on each update. Unfortunately, that one is way trickier to fix properly, so, work around its behavior in Button. (This fixes multiple issues with stuff using ButtonTable, which is basically anything with a persistent set of buttons. A good and easy test-case is the dictionary popup, e.g., the Highlight button changes text, and the next/prev dic buttons change state. All that, and more, was broken ;p).

* Handle corner-cases related to VirtualKeyboard (e.g., Terminal & Text Editor), which screwed with both TouchMenu & Button heuristics because it's weird.

* Flag a the dictionary switch buttons as vsync

(They trigger a partial repaint of the dictionary content).

* Flag the ReaderSearch buttons as vsync

They very obviously trigger a partial repaint, much like SkimTo ;p.
3 years ago
Cali-Co 66eb939936
[feat] Add skimming support for Non-Touch devices (#7163)
Fixes #6866.
Replace InputContainer with FocusManager for easier DPad Handling.
Add ProgressBar jump via key Q to P, corresponds with 0% to 100%.

Tested on K3 and SDL. Should be safe for devices with touch.
3 years ago
Frans de Jonge b1b2fbfc94
Update translations submodule for 2021.01 (#7156) 3 years ago
Frans de Jonge 1ef6d0b257
[feat] Support mimetypes in DocumentRegistry:hasProvider() (#7155)
And make .djvu the canonical extension for DjVu.

Fixes #5478.
3 years ago
Glen Sawyer 7753577616
[reMarkable] Don't need to keep attempting WiFi connection after success (#7121)
If we're in range of multiple known WiFi Access Points (including multiple instances of the same SSID), we don't need to keep trying to connect after the first successful connection.

Minimal change would have been replacing the return inside the foreach function with return [a non-nil value].
But foreach is deprecated, and since I was touching the code anyhow, I figured I'd do that tiny update as well.
3 years ago
Frans de Jonge 5c9dc850e8
Address assorted Weblate comments (#7154)
* Fix typo in dropbox

Reported by @lescheck

* Rephrase text justification explanation more elegantly

* CoverBrowser: fix up some plurals

* Statistics: remove random use of template function

* Use ngettext for minute/minutes and second/seconds

* Change KB/MB/GB to kB/MB/GB SI units
3 years ago
Jason Benwell cd6e2d9975
Make status bar prefix compact items a bit more compact (#7153)
For battery level, show icon only
Reduce separator between items to " " from "  "
3 years ago
NiLuJe 8bf829da0a
Bump base (#7150)
https://github.com/koreader/koreader-base/pull/1287
https://github.com/koreader/koreader-base/pull/1288
3 years ago
NiLuJe dffe86dfe9
Cleanup eye-gouging madness around io.read calls (#7149)
* Don't reinvent the wheel when reading a one-line int or string from sysfs

* Simplify a whole other bunch of read calls
3 years ago
Martín Fernández f52fffd467
Mark calibrecompanion plugin as obsolete (#7147) 3 years ago
Frans de Jonge 4b02edc4e1
Bump luajit-launcher (#7142)
For https://github.com/koreader/android-luajit-launcher/pull/288
3 years ago
NiLuJe 183e0a2e25
Bump android-luajit-launcher (#7137)
* Check available width when using a viewport

* Mention that available_width should always match width
3 years ago
poire-z 396d1fbf46
bump crengine: parsing, lists, 2-pages mode fixes & tweaks (#7138)
Includes:
- EPUB: fix truncated HEAD>STYLE stylesheet
- XML parsing: slightly better parsing of <script>
- Update German hyphenation patterns
- (chore) Silence some clang warnings
- (Upstream) CSS content: fix regression with open-quote/close-quote
- (Upstream) HTML lists: support the 'reversed' attribute
- (Upstream) Tweak list items disc/circle/square symbols
- 2-pages mode: option to skip geometry checks

CRE bottom menu: allow toggling Dual Pages in portrait mode.
3 years ago
Martín Fdez 1148e46651 migrate fontlist to persist 3 years ago
Martín Fdez b27cf0d168 migrate calibre plugin to persist 3 years ago
Martín Fdez b8f0dc3752 add table persistence module 3 years ago
NiLuJe 47b0d4089a
Remember the final rotation during Reboot/PowerOff/AutoSuspend, too (#7133)
Re #7096, Fix #7125

Co-authored-by: yparitcher <y@paritcher.com>
3 years ago
Jason Benwell f53fa1d323
[UX] Footer: add prefix option "Compact items" (#7127)
For a compact layout, with removed/shortened spaces.
3 years ago
poire-z 9b11497652 KOPT bottom menu: hide it when applying Zoom options 3 years ago
poire-z b92c078e9c ConfigDialog: temporarily hide when showing SpinWidgets
Hide bottom panel when showing a SpinWidget, so we gain
on the bottom the space covered by the SpinWidget to see
more how a change is affecting the book text.
For clarity, rename delay_repaint & refresh_callback
to hide_on_apply & when_applied_callback.

Normalize SpinWidgets: have them both accept a
cancel_callback and a close_callback.
InfoMessage: call dissmiss_callback also on timeout.
3 years ago
poire-z 4043ba27b0 CRE: fix to Top/Bottom margins fine tuning
Rework eb66856d so that "Sync T/B Margins" is disabled
when set Top and Bottom margins differ (previously,
the bottom one was taking over the top one when
it was enabled).
3 years ago
poire-z 8f79c662cf Notification: closed by any event, but not consuming it
Make Notification have toast=true, and UIManager deal
specifically with such widget:
a "toast" widget gets closed by any event, and let
the event be handled by a lower widget.
This should allow us to not wait or tap to get rid
of a notification, and just go on with what we're
doing.
Also make them have a default timeout of 2s,
used with all existing ones.
3 years ago
poire-z f1046f07a9 Dispatcher: increase hold_step for usability 3 years ago
Markismus 67ca9c35f5
Prevent sdcv from interpreting search term starting with dash as an option (#7134) 3 years ago
zwim 8991ec1372
Align wording of AltStatusBar menu to the bottom one (#7130)
Also change to "Font size (%1)"
3 years ago
NiLuJe 47568ae9b4
ScreenSaver: Unbreak "disable" mode (#7124)
* Unbreak "disable" mode

Regression since f67296942f
3 years ago
NiLuJe 3060dc81af
Revamp "flash_ui" handling (#7118)
* Wherever possible, do an actual dumb invert on the Screen BB instead of repainting the widget, *then* inverting it (which is what the "invert" flag does).
* Instead of playing with nextTick/tickAfterNext delays, explicitly fence stuff with forceRePaint
* And, in the few cases where said Mk. 7 quirk kicks in, make the fences more marked by using a well-placed WAIT_FOR_UPDATE_COMPLETE

* Fix an issue in Button where show/hide & enable/disable where actually all toggles, which meant that duplicate calls or timing issues would do the wrong thing. (This broke dimming some icons, and mistakenly dropped the background from FM chevrons, for example).
* Speaking of, fix Button's hide/show to actually restore the background properly (there was a stupid typo in the variable name)
* Still in Button, fix the insanity of the double repaint on rounded buttons. Turns out it made sense, after all (and was related to said missing background, and bad interaction with invert & text with no background).
* KeyValuePage suffered from a similar issue with broken highlights (all black) because of missing backgrounds.
* In ConfigDialog, only instanciate IconButtons once (because every tab switch causes a full instantiation; and the initial display implies a full instanciation and an initial tab switch). Otherwise, both instances linger, and catch taps, and as such, double highlights.
* ConfigDialog: Restore the "don't repaint ReaderUI" when switching between similarly sized tabs (re #6131). I never could reproduce that on eInk, and I can't now on the emulator, so I'm assuming @poire-z fixed it during the swap to SVG icons.
* KeyValuePage: Only instanciate Buttons once (again, this is a widget that goes through a full init every page). Again, caused highlight/dimming issues because buttons were stacked.
* Menu: Ditto.
* TouchMenu: Now home of the gnarliest unhilight heuristics, because of the sheer amount of different things that can happen (and/or thanks to stuff not flagged covers_fullscreen properly ;p).

* Bump base
https://github.com/koreader/koreader-base/pull/1280
https://github.com/koreader/koreader-base/pull/1282
https://github.com/koreader/koreader-base/pull/1283
https://github.com/koreader/koreader-base/pull/1284

* Bump android-luajit-launcher
https://github.com/koreader/android-luajit-launcher/pull/284
https://github.com/koreader/android-luajit-launcher/pull/285
https://github.com/koreader/android-luajit-launcher/pull/286
https://github.com/koreader/android-luajit-launcher/pull/287
3 years ago
poire-z 475bb648b0 Margins info msg: show left/right margin values
As we can now tweak them independantly.
3 years ago
poire-z ebf997dd99 DictQuickLookup: allow continuous reading with keys
We could scroll a definition with keys. Now, when
reaching top or bottom, switch to prev/next result.
3 years ago
poire-z 27b493afef Fix selected word non-highlighted on PDF
Optimisation for CRE from dd74194e made it not work with
KOpt-based documents.
3 years ago
poire-z 9ec3dcb376 ReaderDictionary: fix possible crash with Wikipedia
Also reword some "...canceled" to "...interrupted"
for consistency.
3 years ago
poire-z 1f2447dc06 Statistics plugin: change some logger.info() to dbg() 3 years ago
zwim a44c178d74
show AltStatusBar when changing the font size (#7119) 3 years ago
yparitcher 1c9c40fb95
Save rotation across restarts (#7096) 3 years ago
yparitcher 00556715f4
Dispatcher: update document.configurable (#7116)
So ConfigDialog knows about changed settings and
properly reflects their states.
3 years ago
Martín Fernández 5ec0b049d9
Add deprecation messages to plugins (#7101)
And deprecate Goodreads plugin.
3 years ago
poire-z 6c23d29a8a ReaderDictionary: tweak timings if interrupted quickly
Rework b66d0be3 and 6205f260 by making that simpler
to comprehend:
- If interruption or search result window is shown in
less than 3 secondes: no specific tweak, a tap outside
will dismiss everything instantaneously.
- If done after 3 seconds: show the interruption or result
window, and discard input for a few 100ms.
- UIManager:discardEvents(): increase a bit default delays.
3 years ago
poire-z 02ac2c4ce6 DictQuickLookup: re-add "tap on title" to set as preferred dict
Restore feature removed in c98dfef7: tap on title
to set dict of current result as a preferred dictionary
for this document.
Changes from former implementation:
- trust sdcv for ordering, instead of doing it ourselves
  by looking at the results (which didn't always work)
- allow setting multiple preferred dicts
- order of preference is shown with a number as a prefix
  to the dictionary name in the title
- taping again allows removing it from preferred dicts,
  and taping again allows setting it back as the first
  preferred dict
3 years ago
poire-z dc80321688 Search: fix matches not highlighted on current page
Regression (typo from cut and paste) from 7bd59330.
3 years ago
poire-z 2e95bc7a71 Statistics plugin: reorder Reset menu items 3 years ago
zwim 1a61e79a2c
Add menu to configure the top/alt status bar in crengine (#7107)
Allows toggling from the UI some crengine settings
related to the top status bar (which previously could
be done by editing cr3.ini).
3 years ago
yparitcher dc964f3941
reader.lua: rework file/directory argument handling. (#7053)
platform: do not pass a directory on the command line.
The home directory will be properly set by Device.home_dir.

It was sometimes crashing when opened with no args.

Fixes: #7049
3 years ago
yparitcher e157395660
add noop callback to cache size to prevent artifacts (#7106) 3 years ago
NiLuJe 34b764dc06 Kindle Legacy: Probe for SO on the K3 & K4 3 years ago
NiLuJe 1925f6e653 ReaderFooter:
* Flush mode to settings ASAP when an unrelated option updates the mode.
    Fixes, among other things, *enabling* the progress bar while the status
    bar is hidden: this showed it, but kept mode as "off".
  * Don't stomp on the current mode when toggling the progress bar.
    And *always* pop the status bar back up to see the difference, even if
    it's hidden.
    This used to be done only when *enabling* the progress bar.
3 years ago