Commit Graph

8255 Commits (e7acec15261927eb5380813d85786b7b3108fc12)
 

Author SHA1 Message Date
NiLuJe e7acec1526 ReaderUI: Saner FM/RD lifecycle
* Ensure that going from one to the other tears down the former and
    its plugins before instantiating the latter and its plugins.

UIManager: Unify Event sending & broadcasting
  * Make the two behave the same way (walk the widget stack from top to
    bottom), and properly handle the window stack shrinking shrinking
    *and* growing.
    Previously, broadcasting happened bottom-to-top and didn't really
    handle the list shrinking/growing, while sending only handled the list
    shrinking by a single element, and hopefully that element being the one
    the event was just sent to.

These two items combined allowed us to optimize suboptimal
refresh behavior with Menu and other Menu classes when
opening/closing a document.
e.g., the "opening document" Notification is now properly regional,
and the "open last doc" option no longer flashes like a crazy person
anymore.

Plugins: Allow optimizing Menu refresh with custom menus, too.

Requires moving Menu's close_callback *after* onMenuSelect, which, eh,
probably makes sense, and is probably harmless in the grand scheme of
things.
3 years ago
NiLuJe 47cc7bb1a6 AutoTurn: Get rid of the weird settings_id hack, and use sane
schedule/unschedule pairs, like AutoSuspend.
3 years ago
NiLuJe 03d85bbf99 Terminal: Read settings at instantiation time, not loading time 3 years ago
NiLuJe b0cc940776 AutoSuspend: Unbreak scheduling & settings across instances
Plugins are loaded *once*, but torn-down/instantiated multiple times,
and sometimes in the reverse order.

As such, if we use a public function member as the scheduled task, we're
always pointing to the same function, and going from FM to RD
effectively *un*schedules it.

Instead, use an instance-specific closure, so that each instance
schedules & unschedules don't affect each other.

