2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00
Commit Graph

5625 Commits

Author SHA1 Message Date
NiLuJe
34ba2fab30
NetworkMgr: Handle non-blocking turnOnWifi implementations better (#10863)
* Device: Add a `hasSeamlessWifiToggle` devcap to complement `hasWifiToggle`, to denote platforms where we can toggle WiFi without losing focus, as this has obvious UX impacts, and less obvious technical impacts on some of the NetworkMgr innards...
* Android: Mark as `!hasSeamlessWifiToggle`, as it requires losing focus to the system settings. Moreover, `turnOnWifi` returns *immediately* and we *still* run in the background during that time, for extra spiciness...
* NetworkMgr: Ensure only *one* call to `turnOnWifi` will actually go on when stuff gets re-scheduled by the `beforeWifiAction` framework.
* NetworkMgr: Ensure the `beforeWifiAction` framework will not re-schedule the same thing *ad vitam aeternam* if a previous connection attempt is still ongoing. (i.e., previously, on Android, if you backed out of the system settings, you entered the Benny Hill dimension, as NetworkMgr would keep throwing you back into the system settings ;p). This has a few implications on callbacks requested by subsequent connection attempts, though. Generally, we'll try to honor *explicitly interactive* callbacks, but `beforeWifiAction` stuff will be dropped (only the original cb is preserved). That's what prevents the aforementioned infinite loop, as the `beforeWifiAction` framework was based on the assumption that `turnOnWifi` somewhat guaranteed `isConnected` to be true on return, something which is only actually true on `hasWifiManager` platforms.
* NetworkMgr: In `prompt` mode, the above implies that the prompt will not even be shown for concurrent attempts, as it's otherwise extremely confusing (KOSync on Android being a prime example, as it has a pair of Suspend/Resume handlers, so the initial attempt trips those two because of the focus switch >_<").
* NetworkMgr: Don't attempt to kill wifi when aborting a connection attempt on `!hasSeamlessWifiToggle` (because, again, it'll break UX, and also because it might run at very awkward times (e.g., I managed to go back to KOReader *between* a FM/Reader switch at one point, which promptly caused `UIManager` to exit because there was nothing to show ;p).
* NetworkMgr: Don't drop the connectivity callback when `beforeWifiAction` is set to prompt and the target happens to use a connectivity check in its `turnOnWifi` implementation (e.g., on Kindle).
* Android: Add an `"ignore"` `beforeWifiAction` mode, that'll do nothing but schedule the connectivity check with its callback (with the intent being the system will eventually enable wifi on its own Soon(TM)). If you're already online, the callback will run immediately, obviously. If you followed the early discussions on this PR, this closely matches what happens on `!hasWifiToggle` platforms (as flagging Android that way was one of the possible approaches here).
* NetworkMgr: Bail out early in `goOnlineToRun` if `beforeWifiAction` isn't `"turn_on"`. Prompt cannot work there, and while ignore technically could, it would serve very little purpose given its intended use case.
* KOSync: Neuter the Resume/Suspend handlers early on `CloseDocument`, as this is how focus switches are handled on Android, and if `beforeWifiAction` is `turn_on` and you were offline at the time, we'd trip them because of the swap to system settings to enable wifi.
* KOSync: Allow `auto_sync` to be enabled regardless of the `beforeWifiAction` mode on `!hasSeamlessWifiToggle` platforms. Prompt is still a terrible idea, but given that `goOnlineToRun` now aborts early if the mode is not supported, it's less of a problem.
2023-09-21 18:21:09 +02:00
hius07
684fc22ffc
TextViewer: font size (#10911) 2023-09-19 08:39:25 +03:00
NiLuJe
2b13cd7dcb
Device: Make sure input_no_key_repeat survives a suspend/resume cycle (#10904)
I somehow assumed the repeat state snapshot used for restore was taken *after* disabling repeat, but obviously not ;o).

Fix #10902
2023-09-18 18:54:21 +02:00
Wim de With
1773b62ce8
Check for Noto Emoji font in UI fallback fonts (#10908) 2023-09-17 21:16:55 +02:00
hius07
be125af949
Actions for Go to first/last bookmark (#10899) 2023-09-15 07:24:31 +03:00
hius07
3f677a7fdd
copt/kopt options: deduplicate some defaults (#10893) 2023-09-13 07:49:57 +03:00
hius07
108d87742a
Custom metadata: fixes (#10889) 2023-09-12 07:54:38 +03:00
hius07
cc82ead981
copt deduplicate: font settings (#10885) 2023-09-09 12:44:56 +03:00
hius07
6efcf96b75
copt deduplicate: font_size, visible_pages (#10882) 2023-09-09 09:24:05 +03:00
hius07
7d626456a3
copt deduplicate: render_dpi, margins, rotation_mode (#10880) 2023-09-08 08:41:44 +03:00
hius07
73378cd9d7
copt deduplicate: line_spacing (#10768) 2023-09-08 08:40:47 +03:00
hius07
5e74f29fba
copt deduplicate: embedded_css, embedded_fonts (#10876) 2023-09-06 09:41:41 +03:00
hius07
e4ba8c7909
Custom metadata: event (#10869) 2023-09-06 09:41:10 +03:00
NiLuJe
ba5c7df0db DocSettings: Minor cleanup following #10861
Allows me to fix an old pet-peeve of mine re: the terrible variable
names used in there ;o).
2023-09-06 02:28:44 +02:00
hius07
f46f341b9b
Reset settings/cover/metadata separately (#10866) 2023-09-05 07:42:46 +03:00
hius07
912ae156f7
copt deduplicate: smooth_scaling, nightmode_images (#10801)
Main discussion in #10763.
2023-09-04 23:12:08 +02:00
hius07
a767ad44db
PDF contrast: incorrect set by a gesture (#10798) 2023-09-02 09:41:27 +03:00
NiLuJe
4cc620b702
VirtualKeyboard: Revamp visibility handling (#10852)
Move as much of the state tracking as possible inside VirtualKeyboard itself.
InputDialog unfortunately needs an internal tracking of this state because it needs to know about it *before* the VK is shown, so we have to keep a bit of duplication in there, although we do try much harder to keep everything in sync (at least at function call edges), and to keep the damage contained to, essentially, the toggle button's handler.

(Followup to #10803 & #10850)
2023-09-01 22:51:41 +02:00
NiLuJe
4d620d9fd2
Device: Try harder to properly setup the charging LED on plug/unplug (#10855)
By debouncing the call and delaying it some more.
2023-09-01 22:51:21 +02:00
zwim
bedd422669
AutoSuspend: Handle a few corner-cases better (#10797)
* Enforce a minimal standby timer for the first standby after a resume.
* On Kobo, sleep a bit before standby.

This aims to alleviate race conditions causing visible refresh glitches on sunxi, especially when using an extremely low standby timer (i.e., below the defaults).
2023-09-01 17:55:24 +02:00
hius07
ed2ea6803f
Custom metadata (#10861) 2023-09-01 08:07:29 +03:00
Wim de With
599a3034ca
NetworkManager: Decode SSID to UTF-8 (#10864)
wpa_supplicant returns all non-ASCII SSIDs as raw bytes in the form
\x0a. We interpret these bytes as UTF-8, and make sure that all invalid
characters are replaced with a �.
2023-08-31 19:29:30 +02:00
hius07
1ef7821b66
getProps: centralize 2 (#10837)
Centralize and optimize handling document properties.
2023-08-30 07:53:59 +03:00
poire-z
9d5d5d4a30
InputText/InputDialog: fix keyboard issue (#10850)
Fix issue introduced by 976aaf5f: with full screen
text editor and hiding the keyboard, a tap in the
text area would show a new keyboard hiding the
buttons allowing to save/close the text editor,
getting us stuck there.
2023-08-27 15:12:51 +02:00
NiLuJe
a736a3ebe0
Calibre: Add reading status to the metadata search popups (#10842)
We're getting old, remembering whether you've actually read stuff is hard ;).
2023-08-26 16:13:59 +02:00
Frans de Jonge
ea433d78dd
[i18n] Revert Unicode escape sequence to utf-8 bytes for translation (#10845)
Cf. <https://github.com/koreader/koreader/discussions/10774#discussioncomment-6618167>, reverts #10769 for direct use in translations.
2023-08-26 15:47:11 +02:00
NiLuJe
e7e0d2edb6
Kobo: Disable HW inversion on MTK (#10841)
Apparently, that doesn't quite work...

Followup to #10719
2023-08-25 20:53:11 +02:00
NiLuJe
6fa8e1d2fd
KOSync: Set sane socket timeouts properly (#10835)
An attempt was made in the original code, but the whole thing was designed in the hope of actually switching to turbo, so it was super janky without it.
Anyway, we now actually have a sane way to set socket timeouts, so, use that, and set them very tight for now.

This is fairly critical right now, because the server is down, and the default timeouts are ~30s. That happens to be *above* the debounce threshold, so you can't even hope for that to help you. Meaning, right now, you get a 2 * 30s block on resume with auto sync. That's... Very Not Good(TM).

That becomes a single 2s one after this.
2023-08-22 16:30:37 +02:00
NiLuJe
21de1a832e Main: Move the G_reader_settings flush to Device:exit
I don't trust PB's input.closeAll not to be doing something wonky that
would trip an early abort.
2023-08-19 17:25:10 +02:00
NiLuJe
d1bbdb5dad PocketBook: Run Generic:exit *last*
Makes more sense this way.

Re: #10828

Also clarify the UIManager "no dialogs left" message, and drop the
return value, as it's meaningless, we just want to break & return.
2023-08-19 17:25:10 +02:00
hius07
33467098dd
filemanager: minor tweaks (#10821) 2023-08-18 08:11:43 +03:00
NiLuJe
910b67d35b NetworkListener: Only disable Wi-Fi on suspend on hasWifiManager platforms
Assume the host system does things right otherwise.
Should be sane on Kindle
On PocketBook, who knows, but assuming the device actually suspends,
that should effectively kill our keepalive
Irrelevant for Android, as we skipped it because the wifi toggling
methods are interactive.
2023-08-18 00:19:46 +02:00
NiLuJe
d52e0a0dfe NetworkManager: Always flip wifi_was_on when interactively tearing down Wi-Fi
Fix #10823

(For reference, we *enable* wifi_was_on no matter *how* wifi is enabled,
but we only toggle it off when it's killed by a *direct* user interaction,
the intent being that if *something* non-interactive enabled wifi,
you'll probably silently need it on resume too).
2023-08-18 00:19:46 +02:00
NiLuJe
7e628958b6 Misc: review pass for #10803 2023-08-15 21:24:11 +02:00
NiLuJe
6d47b3241c NetworkManager: Fully tear down WiFi on aborted connection attempts
The proper connectivity check did it, now every early or not so early
abort do.
2023-08-15 21:24:11 +02:00
NiLuJe
5146358605 NetworkManager: Allow backends to report connection failures early
As early as turnOnWifi.
Implement it on hasWifiManager platforms, preventing useless
connectivity checks to run when they're obviously never going to work
because you're out of range of your AP.

Also implemented a flag to notify the backend if the connection attempt
was interactive or not.
Right now, interactive is extremely restricted, it basically means the
menu checkmark, or a gesture.
The intent being that for stuff like the beforeWifiAction framework, we
don't want the backend to spawn extra UI.
Specifically, for hasWifiManager platforms, we no longer spawn the AP
scan list on failure unless the caller was interactive.

TL;DR: beforeWifiAction is now much less obnoxious when you're obviously
not able to connect.
2023-08-15 21:24:11 +02:00
NiLuJe
bc235b3d19 NetworkManager: Make goOnlineToRun abort on tap (anywhere)
Assuming it's past the blocking portion of this endeavor, if any.

Fix #10807
2023-08-15 21:24:11 +02:00
NiLuJe
a15fc0e9a5 Revert "Test: Fiw readerhighlight test"
This reverts commit c23c422f62.
2023-08-15 21:24:11 +02:00
NiLuJe
ae7e2f14aa Test: Fiw readerhighlight test
With actual ReaderUI teardowns, and fix the overlapping highlight
handling, so we can drop the nocov flags
2023-08-15 21:24:11 +02:00
NiLuJe
55534fcec2 ReaderView: Keep the terrible readerhilight_spec test happy
This thing is a horrible mess.
2023-08-15 21:24:11 +02:00
NiLuJe
0686ee594c ReaderView: Make sure we unschedule the hinting task on actual teardown.
onCloseDocument is way too early, if another, later onCloseDocument
handler trips a ReaderUI repaint, a new task will be scheduled, and that
one will never be cancelled, resulting in it running post-teardown,
crashing horribly.

This was for instance very easy to trigger via KOSync.

Fix #10806
2023-08-15 21:24:11 +02:00
NiLuJe
976aaf5f53 InputText: Actually flip the is_keyboard_hidden flag properly
MultiInputDialog does a close -> show in the same callback,
so if we don't actually keep it in sync with the actual state, we lose
the keyboard and essentially softlock the UI, which is Very Bad(TM).

NOTE: InputDialog has its own keyboard_hidden flag, and it looks...
fairly nightmarish.
2023-08-15 21:24:11 +02:00
NiLuJe
7a5216a0a6 NetworkManager: Plug a logic hole in the beforeWifiAction logic
The *runWhenOnline wrappers may not pass a callback when connected but
not online yet, so we need nil guards all the way down ;).

Re: #10806
2023-08-15 21:24:11 +02:00
NiLuJe
22678ee5ff Misc: Review pass on the previous commits
* Unbreak the Device test
* Rename a few things
* Tweak a few comments
2023-08-15 21:24:11 +02:00
NiLuJe
f44f92a864 Kobo: Run Generic:init dead last, like every other platform
This is semantically more correct, and should prevent platform-specific
weirdness if an ordering concern ever comes up (e.g., like it did for
the viewport stuff).
2023-08-15 21:24:11 +02:00
NiLuJe
71378b0b50 Startup: Move Device ctor/dtor shenanigans to the actual Device
constructors and destructors

No need to leak implementation details in there.
2023-08-15 21:24:11 +02:00
NiLuJe
e9a84ca434 Reader: Move the "print exit code in a file" hack to the PB
implementation, where this mess belongs.

No other platform relies on this (because, spoiler alert, InkView \o/).
2023-08-15 21:24:11 +02:00
NiLuJe
4acf131071 ReaderActivityIndicator: Oh god, my eyes, they buuuuurn.
Make this a real boy, with a transient lipc handle.
And get rid of the insane 1s sleep on affected ReaderView paints,
because ouchy.

This is completely deprecated anyway, so this is entirely pointless,
and mainly to prevent implementation details from creeping into
reader.lua.
2023-08-15 21:24:11 +02:00
NiLuJe
ac1358e0f0 Menu: Actually hide PlatformNav if !hasKeys
Returning {} just leads to a present but blank entry

(Also, nobody notice that the capcheck was wrong inside platnav anyway ;p).
2023-08-15 21:24:11 +02:00
NiLuJe
f4aca567ef Kobo: Allow disabling key repeats
Re #10743

Note that this only makes faulty switches slightly less annoying: for a
stuck switch, instead of a string of page turns, you'll get a single
missed page turn on the tap that actually releases the stuck contact...
2023-08-15 21:24:11 +02:00
NiLuJe
ddf6f3616c Menu: Amend the previous commit
Kindle animations are Reader only ;).
2023-08-15 21:24:11 +02:00
NiLuJe
6283674c47 Menu: Split off "Page Turns" submenu in two sections
The Kindle swipe animations & physical key inversion apply *everywhere*,
so we need this accessible in the FM, too.

Move it to Navigation, which is where it already was on !Touch devices.
2023-08-15 21:24:11 +02:00
NiLuJe
0db7509fe2
Kobo: Fix the input translation on the Elipsa 2E (#10802)
Apparently it mirrors on the Y axis. Or the panel vs. touch rotations are wonkier than expected or ...something.
2023-08-12 02:47:42 +02:00
hius07
0499b5109a
Profiles: fix New profile with current pdf document settings (#10778) 2023-08-11 08:38:29 +03:00
hius07
1544ca28af
FileManager: truncate left in selected files list (#10783)
Truncate the path to view the filename in full. Closes #10760.
2023-08-10 17:01:07 +02:00
poire-z
cc391514b5 Translator: explicite wording above each section 2023-08-10 16:57:12 +02:00
poire-z
e641c89eee View HTML & CSS: fix minor spacing issues 2023-08-10 16:57:12 +02:00
zwim
ac143ca9d6
Add forgotten f:close() (#10796) 2023-08-09 19:24:46 +02:00
yparitcher
f3fc2ac353 do not allow clipboard to be nil
we use it as text anyway and test if it is the empty string also.

this fixes a crash in viewhtml when holding a selector with an empty clipboard, we try to contcate getClipboardText which is nil (on !SDL & !Android)
2023-08-08 16:15:40 -04:00
zwim
2ba3353d8a
[AutoWarmth] use CheckButton for night mode toggle (#10762) 2023-08-03 01:01:38 +02:00
NiLuJe
724db0b924
Statistics: Close the DB handle in the vacuum OTM block (#10775)
Followup to #10749
2023-08-02 18:47:38 +02:00
weijiuqiao
416237e526
Statistics: Attempt to prevent rampant replication of null id_books (#10749)
And add an OTM block to do a cleanup pass on existing DBs (which might take a while if you're severely affected, because we've seen reports of DBs north of 2GB).
2023-08-02 06:09:15 +02:00
poire-z
626864f856 [chore] replace utf8 bytes with Unicode escape sequence 2023-08-02 01:28:24 +02:00
poire-z
7bff61150a util.prettifyCSS(): do better with more complex CSS 2023-08-02 01:28:24 +02:00
poire-z
b03992c077 ViewHTML: fix content messed up when consecutive nbsp
Fix bug in replace_in_html() when consecutive
matches.
Also ensure content after leading indentation is not
wrapped on the next line.
2023-08-02 01:28:24 +02:00
poire-z
08e9c27a32 Wikipedia EPUBs: re-add ToC in content
The ToC is no longer in the HTML we get from the
Wikipedia API. So, add it ourselves.
Also, as we can't get anywhere the Wikipedia localized
string for "Contents" (ie. "Sommaire" in French), use
thick <HR> to mark the start and end of this ToC.
2023-08-02 01:28:24 +02:00
ichnilatis-gr
583ae40e46
Greek keyboard: update to the new keyboard layout (#10734) 2023-08-02 00:34:48 +02:00
NiLuJe
9c8e55b3e5
Kobo: Yet another attempt at working around the hangs on the latest NXP boards (#10771)
* Notification: Drop the fencing from #10083; it never actually helped, and had subtle side-effects we could do without.
* VirtualKeyBoard: Flash on close, otherwise, some of the fast refresh glitches may be burned into the working buffer until a flash. Making sure we flash ourselves prevent it from sticking around on the page ;).
* util: Move `writeToSysfs` to base (i.e., `ffi/util`), as we need it there (and it actually makes more sense there anyway ;p).
* Bump base for https://github.com/koreader/koreader-base/pull/1645, which is where the actual workaround (hopefully) lives.

Re #8414, #9806, #10558
2023-08-01 23:53:10 +02:00
NiLuJe
689d9e2976
Kobo: Initial Elipsa 2E support (#10719)
Untested, but mostly everything should be there ;p.

Bumps base for MTK support (https://github.com/koreader/koreader-base/pull/1642)
2023-08-01 20:26:02 +02:00
NiLuJe
ef0bcbad3f
ReaderFooter: Don't reset the initial position marker like a cowboy (#10767)
Take a more tactful approach instead, should hopefully prevent issues like in https://github.com/koreader/koreader/pull/10114#issuecomment-1658913661
2023-08-01 18:43:48 +02:00
NiLuJe
9ceb07a4c6
Kobo: Unbreak Aura One support (#10758)
Regression since #10728, Fix #10757
2023-07-28 20:48:28 +02:00
hius07
b36ccc7249
QuickMenu: add long-press on profile (#10671) 2023-07-28 18:10:35 +03:00
poire-z
4fa278ff0b Wikipedia: handle images in changed Wikipedia HTML
The HTML we get from Wikipedia has recently changed,
which has caused images to not be detected and shown
in DictQuickLookup, and to be missing or ugly in
saved EPUBs. Update our code and CSS to display them
again.
2023-07-26 01:05:15 +02:00
poire-z
eecdac930e View HTML: Show matched rules: ignore style & tweaks on long-press
On long-press on the "Show matched stylesheets rules"
buttons, ignore those from our epub.css/html5.css and
from styletweaks, which may make investigating a book
style simpler without their noise.
2023-07-26 01:05:15 +02:00
hius07
47dae6c5dd
Dictionary: fix Fuzzy search setting appearance (#10721) 2023-07-24 09:25:53 +03:00
hius07
a311de6d8e
readerview: do not read/save inapplicable doc_settings items (#10710) 2023-07-24 09:25:16 +03:00
NiLuJe
21949c5521 Kobo: Apply the AW99703 smooth ramp off fix to all affected devices
e.g., at least the Clara 2E features the same controller & driver,
but it is likely found on a few other models.
2023-07-24 04:22:13 +02:00
NiLuJe
f5e871d4ed NetworkInfo: Never show the token index
Now that I've seen it in action on a device, it's mostly useless, and,
if anything, confusing, because it's not static.
2023-07-24 04:22:13 +02:00
hasezoey
618f065de4
DeviceListener:onToggleFrontlight: add notification of "unchanged" (#10727) 2023-07-23 13:33:24 +02:00
hasezoey
b1109a729e
Android: call "_decideFrontlightState" to keep "is_fl_on" in sync (#10731) 2023-07-23 13:31:10 +02:00
hasezoey
14347f0c18
Android - lights: return to previous level on cancel (#10726) 2023-07-23 13:29:53 +02:00
NiLuJe
17bdd56e02 Never export LD_LIBRARY_PATH
It's been made redundant by the RPATH changes

The only platform that gets the dubious honor of actually needing an
LD_LIBRARY_PATH is PocketBook, because of InkView.

Co-authored-by: Benoit Pierre <benoit.pierre@gmail.com>

Bump base to pull in the aforementioned RPATH changes ;).

https://github.com/koreader/koreader-base/pull/1638
2023-07-18 02:11:25 +02:00
poire-z
8a240dd635
bump LunaSVG, crengine: add support for .docm (#10702)
Includes:
- bump LunaSVG: intermediate upstream bump, cleanup
- bump LunaSVG: minor upstream tweaks
crengine:
- DocX: add support for similar DocM format
- LVStyleSheet: fix LVCssDeclaration::getHash()
- CSS parsing: accept Unicode values for ID and classnames
- update for Harfbuzz 8, fix some compiler warning
Also fix input not restored when loading failed,
and KOReader not able to exit.
2023-07-16 19:18:10 +02:00
NiLuJe
dacc3c2f72
NetworkManager: Bypass isOnline on !hasWifiToggle platforms (#10697)
Followup to #10669, fix #10694
2023-07-15 23:58:51 +02:00
Frans de Jonge
3bec20fc25
NetworkManager: improve clarity for chatty framework user-facing explanation (#10696)
See https://github.com/koreader/koreader/pull/10669/files#r1263385527
2023-07-15 17:19:35 +02:00
Glen Sawyer
73c4f09a88
FileChooser: re-add file sort by "last date read" (#10682)
Revert bits from eb299c30.
2023-07-12 22:33:14 +02:00
poire-z
d0e705a582
Font list menu: allow sorting by more recently set (#10662)
- Add a toggle in Font settings> allowing showing font
  ordered by most recently selected (long-press on
  it allows clearing this history).
- Keep in G_reader_settings a list of known fonts, so
  we can notice newly added user fonts, and put them
  at the start of the most recently selected. Show
  these new fonts with a symbol in the menu.
- TouchMenu: allows for a flag to trigger menu
  refresh when going up.
2023-07-12 22:29:13 +02:00
Christian Kilb
6d7dccda13
[PocketBook]Add support for InkPad Color 2 (#10685)
Co-authored-by: Christian Kilb <christian.kilb@gmail.com>
2023-07-12 16:50:20 +02:00
hius07
e1ed3a71c5
Style tweaks: notification on toggling style tweak with a gesture (#10674) 2023-07-12 07:45:47 +03:00
NiLuJe
d57325aaf6
NetworkManager: Enable "before wifi" action support on every hasWifiToggle platform (#10669)
* Enable before_wifi_action & after_wifi_action on hasWifiToggle platforms (which is basically all of 'em except naked SDL).
* Decouple restoreWifiAsync from hasWifiManger, because we can do that on other platforms (namely, Kindle. Probably PB, too, but WiFi is already a mess there, and I can't test it).
* Implement restoreWifiAsync on Kindle.
* Properly flag rM as hasWifiManager & hasFastWifiStatusQuery, because it is actually both of those (it uses our wpa_supplicant backend).
* Update the KOSync checks to take these changes into account, to properly disable auto_sync if necessary.
* Really made the Network* event signaling consistent. For realz this time.
* In an effort to make the whole beforeWifiAction framework somewhat usable there, we now assume connectivity is always available on !hasWifiToggle platforms...
2023-07-12 02:42:16 +02:00
hius07
b1c90260e4
DropBox: unify error messages (#10666) 2023-07-11 07:49:52 +03:00
hius07
b33971b92d
OPDS fixes (#10657) 2023-07-11 07:49:27 +03:00
NiLuJe
4194244951
GestureDetector: Make two_finger pans & swipes report the same sort of data than their standard brethren (#10649)
Namely, that swipes report the gesture's *starting* coordinates as `pos` (for hit-detection purposes), while pans (and basically everything else) use the *lift* coordinates (as well as provide a relative vector).

In each case, we now also provide a separate `start_pos`/`end_pos`, in case handlers need finer-grained data (e.g., anchoring UI elements to a swipe's lift coordinates).
2023-07-09 18:20:53 +02:00
hius07
86f4b3c18d
QuickMenu: anchor to gesture position 3 (#10646) 2023-07-08 08:17:42 +03:00
ElimGarak1
4b475bee04
Recognize PocketBook InkPad 4 with new firmware (PB743G)/(PB743g) (#10655)
Extended addition of PocketBook InkPad 4 with firmware later U743g.6.8.885 (PB743G) because its device ID was corrected from PB743g to PB743G by firmware U743g.6.8.1719.
2023-07-07 19:28:06 +02:00
Martín Fernández
5336e2f11d
[ota]: deprecation check & notice (#10639) 2023-07-04 22:58:40 +02:00
Benoit Pierre
346d8eb83e
Decrease fonts memory use (#10618)
Instead of opening the same font multiple times for each different
size (multiple face instances), share one face instance and create
multiple size instances.
2023-07-04 09:13:16 +02:00
Alistair Francis
fc89b1affa
Remarkable: support the mainline touchscreen (#10585) 2023-07-04 09:08:31 +02:00
poire-z
a4720b44cd Text search: various Kopt search fixes
- Properly parse input text for words (the previous
  code wasn't working with Greek letters)
- With multiple words search, don't allow "substring
  matching" for words in the middle
- Remove support for Lua pattens, so to get proper
  substring matching (as we have with cre text search)
2023-07-04 09:03:34 +02:00
poire-z
dffc2404ca Text search: normalize input text
So that Unicode NFC normalization can combine diacritics
entered via our keyboard with their base into their
canonical form (we can expect books text to be normalized).
2023-07-04 09:03:34 +02:00
hius07
6decb71521
ReaderPaging: do not store zeroes in page_positions (#10602)
Page_position value depends on the view mode parameters, but we can assume that zero is a frequent case.
2023-07-04 08:43:30 +02:00
yparitcher
27f7f1d5a9 QuickMenu: anchor to gesture position
Fixes: #10631
2023-07-03 20:18:12 -04:00
hius07
dee1c902ec
ReaderUI: minor optimization (#10634) 2023-07-03 17:43:13 +03:00
hius07
eb299c300d
FileChooser: Sort by date (#10627) 2023-07-03 08:24:28 +03:00
hius07
adfbbd9903
Disabled touch input: always active gestures (#10624) 2023-07-03 07:58:51 +03:00
NiLuJe
08dd97384c
KOSync: Clarify settings, plus refactor & fixes to make "auto-sync" more reliable (#10605)
Fix: #10539, and for context #6489, #6733, #6534

Reorganize and reword most of the settings to make it clear what actually ties into auto sync, and what doesn't. (Specifically, what happens when a pull attempts to sync forward or backward has nothing to do with auto sync, it applies in all cases; while the periodic sync *does* require auto sync).

The main point of contention, though, is that auto sync will now *always* attempt to setup network connectivity (i.e., on resume/suspend/close). Periodic sync will *not* though (the intent being that, if you use periodic sync, you're relying on the activity check to actually keep wifi on at all times)).

Since this may lead to a large amount of nagging about wifi toggles on devices w/ NetworkManager support, it is now *disabled* by default on those devices. (And given that it wouldn't have worked because of the lack of connectivity, that doesn't really make any practical difference ;p).

Additionally, given the fact that there's no way to make this behavior viable if the "before wifi" action is left at its default of "prompt", this feature now *requires* that to be set to "turn_on" (on devices where it can, of course); attempting to toggle it on will warn about that if necessary.
This change is retroactive (OTM).

Includes an assortment of fixes and cleanups, including migrating to the new LuaSettings API, which is why there's no longer a smattering of superfluous flushes.
2023-07-03 01:23:14 +02:00
NiLuJe
752f23c85e
Input: Be more through in resetState (#10612)
Drop the actual slot data storage, in addition to the active references
2023-07-02 22:54:14 +02:00
kosmoski
72c1905110
Add 'Content-Length' header to WebDAV upload request (#10567)
Co-authored-by: wojtek <wojtek@pop-os.localdomain>
2023-07-01 07:29:38 +02:00
NiLuJe
5c8143d9ac SDL: Fix initial position & size
Also keep sdl_window in sync with enforced dimensions on the emu.
2023-06-29 14:33:23 +02:00
NiLuJe
55869b82cb
PowerD: Unbreak frontlight toggle notifications outside of Kobo (#10597)
Fix #10588
Regression since #10305

While we're there, rejig the FL toggle callback shenanigans so that implementation details don't leak through to *other* implementations.
(i.e., leave the Kobo mess in Kobo land, with only a minimal impact on the public API and its implementation).
2023-06-25 11:25:33 +02:00
hius07
4a775b03f1
History: update short date/time correctly (#10601)
Further to #10594, fix updating the mandatory.
2023-06-22 21:42:41 +02:00
hius07
45428dda49
History: shorten date/time field (#10594) 2023-06-21 07:33:09 +03:00
hius07
54ab0a04f8
Archive viewer (#10584) 2023-06-21 07:32:24 +03:00
Frans de Jonge
64f778d97d
PocketBook: add alternative definition for PB840 (#10582)
Cf. #10579.
2023-06-15 13:54:15 +02:00
hius07
eef99dafd6
Overlap: fix detecting reflow mode (#10576) 2023-06-14 07:36:37 +03:00
hius07
1d4e256c82
credocument: epub alternative mimetype (#10575)
Used by Flibusta OPDS.
2023-06-13 12:16:36 +02:00
yparitcher
1f62091b73
HtmlboxWidget: pairs->ipairs (#10574)
thanks @poire-z
Closes: #10565
2023-06-13 11:52:46 +02:00
Benoit Pierre
f7d5828f08
persist: fix possible leak on error (#10568) 2023-06-12 09:25:54 +02:00
hius07
46933035c5
Open with: images (#10561) 2023-06-12 09:08:56 +03:00
Benoit Pierre
bb7ae20697
kindle: show require error trace (#10569) 2023-06-11 21:46:46 +02:00
zwim
1ce1fe1780
[plugin] AutoWarmth: Fix resume and frontlight issue (#10557)
Fixes a regression introduced in #10426, when suspending during night and resuming during daylight.
2023-06-09 20:56:46 +02:00
hius07
fc7181419f
CoverImage: custom cover support (#10553) 2023-06-09 10:36:34 +03:00
hius07
23feb0c9cd
Bookmarks: filter by highlight style (#10549) 2023-06-08 08:28:43 +03:00
hius07
01e6593dd4
File popup dialog buttons (#10537) 2023-06-08 08:27:52 +03:00
poire-z
18cd6b79d8
BookMap: fix help text wording (#10544)
See https://github.com/koreader/koreader/pull/10530#discussion_r1217635869.
2023-06-05 18:45:41 +02:00
poire-z
04425b74fc BookMap: add "Overview" mode
Add a restricted but convenient mode showing BookMap like
in initial view, while still allowing chapter levels to be
tweaked. This allows getting back to this view with another
gesture to see the overall progress in the book, while
still having the normal BookMap in flat mode acting as
an alternative ToC.
Available as an action to associate to a gesture, and
with long-press on the "Book map" menu item.
2023-06-05 00:58:15 +02:00
poire-z
b7078caf29 BookMap: add option "10-page markers"
Allows hairy-boxes amateurs to get small markers (under
the baseline) every 10 pages (with -/+ to get small or
medium markers, with optionally smaller ones every 5 pages).
2023-06-05 00:58:15 +02:00
poire-z
5f4cd9df00 BookMap: add option "Page browser on tap"
Enabled by default, to get the current behaviour.
Disabling it allows people with small fingers to jump
directly to that page in Reader.
2023-06-05 00:58:15 +02:00
poire-z
ac159928dd BookMap: nicer alignment of the vertical page number
Align page numbers (the vertical ones, on the left of
a BookMapRow) on the baseline of the BookMapRow, where
page slots rise from.
Also tweak the page number spike below the baseline used
in PageBrowser.
2023-06-05 00:58:15 +02:00
poire-z
fa68c1e488 PageBrowser: smaller margins if no thumbnail page numbers
Also fix possibly unbalanced left and right margins.
2023-06-05 00:58:15 +02:00
hius07
38bb4a1983
QuickMenu: scrollable (#10528) 2023-06-04 15:29:30 +03:00
hius07
5405fff837
Profiles: disable inapplicable actions in QuickMenu (#10500) 2023-06-02 18:54:54 +03:00
NiLuJe
2797a74a96
Kobo: Handle the newer Nia HW revision (#10520)
Fix #9590, closes #9591
2023-06-01 19:04:52 +02:00
hius07
1944f54aa0
Custom cover: fix (#10513)
Somehow have overlooked in testing.
Closes #10512.
2023-05-31 14:28:07 +02:00
hius07
a8244ddd23
FileChooser: fix legacy "Files and folders mixed" collate setting (#10514)
Closes #10509.
2023-05-31 14:26:13 +02:00
yparitcher
8034858180 WakeupMgr: kinde: use a 90 sec proximity
sometimes my kindle fires the rtc alarm a tad too late so use a more generous timeout

the real fix would be to have validateWakeupAlarmByProximity return differently if the alarm is past or in the future, but i am too lazy
2023-05-28 10:03:19 -04:00
hius07
eadf76e992
Profiles: fix showing some bad values (#10495) 2023-05-28 08:06:29 +03:00
hius07
57f4ff2c68
ReaderHighlight: manage overlapped highlights (#10492) 2023-05-28 08:05:48 +03:00
hius07
177092243f
readcollection: fix mandatory for deleted files (#10488) 2023-05-28 08:05:07 +03:00
hius07
46578c0e12
documentregistry: fix DocSettings (#10478) 2023-05-28 08:04:25 +03:00
ElimGarak1
a18afc24b8
PB: Fix Inkpad 4 device id (#10481)
Turns out it's a lowercase G, and that matters ;).
2023-05-26 20:52:18 +02:00
Sunny
9e0f185174
rM: Work around LD_PRELOAD weirdness on forks on rM 2 (#10490) 2023-05-26 20:51:15 +02:00
roshavagarga
d54c5acc11
PB: Add Inkpad 4 (#10468)
Fix #10444
2023-05-21 01:24:27 +02:00
NiLuJe
17d5934712
Notification: NOP conflicting event handlers from our base class (#10471)
Notification is a toast, so it doesn't stop event popagation.
If we don't disable thoses handlers inside Notification, we get spurious
duplicate handlers being fired ;).

Fix #10461
2023-05-21 01:23:41 +02:00
hius07
6c0bfb1c0a
FileManagerCollection: Fix crash on "Execute shell script" 2023-05-21 01:23:18 +02:00
hius07
919d67656d
readerhighlight: fix translator auto lang (#10469) 2023-05-20 15:41:50 +03:00
poire-z
011c168686
Wikipedia EPUBs: strip out invalid-XHTML <link> (#10462) 2023-05-19 16:48:36 +02:00
hius07
3d5775241d
Exporter: selected files (#10453)
Export highlights for selected files.
Having a button "Select all files in folder", it is easy to export the whole folder.
So, closes #10402.

To keep even number of buttons, added a feature "Show selected files list". May be useful to check selections before an operation. Just a sorted list, no titlebar or popup menu, tapping a file jumps to its folder.
2023-05-19 09:55:49 +02:00
NiLuJe
7e98b9de4b
PM: Minor refactor to suspend/resume code flow (#10426)
Make sure we only send Suspend/Resume events when we *actually* suspend/resume. This is done via the Device `_beforeSuspend`/`_afterResume` methods, and those were called by the *input handlers*, not the PM logic; which means they would fire, while the PM logic could actually take a smarter decision and *not* do what the event just sent implied ;).

(i.e., sleep with a cover -> suspend + actual suspend, OK; but if you then resume with a button -> input assumes resume, but PM will actually suspend again!).

Existing design issue made more apparent by #9448 ;).

Also fixes/generalizes a few corner-cases related to screen_saver_lock handling (e.g., don't allow USBMS during a lock).

And deal with the fallout of the main change to the Kobo frontlight ramp behavior ;).
2023-05-18 23:13:43 +02:00
hrdl
20101baef6
pdfdocument: cache page text (#10450)
Updating the selection queries the same page tens of times per second. This prevents KOReader from keeping up with high-frequency input event streams.

Fixes #10443. Relies on koreader/koreader-base#1612.
2023-05-18 22:08:50 +02:00