Commit Graph

8313 Commits (90c38e2d0d162a7dd10af0ff9f169cb9dce96d06)
 

Author SHA1 Message Date
NiLuJe 90c38e2d0d ReadHistory: nil guard a Document instance access
We're now more careful about this, so, I suppose weird timings may mean
we might be trying to access a nil here.

Fix #7706

Guard a few other similar constructs
3 years ago
NiLuJe 6dc1c1efca Unbreak ReaderFooter test
Tests: Update the ffi.metatype wrapper

(Better idea: move to busted master).
3 years ago
NiLuJe 189035cafc ReaderFooter: Get rid of magic nil settings
And go through one-time-migration to ensure the settings are properly
filled.

Also, disable hold-to-skim by default.
3 years ago
NiLuJe 99ee3763c1 USBMS: Close all widgets before quitting
FFI finalizers can fire in unspecified orders, but for MuPDF,
we need to ensure that the context is the *very* last thing that get
destroyed.
As such, we need to make sure we close open documents properly on our
end, first.

This prevents potential crashes while switchign to USBMS inside an open
document handled by MuPDF.

Fix #7428
3 years ago
NiLuJe 8d3aacbac3 ReaderFooter: Fix the madness related to its hold footer
Namely, instead of making it lower priority than readerhighlight and
hoping for the best, make it higher priority, as it should (ReaderFooter
itself is *above* Reader, after all), with a sane set of fallthroughs:

* No footer
* No hold-to-skim
* Held outside the footer (but inside the footer tap zone)

This made the crap workaround from #7466 unnecessary, and actually fixes
the behavior in PDFs (because readerhighlight will match the *physical*
page, which may include off-screen content) and ePubs w/r eclaim bar
height (in which case, there's actual content behind the footer that
readerhighlight could have matched on).

Fix #7697
3 years ago
NiLuJe 056eeef747 ReaderPaging: Unbreak flipping mode's double taps
As discussed in #7646, regression since #6322
3 years ago
NiLuJe a31d944684 TextEditor: Disable on non-Touch devices
"fix" #7356
3 years ago
NiLuJe 94f708b53b BookInfoManager: Actually close the document after extraction
DocumentRegistry just decreases a ref, it doesn't close anything.