In the same vein, settings ought to be read at instantiation, not at
loading, otherwise, changing a setting in the FM, then switching to the
reader will not pick up the changes.
3 years ago
zwim 0d6be41c75
Better strings (#7611) 3 years ago
NiLuJe 7ed97c8714 Tests: Make the timeouts more lenient during OPDS tests
Helps prevent spurious failures when stuff is slow.
3 years ago
NiLuJe c9ba30a870 Unbreak FileManager test after #7582 3 years ago
NiLuJe b24ecf35d4 CreOptions: Display weight classes names, in addition to their raw value. 3 years ago
NiLuJe 56d7a2d86b CreOptions: Minor wording tweak after #7616
c.f., https://github.com/koreader/koreader/pull/7616#discussion_r622732969
3 years ago
NiLuJe ba0c18ccd4 Startup: Instantiate FileManagerHistory properly
Ensures rotation doesn't crash, and actually rotates the FM, too.

Fix #7617
3 years ago
NiLuJe 9f835156d1
PluginLoader: Allow querying whether a specific plugin is loaded (#7607)
* PluginLoader: Allow querying whether a specific plugin is loaded (instantiated, actually).

Re #7598

* PluginLoader: Add a method to access a specific Plugin's instance
(Besides `self.ui[plugin_name]`, that is).

Requires some nastiness to avoid pinning stale references in memory :s.

* PluginLoader:  Tweak genPluginManagerSubItem to keep from rebuilding `self.all_plugins`, it's using `loadPlugins`, which is cached, so it made no sense to re-compute this one.
3 years ago
NiLuJe 22da527ff5
Kindle: Enable AutoSuspend plugin (#7612)
Kindles are not flagged canPowerOff, although that's technically not
entirely warranted, but sorta makes sense.

The Plugin already handles that sanely, and will only expose/honor the
suspend timer.
3 years ago
poire-z 9ef435c97a
bump crengine: more granular font weights (#7616)
Includes:
- MathML: a few minor fixes
- (Upstream) lvtext: fix possible index out of range
- Fonts: RegisterExternalFont() should take a documentId
- Fonts: fix: letter-spacing should not be applied on diacritic
- (Upstream) Fonts: more granular synthetic weights
- Fonts: synthesized weights: tweak some comments
- Fonts: keep hinting with synthetic weight
- Fonts: fix synthesized weight inconsitencies
- Fonts: fix getFontFileNameAndFaceIndex()
- Fonts: adds LVFontMan::RegularizeRegisteredFontsWeights()
- Fonts: handle synth_weight tweaks in glyph/glyphinfo slots
- (Upstream) Fonts: fix some compiler warnings
- Fix hyphenation on Armenian and Georgian text

Update the bottom menu widget "Font Weight" to allow more
granular weights than the previous "regular | bold".

Also bump thirdparty/luasec to v1.0.1.
3 years ago
hius07 3cb9508185
Filemanager: enhance file operations dialogs (#7582) 3 years ago
hius07 3845424808
Gestures menu optimization (#7609) 3 years ago
hius07 86126d042f
Dispatcher: add "Toggle status bar" action (#7606) 3 years ago
hius07 9d9667c226
Status bar: do not hide alone empty indicators (#7602) 3 years ago
zwim fafc0bc678
Missed translatable (#7603) 3 years ago
zwim c8d5330631
Typo (#7601) 3 years ago
NiLuJe da4aec223c CloudStorage (FTP): Unbreak after #7597 3 years ago
NiLuJe 807b9079a4 Bump base
https://github.com/koreader/koreader-base/pull/1361
3 years ago
Andy Bao ea6576d2b6
CloudStorage (FTP): Do not buffer entire download in memory (#7597) 3 years ago
NiLuJe 5d312d85a0
Bump base (#7596)
https://github.com/koreader/koreader-base/pull/1360

(Fix #7593)
3 years ago
NiLuJe e0a67bb656
OTA: Handle tar checkpointing visual feedback w/ an FBInk daemon (#7588)
Instead of forking it on every checkpoint.

Won't change much in the grand scheme of things, but FIFOs are fun.
3 years ago
NiLuJe b0336e9982
PocketBook: Workaround platform shenanigans when aplying an OTA (#7585)
We can't avoid hitting a few permission errors, so, just filter them out.

Fix #7581
3 years ago
zwim 5ed272a786
Fix translation template (#7591) 3 years ago
Frans de Jonge e107aad42e
[fix] Use template 3 years ago
Frans de Jonge b81b8cfb2f
[chore] Fix typo 3 years ago
Frans de Jonge 36b40e02e7
[chore] Directory to folder (#7584) 3 years ago
NiLuJe dadab9267f Bump base
https://github.com/koreader/koreader-base/pull/1359
https://github.com/koreader/koreader-base/pull/1358
3 years ago
NiLuJe 6d752f32c0 Update android-laujit-launcher
https://github.com/koreader/android-luajit-launcher/pull/302
https://github.com/koreader/android-luajit-launcher/pull/301
https://github.com/koreader/android-luajit-launcher/pull/300
3 years ago
gbyl 617ed2c078
Gestures: Allow disabling tap and/or swipes for page turns (#7572)
Co-authored-by: gbyl <gbyl@users.noreply.github.com>
Co-authored-by: NiLuJe <ninuje@gmail.com>
3 years ago
yparitcher dde3c80e73
do not exit when opening unsupported file by last for FM (#7580)
fixes: #7577

see prior art in #3935 #3933
3 years ago
zwim e4c9409f97
[plugin] Add a caching mechanism for CoverImage (#7510) 3 years ago
Frans de Jonge 85085b545a
Update translations for 2021.04 release (#7579) 3 years ago
NiLuJe 14f9f9d3fc
FileManager: Tweak #7564 (#7571)
Tweak the goHome handler directly, instead of only the Home button.
Also, limit it to when it's actually needed, as changeToPath already
does it.
3 years ago
NiLuJe 9e9a87434b
NetworkManager: Just warn if the gateway is unreachable after a (#7570)
successful authentication.

Fully tearing down Wi-Fi was a bit optimistic, as the AP list can
technically still be up, so the user might want to try again and/or
connect to another AP.

Fix #5912, regression since #4616.

The reasoning behind #4616 doesn't really apply anymore anyway, as the
Wi-Fi prompt now handles this inconsistent state properly.

The whole codepath should be *extremely* rare anyway (and/or require
super-broken network conditions).
3 years ago
Martín Fernández 53234fcdc1
add hasSystemFonts device property (#7535)
Add system + user paths to the ReMarkable (has normal linux paths)
3 years ago
NiLuJe 9988eab1a1
ReaderToc: Unbreak ToC depth detection (#7569)
No need to reinvent the wheel.

Fix #7568, regression since #7553
3 years ago
hius07 3df1ce3644
Style tweaks: add links italic style (#7567) 3 years ago
gbyl 508a294016
ScreenSaver: Allow toggling the reboot/poweroff overlay message (#7566)
Co-authored-by: gbyl <gbyl@users.noreply.github.com>
3 years ago
NiLuJe d3213e6b80 UIManager: Follow the same ScreenSaver preparations than Generic's
PowerEvent handler

(i.e., flash to white befor eimages).

Re #7519
3 years ago
NiLuJe 14cd6febbb Kindle Legacy: Cleanup key mappings
The K3 has a mapping similar to the K4, not to the DX & K2.

Fix #7561
3 years ago
NiLuJe d6c6b3eb71 ReaderHeader: Skip the refresh if we're not visible
Similar in spirit to the previous commit, although since we're drawn as
part of the CRe page, this is just the refresh per-se that's optimized,
it had no chance to actually be visible.
3 years ago
NiLuJe 079418d3cd ReaderFooter: Smarter hardware event handlers
Make sure we don't repaint the footer over anything else than ReaderUI,
as some events are fired without direct UI interaction, so we can't be
assured of the actual state of the UI.

Fix #7556

Exposed since #7379, but could arguably happen with other existing
handlers before.
3 years ago
NiLuJe 832d915795 SortWidget: More tweaks
* Support cancelling individual moves.

Coopt the cancel button to actually do just that, cancel, instead of close.

* Don't close when hitting the accept button, allowing to chain multiple moves.

Changes are still propagated to the caller on each individual move, though.

* Update the new icons to match our usual stroke width.
3 years ago
gbyl 32802ee7f2
reMarkable: Remove refresh before poweroff (#7563)
This is now handled in a platform-agnostic manner (#7558).

Co-authored-by: gbyl <gbyl@users.noreply.github.com>
3 years ago
gbyl 915c5c7755
FileManager: Also refresh content when tapping the "Home" button (#7564)
Co-authored-by: gbyl <gbyl@users.noreply.github.com>
3 years ago
hius07 7b169dfa5e
FileManager: Hold the "+" button to refresh content (#7559) 3 years ago
yparitcher 475f46c427 fix for #7553: missing comma 3 years ago