2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

8529 Commits

Author SHA1 Message Date
zwim
78fdce8e9f
Dispatcher: fix possible crash when no document (#7716) 2021-05-20 19:23:34 +02:00
Frans de Jonge
6e1950676a
[lang] Fix minor inconsistency (#7714)
It should be "Not found." as in "Find next".
2021-05-20 09:31:39 +02:00
NiLuJe
a7f23efa65
Double tap: Update default tap zones (#7711)
Make 'em match backward & forward.
Now that we have working overrides and the gesture manager, trying to fit them in a weird superset of the top corner tapzones in a vain attempt to avoid bad interactions doesn't make much sense anymore, and just makes the Gesture Manager UI confusing.

Also make sure the corner zones override the L/R ones for double taps, like it's the case with other gestures.

Fix #7710
2021-05-20 05:39:18 +02:00
poire-z
adf68a178d
bump crengine: various XML, text and FB2 fixes (#7712)
Includes:
- fb2.css: ensure page break after <body>
- (Upstream) XML parsing: fix long named character references
- XML parsing: don't trim double spaces in attributes
- Fix ignore occasional space at start of line
2021-05-20 01:08:48 +02:00
poire-z
4b6b12b799 Remove unused "pan_delayed_interval" support 2021-05-19 23:55:07 +02:00
poire-z
d0165f8bd1 Fix scrolling, add inertial scroll on non-eInk devices
Add a new reader module: ReaderScrolling, that exposes
some Scrolling options to the menu (which are to be used
by and implemented in ReaderPaging and ReaderRolling
themselves) and implement some inertial scrolling logic
used by both of them.
Default to "Classic scrolling" which is the expected
behaviour on phones and tablets.
The old CreDocument buggy behaviour is available as
"Turbo scrolling" for both Paging and Rolling documents.
Added a "On release scrolling" option that might be
useful on eInk to avoid dynamic pan/scrolling.

Try to avoid bad interactions between pan and swipe,
cancelling unwanted panning if we ended up doing a
swipe or multiswipe.
2021-05-19 23:55:07 +02:00
poire-z
e4fd45ef08 Pan zoom mode: update footer when panning in a same page 2021-05-19 23:55:07 +02:00
poire-z
0a3978f60b Reader: remove full refresh on vertical swipes
Small diagonal swipes is what can be used for
full refrehes. Tweak a bit how it is done.
2021-05-19 23:55:07 +02:00
poire-z
33744217de Chapter navigation: fix possible crash in scroll mode
Update self.current_page on each pos change,
so getPreviousChapter() and al. have something
to work with.
2021-05-19 23:55:07 +02:00
poire-z
001d48f6cc Fix a few possible crashes
- TextWidget: avoid crash with small max_width (could happen
  when opening menu on a small emulator window)
- TextWidget: avoid crash if re-used after :free()
- ReaderHighlight:clear(): fix possible crash when
  scheduled and run after document closed
- DictQuickLookup: minor canSearch() tweak ('selected_text'
  is normally available only on multiple words selection,
  but is currently available on single word selection thanks
  to some unrelated side effect)
2021-05-19 23:55:07 +02:00
zwim
067ece7281
Fix changeFontSize after added granularity (#7689)
Whith the new font size step of 0.5 (46a2d9c), the gesture
for increasing or decreasing font size would change the
size by only half of the given value.
2021-05-19 21:21:23 +02:00
NiLuJe
2fd5eeb176 Bump base
https://github.com/koreader/koreader-base/pull/1372
https://github.com/koreader/koreader-base/pull/1371
2021-05-19 20:55:00 +02:00
NiLuJe
2986094cc9 ReaderFooter test: Untangle settings handling
Do a proper reset to defaults before each test without actually poking
at the defaults table itself.
2021-05-19 20:55:00 +02:00
NiLuJe
7c7f9e6ebb Truly silence the attempt at loading SDL2
Expanding on https://github.com/koreader/koreader/pull/7682
ffi/input, loaded by the Device singleton, also needs to know that in
order to setup the proper input backend for SDL2.

Requires https://github.com/koreader/koreader-base/pull/1372 because
that's where the machinery for those checks live.
2021-05-19 20:55:00 +02:00
NiLuJe
d56a944b79 Tests: Handle FM/ReaderUI instances slightly more sanely
* Tear down FM instances properly
* Don't manhandle ReaderUI too much, and document when the tests do
  actively broken shit, like bypassing safeties to open two // ReaderUI
  instances.
2021-05-19 20:55:00 +02:00
NiLuJe
a665901c51 ZSync: Flag this plugin as deprecated.
It's somewhat non-trivial, and has been unmaintained for years.
2021-05-19 20:55:00 +02:00
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
2021-05-19 20:55:00 +02:00
NiLuJe
6dc1c1efca Unbreak ReaderFooter test
Tests: Update the ffi.metatype wrapper

(Better idea: move to busted master).
2021-05-19 20:55:00 +02:00
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.
2021-05-19 20:55:00 +02:00
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
2021-05-19 20:55:00 +02:00
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
2021-05-19 20:55:00 +02:00
NiLuJe
056eeef747 ReaderPaging: Unbreak flipping mode's double taps
As discussed in #7646, regression since #6322
2021-05-19 20:55:00 +02:00
NiLuJe
a31d944684 TextEditor: Disable on non-Touch devices
"fix" #7356
2021-05-19 20:55:00 +02:00
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.
2021-05-19 20:55:00 +02:00
hius07
e70bc60f0f
Inputtext: don't allow the cursor to move within a hint (#7687)
Same as 17e6049e but for "hold".
2021-05-19 19:09:22 +02:00
zwim
6cb2ba65cd
CRe: draw progress bar under alt status bar (#7667) 2021-05-19 18:14:14 +02:00
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.
2021-05-19 18:05:16 +02:00
Frans de Jonge
4afcca9d6e
Update translations for 2021.05 release (#7707) 2021-05-18 20:52:45 +02:00
zwim
31e6294315
[plugin] CoverImage: Use blksize for size of cached files (#7705) 2021-05-18 11:52:15 +02:00
NiLuJe
ba00f3879d
ReaderHighlight: nil guard a few self.hold_pos accesses (#7700)
Fix #7698

That only leaves a single unguarded access in onUnhighlight
2021-05-16 19:54:46 +02:00
Martín Fdez
ffd5b88c87 warn before downgrading APK. Prompt for download in the browser to get a notification 2021-05-16 16:55:50 +02:00
Martín Fdez
23b7bfe0ce move android specific bits outside OTAManager 2021-05-16 16:55:50 +02:00
NiLuJe
4b265bcd7a Allow ingoring the B288 feature bans, for debugging purposes. 2021-05-16 12:47:38 +02:00
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
2021-05-16 12:47:38 +02:00
Frans de Jonge
529c681851
CloudStorage: log error (#7694)
References <https://github.com/koreader/koreader/issues/7688>.
2021-05-16 12:46:26 +02:00
hius07
834feef8cd
InputDialog: add 'Go to line' button (#7673) 2021-05-16 12:45:36 +02:00
NiLuJe
e6027313e9 ConfigDialog: Gesture range needs to be a Geom
Regression since #7664
Fix #7681
2021-05-14 18:50:53 +02:00
NiLuJe
628aef2099 OTA: Unbreak exit code on Install
Regression since #7657
2021-05-14 18:50:53 +02:00
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
```
2021-05-14 13:31:24 +02:00
Frans de Jonge
feec47d982
[doc] Documentation stub for Dbg module (#7677)
Cf. <https://github.com/koreader/koreader/pull/7664#discussion_r631858784>.
2021-05-13 18:13:58 +02:00
Frans de Jonge
0ec74612db
Fix stupid typo (#7678)
I was still thinking about 341d6ac660 I suppose.

Hat tip to @yparitcher.
2021-05-13 17:58:11 +02:00
Frans de Jonge
11a22254d6
[doc] Fix random typo (#7676) 2021-05-13 17:57:48 +02:00
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
2021-05-13 15:52:55 +02:00
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
2021-05-13 13:05:05 +02:00
Frans de Jonge
a3575134af
Fix docs (#7674)
See https://github.com/koreader/koreader/pull/7668#issuecomment-840404170
2021-05-13 12:58:37 +02:00
Frans de Jonge
341d6ac660
[plugin] Wallabag: different timeouts for API calls vs file downloads (#7668)
Fixes <https://github.com/koreader/koreader/issues/7650>.
2021-05-13 10:15:53 +02:00
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.
2021-05-13 01:55:35 +02:00
zwim
a20cac6904
[chore] Remove dead code (#7665) 2021-05-12 16:47:16 +02:00
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.
2021-05-11 00:49:35 +02:00
Martín Fernández
939fcf7f0e
android: avoid downloading the APK again if there's one download in progress + fix signature error (#7657) 2021-05-10 20:36:22 +02:00