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

3163 Commits

Author SHA1 Message Date
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
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
b33971b92d
OPDS fixes (#10657) 2023-07-11 07:49:27 +03:00
hius07
86f4b3c18d
QuickMenu: anchor to gesture position 3 (#10646) 2023-07-08 08:17:42 +03: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
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
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
yparitcher
1f62091b73
HtmlboxWidget: pairs->ipairs (#10574)
thanks @poire-z
Closes: #10565
2023-06-13 11:52:46 +02:00
hius07
46933035c5
Open with: images (#10561) 2023-06-12 09:08:56 +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
a8244ddd23
FileChooser: fix legacy "Files and folders mixed" collate setting (#10514)
Closes #10509.
2023-05-31 14:26:13 +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
poire-z
011c168686
Wikipedia EPUBs: strip out invalid-XHTML <link> (#10462) 2023-05-19 16:48:36 +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
hius07
3dce41269d
Translator: translate current page (#10438) 2023-05-17 07:34:37 +03:00
NiLuJe
b989a6ff15
NaturalLightWidget: Fallback to previous values instead of nil (#10425)
Happens in case the InputText field is emptied by the user.
The backend code makes rather strong assumptions that it'll *always* get a number of of it ;).

Fix #10352
2023-05-13 20:45:47 +02:00
NiLuJe
5c353c2289
OTM: Attempt to deal with wonky config states (#10429)
Such states (not quite sure how you could actively get in such a broken state to begin with, mind you)  could lead to an attempt to load an old fontlist cache in an incompatible format.

Re: #9771
2023-05-13 20:44:39 +02:00
poire-z
fc81c7db24 DictQuickLookup: add button to show list of results
Add a left button to the title bar to show the list
of results as a popup.
Dictionary: tap or long-press on that button give
different view of the results.
Wikipedia: request 30 results instead of 20, so we
can show 15, 10 or 6 of them per page of that popup.
2023-05-12 20:12:10 +02:00
poire-z
8c8a032269 ButtonDialog: allow for step/page scrolling
With tall ButtonDialog with many rows, allows for a more
natural and readable scrolling without any truncated row
(like in Excel, we previously behave as web browsers).

ButtonTable:
- make the span and separator layout more explicite
- add some small horizontal padding when button text
  is centered
2023-05-12 20:12:10 +02:00
poire-z
7a95d11f07 ScrollableContainer: add support for step/grid scrolling
When the containee is row-based, this can ensure that when
scrolling with swipes, we get the a full row at top, and
that any truncated row at top or bottom is fully visible
after a swipe.
2023-05-12 20:12:10 +02:00
poire-z
0ee10e5049 Button: fix unstable height
The final height of a button could be different whether
a smaller font size or multiline end up being used.
Also fix 2-lines logical error making it less favored.
Also forward any lang property to the underlying text widgets.
2023-05-12 20:12:10 +02:00
poire-z
4fa7e718a2 TextBoxWidget:getFontSizeToFitHeight(): allow for more accuracy
By providing the font that will be used.
As it's more expensive, use only when really needed.
2023-05-12 20:12:10 +02:00
hius07
b4f453eb58
Page overlap: add "Horizontal line" marker (#10401) 2023-05-07 20:28:18 +03:00
hius07
2ba694d394
FileChooser: fix percent sorting (#10393) 2023-05-05 22:48:36 +03:00
yparitcher
1102c030fa
Kindle: toggle cover events
Allow disabling the hall efect sensor via the sysfs knob, so the kindle system wont sleep & wake the device

for those of use that stay in koreader, are caseless and have get spurious wakeups
2023-05-03 10:26:35 -04:00
hius07
4f23a6fafa
Custom book covers (#10329) 2023-05-03 15:43:05 +03:00
John Hackett
3f9820052d
Add esperanto-english dictionary (#10297) 2023-05-03 10:18:53 +02:00
hius07
9db74f1f01
ConfirmBox: add widgets (#10364) 2023-05-02 08:25:34 +03:00
hius07
a5320acf4f
koptoptions: fix default margin (#10376)
Regression from #10208.
Closes #10373.
2023-05-01 10:09:06 +02:00
zwim
00b3594d44
Kobo: Refactor frontlight toggle ramp behavior (#10305)
* Rewrite the loop mechanism to use scheduled tasks instead of a single blocking-ish subprocess.
* Change the actual logic to be more pleasing to the eye, especially on newer devices, as those *may* natively ramp on set; and fix a bad interaction with that behavior that could lead to no ramp at all on ramp down.
* Simplify Generic's Suspend handling to deal with the refresh ordering in a saner manner. The screensaver might be visible a tad longer than before this change before the frontlight actually ramps off.
2023-04-30 23:28:30 +02:00
zwim
662bd65a5f
Fix some screen refresh effects (#10306) 2023-04-30 22:15:34 +02:00
poire-z
04fba2205d PageBrowser: show page number alongside thumbnails
Add a top left menu item -/+ to show none, only on the
first thumbnail of a row, or on all thumbnails.
Also make the page slot separator longer in the bottom
ribbon before pages that start a thumbnails row.
Also show a little spike in the bottom ribbon below page
slots that get their page number displayed, to ease
figuring out the connection.
2023-04-30 20:46:09 +02:00
weijiuqiao
cb9cbff10e
KeyValuePage: fix corner-case alignment bug (#10326)
Change algorithm to comparing all kv pairs.
Also ignore any pairs where the value is "" when computing
the alignment, since they usually are intended more as
a title and should not interfere.
2023-04-28 23:53:37 +02:00
NiLuJe
53e6cf563a
Deal with table.pack corner-cases properly (#10350)
c.f., https://github.com/koreader/koreader-base/pull/1603 for more
details.

Re: #9624
2023-04-24 00:21:05 +02:00
hius07
be7d6008d1
Reader: do not apply line spacing out of range (#10307)
* readercoptlistener: fix line spacing out of range

* readerkoptlistener: fix line spacing out of range

* creoptions: fix line spacing limit
2023-04-13 20:43:04 +02:00
zwim
4dbaca180a
PM: Optimize task queue handling around standby (#10203)
Instead of firing on(Enter|Leave)Standby Events, and having every other piece of code that might care about that handle re-scheduling their stuff themselves; simply make the standby implementation (i.e., AutoSuspend's) shift the whole task queue by the amount of time spent in standby to re-sync everything automatically.

(This is necessary in the first place because Linux, as the task queue ticks in CLOCK_MONOTONIC, which does *not* tick during suspend/standby; while we expect most of the tasks scheduled to actually reflect real world clock delays).
2023-04-05 20:54:47 +02:00
hius07
483a005cc2
File browser: show Folder Menu on long-press on Home icon (#10298) 2023-04-05 08:24:41 +03:00
hius07
b01e1c5918
Reader: do not apply font size out of range (#10295) 2023-04-04 08:11:02 +03:00
hius07
14de514ae8
filechooser: fix show files in bold (#10296) 2023-04-03 12:18:38 +03:00