Plug the same Document leak in a few other places, and document this.
3 years ago
hius07 e70bc60f0f
Inputtext: don't allow the cursor to move within a hint (#7687)
Same as 17e6049e but for "hold".
3 years ago
zwim 6cb2ba65cd
CRe: draw progress bar under alt status bar (#7667) 3 years ago
hius07 f3fe643d81
InputDialog: add search (#7701)
Searches for a string in the edited text.
Available in the Text editor and other input dialogs with the navigation bar enabled.

Find first searches from the beginning of the text.
Find next searches from the next to cursor position, used for continious search.
By now, the Search input window is closed after the search. You need to press the Find button again for continious search, the search string is kept in the input.
Is it better to keep the dialog open for the comfortable continious search? And close it with the Cancel only?

Case insensitive. Cursor jumps to the beginning of the found string.
Notifications are shown for better results visibility.

Unfortunately, violated our standartization to "search", couldn't invent better short wordings.
3 years ago
Frans de Jonge 4afcca9d6e
Update translations for 2021.05 release (#7707) 3 years ago
zwim 31e6294315
[plugin] CoverImage: Use blksize for size of cached files (#7705) 3 years ago
NiLuJe ba00f3879d
ReaderHighlight: nil guard a few self.hold_pos accesses (#7700)
Fix #7698

That only leaves a single unguarded access in onUnhighlight
3 years ago
Martín Fdez ffd5b88c87 warn before downgrading APK. Prompt for download in the browser to get a notification 3 years ago
Martín Fdez 23b7bfe0ce move android specific bits outside OTAManager 3 years ago
NiLuJe 4b265bcd7a Allow ingoring the B288 feature bans, for debugging purposes. 3 years ago
NiLuJe f413cd15e8 PB: Unconditionally disable HW rotation on B288 SoCs
Apparently, it's even more broken than usual on some devices/FW combos.

Fix #7663
3 years ago
Frans de Jonge 529c681851
CloudStorage: log error (#7694)
References <https://github.com/koreader/koreader/issues/7688>.
3 years ago
hius07 834feef8cd
InputDialog: add 'Go to line' button (#7673) 3 years ago
NiLuJe e6027313e9 ConfigDialog: Gesture range needs to be a Geom
Regression since #7664
Fix #7681
3 years ago
NiLuJe 628aef2099 OTA: Unbreak exit code on Install
Regression since #7657
3 years ago
Martín Fernández c1892d2619
[chore] Move SDL check to the end of Device's probe function (#7682)
To avoid a few log lines on all platforms:

```
ffi.load: SDL2
ffi.load (warning): libSDL2.so: cannot open shared object file: No such file or directory
ffi.load: libSDL2-2.0.so
ffi.load (warning): libSDL2-2.0.so: cannot open shared object file: No such file or directory
ffi.load: libSDL2-2.0.so.0
ffi.load (warning): libSDL2-2.0.so.0: cannot open shared object file: No such file or directory
```
3 years ago
Frans de Jonge feec47d982
[doc] Documentation stub for Dbg module (#7677)
Cf. <https://github.com/koreader/koreader/pull/7664#discussion_r631858784>.
3 years ago
Frans de Jonge 0ec74612db
Fix stupid typo (#7678)
I was still thinking about 341d6ac660 I suppose.

Hat tip to @yparitcher.
3 years ago
Frans de Jonge 11a22254d6
[doc] Fix random typo (#7676) 3 years ago
Frans de Jonge 7ac4f31d1f
Bump base (#7675)
With https://github.com/koreader/koreader-base/pull/1369 for #7664.

Also contains LuaJIT bump https://github.com/koreader/koreader-base/pull/1370
3 years ago
NiLuJe bb65a69193
Geom: nil guard a few rect methods (#7664)
We've managed to trip a few of those on dimen fields post-init but
pre-paintTo in a few weird coner-cases, a point at which dimen is often
nil.

ConfigDialog: Deal with that very thing in update()

Fix #7656
3 years ago
Frans de Jonge a3575134af
Fix docs (#7674)
See https://github.com/koreader/koreader/pull/7668#issuecomment-840404170
3 years ago
Frans de Jonge 341d6ac660
[plugin] Wallabag: different timeouts for API calls vs file downloads (#7668)
Fixes <https://github.com/koreader/koreader/issues/7650>.
3 years ago
poire-z f0ecbeb1d5
ReaderToc: option to show a dotted line (#7669)
A dotted line joining the ToC entry text to the
page number may make it easier to use.
(This replaces the menu item separator from d879062e.)
Also fix baselines aligment, which could be a bit off.
3 years ago
zwim a20cac6904
[chore] Remove dead code (#7665) 3 years ago
NiLuJe de6f2e84a3
FileManager/ReaderUI: Clarify the current instance accessor (#7658)
* FileManager/ReaderUI: Clarify the current instance accessor

Make it clearer that we actually store it in a *module/class* member, not an *instance* member.

Also, warn if there's a close/open mismatch.
3 years ago
Martín Fernández 939fcf7f0e
android: avoid downloading the APK again if there's one download in progress + fix signature error (#7657) 3 years ago
Martín Fernández 247166b3df
android: keep bundled version in a dedicated text file (#7649) 3 years ago
Hzj_jie 1a08f2cb69
Plugins: adds PluginMenuInserter helper (#7419)
Allows user-plugins to register themselves
into "More tools" menu.
3 years ago
zwim d082f795e6
Dispatcher: some formatting cleanup, rewording and re-ordering 3 years ago
NiLuJe 1dd300d822 Bump base
https://github.com/koreader/koreader-base/pull/1368
3 years ago
NiLuJe 1ffbd8760d KOPTInterface: Minor optimization when hashing the configurable status
Use a table & table.concat instead of individual concats.
And then use that same table for every hash-related operation.

(Nothing else uses the configurable hash function, otherwise I'd have
limited the table shenanigans to the function itself).
3 years ago
NiLuJe 48c474e245 Device: Add some more logging in onPowerEvent
Could possibly help shed some light on potential SleepCover races...
re #7633
3 years ago
NiLuJe 2635593890 Cache: Some more tweaks after #7624
* Allow doing away with CacheItem
  Now that we have working FFI finalizers on BBs, it's mostly useless overhead.
  We only keep it for DocCache, because it's slightly larger, and memory pressure might put us in a do or die situation where waiting for the GC might mean an OOM kill.
* Expose's LRU slot-only mode
  And use it for CatalogCache, which doesn't care about storage space
* Make GlyphCache slots only (storage space is insignificant here, it was
  always going to be evicted by running out of slots).
* More informative warning when we chop the cache in half
3 years ago
NiLuJe 05806abeaa CreDocument Call Cache: Minor modernization tweaks
* Neuter timekeeping when statistics are disabled
  Saves a few syscalls ;).
* Port to ffi/lru
  Only a tiny bit of it actually requires any sort of LRU logic, so it's fairly painless.
* Release the cache on close
* Use string.buffer to serialize function arguments
  Ought to be faster than the custom approach ;).
  (Still requires wrapping them in a table, though).
  It's much less human-readable, but then again, this doesn't need to be :).
3 years ago
NiLuJe ed0aa1ed11 ReaderUI: Ensure we flash when opening a document
Regression since #7624
3 years ago
Frans de Jonge 310151fac9
Fix typo (#7655)
Follow-up to #7632.
3 years ago
Martín Fernández d303fdf694
android: Prompt for install updates when they're downloaded (#7632) 3 years ago
hius07 3d713dc34c
Dictionary: disable 'Clean history' when the history is empty (#7636) 3 years ago
hius07 c129354ca3
Wikipedia: disable 'Clean history' when the history is empty (#7637) 3 years ago
hius07 170629c921
[plugin] Text editor: new 'Clean text editor history' etc. (#7635) 3 years ago
mergen3107 2c1cae64b6
Remove notification on font change (#7589)
Should reduce refreshes competition and avoid glitches.
3 years ago
zwim 46a2d9c145
Dispatcher: Make font size actions consistent with ConfigDialog's NumberPicker (#7626) 3 years ago