2
0
mirror of https://github.com/koreader/koreader synced 2024-11-04 12:00:25 +00:00
Commit Graph

9724 Commits

Author SHA1 Message Date
NiLuJe
03c0fd7f9e Bump base
https://github.com/koreader/koreader-base/pull/1580
2023-02-11 20:01:31 +01:00
NiLuJe
96850c23a0
NetworkMgr: Refine isConnected check (#10098)
Much easier to deal with thanks to the cleanup work done in #10062 ;).

* `carrier` is set to 1 as soon as the device is *administratively* up (in practice, as soon as we run `ifconfig up`). This is perfectly fine for `isWifiOn`, but absolutely not for `isConnected`, because we are not, actually, connected to *anything*, no attempt at associating has even been made at that point. Besides being semantically wrong, in practice, this will horribly break the connectivity check, because it expects that `isConnected` means we can talk to at least the LAN.
* Delving into the Linux docs reveals that `operstate` looks like a better candidate, as it reflects *operational status*; for Wi-Fi, that means associated and successfully authenticated. That's... closer, but still not it, because we still don't have an IP, so we technically can't talk to anything other than the AP.
* So, I've brought out the big guns (`getifaddrs`), and replicated a bit of code that I already use in the USBNetwork hack on Kindle, to detect whether we actually have an IP assigned. (Other approaches, like `/proc/net/route`, may not be entirely fool-proof, and/or get complicated when IPv6 enters the fray (which it does, on Kobo, Mk. 8+ devices are IPv6-enabled)).

TL;DR: Bunch of C via ffi, and `isConnected` now returns true only when the device is operationally up *and* we have an IP assigned.

Pulls in https://github.com/koreader/koreader-base/pull/1579 & https://github.com/koreader/lj-wpaclient/pull/10
2023-02-10 23:47:08 +01:00
hius07
03454a89d8
Screensaver: correct access to doc settings (#10105) 2023-02-10 19:52:12 +01:00
NiLuJe
b1c30a7b1e
Input: Don't set unnecessary input translations when viewports are involved (#10104) 2023-02-10 18:05:46 +01:00
yparitcher
d60c75e00d network: Allow auto_wifi_off on kindle & remarkable
They expose a network sysfs entry so we can track usage

Works for me on kindle, but i stop the amazon framework
2023-02-09 18:29:40 -05:00
yparitcher
0e53631f48 NetworkManager: isWifiOn isConnected consistent usage.
cervantes kindle kobo remarkable: use sysfs carrier file to determine connection state

cleanup hasWifiManager checks

gateway check: use ip if available

Fixes: #10087
Closes: #10092
2023-02-08 00:06:04 -05:00
NiLuJe
67d0808494
Misc: Make --verbose do what it should be doing ;). (#10095)
Stupid c/p typo exists since its inception in #6976
2023-02-08 01:22:59 +01:00
proletarius101
9d2ac3a0fc
improve appstream metadata (#10094)
- add developer name (can be shown on flathub.org)
- set `Translate` link to the translation repository
2023-02-07 17:57:43 +01:00
Alexander Schlemmer
849687f2d0
[fix] kodev wbuilder crashes with "attempt to index global 'G_defaults' (a nil value)" (#10088)
Fixes #10084.
2023-02-07 09:08:28 +01:00
NiLuJe
45a4aac3d3
Notification: Fence the *display* update in an attempt to avoid upsetting some boards... (#10083)
Re: https://github.com/koreader/koreader/issues/9806#issuecomment-1416827447

Depends on https://github.com/koreader/koreader-base/pull/1576

Includes assorted cosmetics tweaks related to duplicate `setDirty` calls when instantiating widgets that already have an `onShow` handler doing it. (I left widgets doing it in `update` instead of `init` alone, on the assumption that callers *may* be relying on that behavior when updating widgets at runtime. This might actually never matter, and it certainly didn't for ScreenSaverWidget, which is why I removed it from there ;p).
2023-02-07 01:01:05 +01:00
zwim
4e944dc918 patch management
Use texteditor if available

Auto disable if patches folder doesnt exist

And show a restart message after file edit

Sort menu entries in execution order

Warning sign for failing patches
2023-02-06 19:43:01 +01:00
zwim
cf9d3a0d70 Add quickEditFile method to texteditor 2023-02-06 19:43:01 +01:00
zwim
50ab620da1
Screen Warmth: Fix a bug with syncing screen warmth on start (#10066) 2023-02-06 11:33:42 +01:00
hius07
3881899338
Dispatcher: fix dynamically built menu (#10080)
Applicable for Set font and Set highlight action actions.
Closes #10077.
2023-02-05 10:47:38 +01:00
zwim
c5997a6246
[Document] Consistent menu entries in auto-save menu (#9995) 2023-02-03 22:30:11 +01:00
proletarius101
50b2267b74
AppImage AppData: fix not shown as a desktop application (#10076)
To make it shown as a desktop application and listed on flathub.org, the app data must mark it as a desktop application: https://github.com/flathub/flathub/wiki/AppData-Guidelines#header
2023-02-03 14:34:58 +01:00
yparitcher
731b802a0e
kodev: fix grep: warning: stray \ before - (#10071)
New warning in 3.8.
2023-02-03 13:45:23 +01:00
Sargun Vohra
15fb73384f
EInk: Add a setting to toggle flashing on pages with images (#10049)
With minor code cleanups along the way ;).
2023-02-02 21:09:29 +01:00
Frans de Jonge
1faf0a1786 OTAManager: pick the right binaries on Android x86_64 2023-02-02 21:04:11 +01:00
Frans de Jonge
c713df1dc7 OTAManager: pick the right binaries on Android aarch64 (arm64) 2023-02-02 21:04:11 +01:00
NiLuJe
92ebed577b OTAManager: Pick the right binaries on Kindles running on the Bellatrix
platform

Re: https://github.com/koreader/koreader/pull/4539#issuecomment-1411707712
2023-02-02 21:04:11 +01:00
hius07
c403b3bd25
Profiles: create profile with current document settings (#10036) 2023-02-02 09:09:42 +02:00
NiLuJe
21210800c1
ReaderFooter/Header: Refine autorefresh repaint-or-not checks (#10045)
Use both a whitelist for targeted widget repaints, a blacklist for no repaint at all, and a fallback for a full in-order ReaderUI repaint when unsure.

Use a similar approach in ReaderHeader (i.e., prevent explicit refreshes while ReaderMenu is open).

Re #9979, re #9768
2023-02-02 00:29:23 +01:00
yparitcher
747c3eaf9d
Kindle: NetworkMgr: isWifiOn isConnected (#10059)
isWifiOn for kindle currently returns if the interface is connected, change this to doing what is says isWifiOn the file is only present if the wireless interface is up.

isConnected pings the gateway, rely on the kernel for a more reliable check.

Whan connecting to my android phone's wifi hotspot to remote debug from my phone, the network is connected yet the phone(gateway) does not respond to pings leading koreader to shut down the connection thinking it is unsuccessful
2023-01-31 20:38:22 +01:00
Frans de Jonge
b070a121d6
Update translations for v2023.01 (#10061) 2023-01-31 20:37:53 +01:00
poire-z
d2f344becf
bump crengine: various minor fixes and tweaks (#10044)
Includes:
- LVHashTable: fix iterator implementation
- Text: fix mismatched `free` on `new`-allocated memory
- Fonts: fix possible memory leak in RegisterExternalFont()
- Avoid computing document CRC32 if metadataOnly
- LVStream: fix `LVStreamFragment` implementation
- (crengine-ng) Various small picks: unused variables, cast & types
- (crengine-ng) LVStream: minor fixes
- (crengine-ng) LVStream: cleanup zip processing
- (crengine-ng) ldomDataStorageManager: fix cast & types
- (crengine-ng) ldomDataStorageManager: fix possible segfault
- (crengine-ng) DOM/MathML: more currNode/parentNode sanity checks
- (crengine-ng) Default style: use cr3.ini fg & bg colors
- (crengine-ng) Support regular documents inside zip
- HyphMan: silence some clang warnings
- Stylesheets: support percent-encoded stylesheet links
- LVFontDef::CalcMatch(): don't use the bias if typeface matches

Also includes:
- LRU: Add a couple of APIs to get/set the cache size
- xtext: fix inconsistent rendering of arabic text
2023-01-23 21:12:10 +01:00
Mnkach
730857fc5e
Keyboard: add Ukrainian virtual keyboard (#10037) 2023-01-23 16:00:57 +01:00
hius07
b83a009dff
Profiles: various fixes related to registration and gestures (#10033)
- Keep profile registration in a duplicate.
- Fix profile menu update on register/unregister.
- Update gestures and profiles after renaming a profile.
- Update gestures and profiles after deleting a profile.
- Update gestures and profiles after unregistering a profile.
- Fix Profiles touchmenu stack update.
2023-01-23 15:32:14 +01:00
Utsob Roy
64fefc7a22
Exporter: add highlight markdown style (#9976) 2023-01-23 14:49:11 +01:00
Martín Fernández
34f92bc196
bump android-luajit-launcher: new devices + versionCode (#10042)
Onyx Boox Note X2, thanks to @hghwng
Warmth light support for Tolino Shine3, thanks to @Nepochal

Appends an integer to versionCode, which is used to identify the android ABI. Fixes #9687
2023-01-22 19:52:01 +01:00
Jej
198a84a772
Minor updates in comments (#10038) 2023-01-18 09:15:33 +01:00
NiLuJe
7863a7ad70
Misc: Natural sorting refactor (#10023)
* Move natural sorting algo to a dedicated sort module to avoid code duplication
* Use a slightly more accurate algorithm, and speed it up by caching intermediary strings
* Calibre: Use natural sorting in metadata search (fix #10009)
2023-01-16 19:36:22 +01:00
NiLuJe
bb900aa9a7
WakeupMgr: Explicitly invalidate the current alarm in unsetWakeupAlarm (#10032)
Apparently, toggling the rtc interrupt doesn't quite work on some boards? (fix #10031)

(Drive-by tweak to UIManager: Less confusing logging when quit gets tripped both via quit
and _gated_quit (i.e., on poweroff))
2023-01-16 19:32:32 +01:00
NiLuJe
16fb32d5a4
Kobo: Unbreak a slew of devices (#10019)
Fix #10020, Regression since #10008

(hasMultiTouch is set by `Generic.init`, but we use it before that;
so just set it properly ourselves in our superclass, because we don't
actually need to rely on Generic's autodetection).
2023-01-11 19:08:17 +01:00
Frans de Jonge
1699711a0b
[i18n] Enable Farsi (#10017)
Cf. <https://github.com/koreader/koreader/discussions/10016>.
2023-01-10 21:27:36 +01:00
NiLuJe
4732bc9aed ReaderView: Recompute page layout when toggling ReaderFooter in
non-reflowable documents.

The code only handled setups with "reclaim bar height" enabled (because
that's my usual workflow, har har), but would have broken in various
more or less obvious ways without it, depending on the exact layout/zoom
settings.
The previous attempts at handling the no-reclaim case were focused
on scroll mode, which is a bit of a nightmare. This approach should
deal as well/badly as the previous one in scroll mode, but actually
handle page mode properly ;).

Re #9979
2023-01-10 19:06:49 +01:00
NiLuJe
f74921724a Android: Don't pile on event hooks to handle viewport changes
Untested, hopefully sane :s
2023-01-10 19:06:49 +01:00
NiLuJe
64af750c6c Kobo: Unbreak input translation when a viewport is active
Generic is responsible for setting up the translation via input hooks;
since our own input hooks involve swapping or mirroring X/Y, we need to
run our own hooks *first*, so that the viewport translation actually
does the right thing...

Probably broken for a good long while, I'd just assumed the inaccuracies
on the H2O were due to the IR grid... :/.

Reported @ https://www.mobileread.com/forums/showthread.php?t=351340
2023-01-10 19:06:49 +01:00
NiLuJe
843c4bfe66
Bump base (#10003)
https://github.com/koreader/koreader-base/pull/1569
https://github.com/koreader/koreader-base/pull/1571
2023-01-07 20:45:28 +01:00
poire-z
abbcd4ddbe
Exit menu: restore long-press to exit directly (#10000)
Unwillingly removed by 8ef426d79.
2023-01-07 09:39:55 +01:00
hius07
d5a4ac14e1
ReaderUI: fix status and history (#9993) 2023-01-07 08:09:16 +02:00
NiLuJe
5c1305719a
Kobo: Unbreak automagic_sysfs on the Libra 2 (#9998)
Regression since #9902, because I'd forgotten that the default Kobo block *does* set those...
Reported by @ptrm on Gitter, thanks!

Take two, essentially revert 8a16518918
We have defaults for most of those in the Kobo superclass, so these can never really be `nil`.
2023-01-06 21:23:18 +01:00
zwim
b3a7d32d54
[AutoWarmth] Simplify translations (#9996) 2023-01-05 13:46:52 +01:00
hius07
20ac8004d6
ReadHistory: further minor refactoring (#9991) 2023-01-04 01:24:23 +01:00
NiLuJe
4ce0058e2d
ReaderLink: Minor logic simplification in onGoToPageLink (#9987)
Abort earlier if the nearest link is too far, instead of computing stuff and creating an object we'll never actually use.

Includes minor logging tweaks to vaguely related codepaths ;p.
2023-01-03 20:48:49 +01:00
hius07
a8b333e4f9
Dictionaries: add Ukrainian explanatory dictionary (#9982) 2023-01-01 20:12:36 +01:00
zwim
f0b007bb31
Footer: avoid footer auto refresh over bottom menu (#9983) 2023-01-01 20:11:10 +01:00
poire-z
581a943c42 TextEditor: use a file symbol instead of numbers in history 2023-01-01 20:09:03 +01:00
poire-z
7448ad23e7 ReaderDogear: fix no y-offset after load with top status bar 2023-01-01 20:09:03 +01:00
poire-z
bbbcdffd3b ButtonTable: reset MovableContainer state on button tap
Prevent any later hold_release event from being handled
by MovableContainer as a moving touch+hold_release.
This issue was noticable when closing DictQuickLookup
with long-press on close, resulting in the movable
highlight actions ButtonTable moving to where the
long-press happened.
2023-01-01 20:09:03 +01:00