Commit Graph

8340 Commits (8315ee1c7ee1ddf5f72ac16c60ceb7d7435176df)
 

Author SHA1 Message Date
zwim 8315ee1c7e
Notifications menu: remove "No notifications" (#7736)
Implemented when all other menu items are unchecked.
3 years ago
hius07 7419820c09
VirtualKeyboard: hold left/right arrows moves to start/end of line (#7730) 3 years ago
NiLuJe dac6fb4008
Notifications: Sort the settings appropriately in the FM (#7734)
Otherwise it's flagged as orphaned ;).

(Also tweak indenting of said settings to be more in line with how we
usually do these).

Overlooked in #7718
3 years ago
NiLuJe bee2a605f1
ReaderStatus: Don't crash in EndOfDocument actions that *immediately* destroy the ReaderUI instance. (#7733)
This is handled in an Event handler, but we have zero guarantee that
we're actually the *final* Event sent to the Document, and other Events
usually kinda need the Document instance to still be alive ;).

Delay action until the next tick to avoid potential crashes.
3 years ago
NiLuJe c05b1a4ee4
ReaderZooming: Deal with some more fallout of the new zoom modes (#7728)
* Namely, ensure zoom_mode is consistent with genus & type *both ways*. (I only dealt with the "no zoom_mode" case in my original fixup).
Because documents with settings dating back from before the new zoom modes had "old" zoom_mode settings mixed with "new" genus/type defaults that didn't agree with each other.
It lead to super-confusing ConfigDialog behavior, because ConfigDialog was in fact not reflecting the reality.
(As the source of truth is actually `zoom_mode`).

* There was a snafu in manual mode, because of the extremely weird way prefixes are handled by Configurable/ReaderConfig/DocSettings/ConfigDialog.
So, make sure we only have a *single* zoom_factor, and that it's updated and saved properly under the right name everywhere.

Fixes inconsistencies between first swapping to manual mode, and what the ConfigDialog said/did (because again: possibly a lie), vs., re-opening the same document, which would magically use *different* settings, closer to what was expected (but still broken because of the prefix mismatch and a disagreement on defaults between the two variants).

Fallout from #6885
3 years ago
hius07 fdb69e0eee
InputText: show clipboard dialog on long-press (#7719) 3 years ago
NiLuJe 0e83551e8d History: Don't flash when swapping documents
(i.e., when History is spawned from ReaderUI, delay the flash until we
*show* the next widget, instead of when we close the current RD
instance).

Prevents flashing the InfoMessage.
3 years ago
NiLuJe 2c4cbd12a2 DocumentRegistry: Downgrade refcount warnings to debug logging.
It can happen in perfectly sane contexts.

CReDocument: Don't destroy internal engine data when Document just
decreased the refcount (as opposed to actually tore down the document
userdata if it were the last ref).

PdfDocument: Only write edited documents if the Doc instance was torn
down.

PicDocument: Silence some DocumentRegistry related warnings
3 years ago
poire-z 7dea979ef4 ReaderHighlight: fix long-long-press regression 3 years ago
poire-z 26750dab99 ReaderHighlight: clearer symbols on selection start/end buttons 3 years ago
zwim 6e2be98edc
Notifications: options to show none/some/more (#7718)
Notification: adds some functions so it can be used as
a notification manager.
Have various bits of code emitting events that may generate
notifications advertize themselves as the source for following
notifications.
Add a menu to allow selecting some subsets of sources
to show or hide.
3 years ago
zwim 78fdce8e9f
Dispatcher: fix possible crash when no document (#7716) 3 years ago
Frans de Jonge 6e1950676a
[lang] Fix minor inconsistency (#7714)
It should be "Not found." as in "Find next".
3 years ago
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
3 years ago
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
3 years ago
poire-z 4b6b12b799 Remove unused "pan_delayed_interval" support 3 years ago
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.
3 years ago
poire-z e4fd45ef08 Pan zoom mode: update footer when panning in a same page 3 years ago
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.
3 years ago
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.
3 years ago
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)
3 years ago
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.
3 years ago
NiLuJe 2fd5eeb176 Bump base
https://github.com/koreader/koreader-base/pull/1372
https://github.com/koreader/koreader-base/pull/1371
3 years ago
NiLuJe 2986094cc9 ReaderFooter test: Untangle settings handling
Do a proper reset to defaults before each test without actually poking
at the defaults table itself.
3 years ago
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.
3 years ago
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.
3 years ago
NiLuJe a665901c51 ZSync: Flag this plugin as deprecated.
It's somewhat non-trivial, and has been unmaintained for years.
3 years ago
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