Commit Graph

3323 Commits (master)

Author SHA1 Message Date
Philip Chan f0a3bcf05b
NT: add Hot swapping dictionaries button and edit button into FocusManager's layout (#11803)
fix #11783
8 hours ago
Joshua Bullock 1398154546
Gesture: Add toggle for orientation lock (#11795) 1 day ago
peicuiping a7e34673e6
chore: remove repetitive words (#11785) 3 days ago
Valentin Dubois 526a1fb727
Initial support for new Kobo (Clara B/W + Colour, Libra Colour) (#11737)
* Support the Clara B&W, Clara Colour & Libra Colour
* Enable HW dithering on *all* the Kobo MTK devices
* Enforce 32bpp instead of 8bpp for Kobo devices with a color panel (the driver doesn't actually support 8bpp anyway)
* Enable standby support on MTK (whenever possible, i.e., not when plugged in, as that is horribly, horribly broken).
* Enforce the dedicated "color" waveform mode for image content in ScreenSaver, ImageViewer & Reader.
* Fix charging LED support on MTK
* Tweak the frontlight ramp on MTK + LM3630 so that it actually ramps smoothly
4 days ago
sdasda7777 8530282d38
Add Czech keyboard layout (#11769)
Fixes #11339.
4 days ago
hius07 c47d3b3177
Menu widget: cleanup (#11759) 5 days ago
hius07 d82815952e
Annotations, part 1 (#11563)
New format to handle annotations (page bookmarks, highlights, notes) and store them in the book metadata files.
1 week ago
hius07 6b0d97bf22
Multiple collections (#11693) 2 weeks ago
hius07 8ff846ba6e
SortWidget: sort alphabetically (#11705) 2 weeks ago
hius07 f5be04a738
Keyboard: detect tap if swipes are disabled (#11699)
Discussed in #11668.
3 weeks ago
SomeGuy fb86acaf1a
Sleep screen wording fixes (#11647) 1 month ago
SomeGuy 279f16aa23
Sleep screen menu reworked (#11549) 1 month ago
Tomas Janousek 1fbdc1f19d NetworkMgr: Limit the hasDefaultRoute check in isOnline to PocketBooks
It's not necessary on other platforms. To be more precise, it would be
necessary on Kobo as well, but there's a different workaround in place:
https://github.com/koreader/koreader/pull/6424/files#diff-be863601c59a2d6607af6b04b3be2392ec4494df6d25dae48250fae57b737f61R216-R224
1 month ago
Tomas Janousek 4fa6783dbb NetworkMgr: Use cheaper/simpler hasDefaultRoute in isOnline
Device:getDefaultRoute parses /proc/net/route and converts the hex
addresses to textual IP addresses, but in `isOnline` we don't care what
address the gateway actually has, we only care about whether we have a
default route into the Internet.

This provides a simpler alternative that does the equivalent of
"ip route get 203.0.113.1 || ip route get 2001:db8::1" (note that it
does support IPv6-only connectivity as opposed to
Device:getDefaultRoute) and returns true if we have a route.

Inspired by https://github.com/pavel-odintsov/get_default_outgoing_ip_linux
1 month ago
Tomas Janousek b3e125a7ce NetworkMgr: Fix PocketBook losing net access
Doing the `isOnline` check (`socket.dns.toip("dns.msftncsi.com")`)
without having internet connectivity (`!isConnected`) results in the
`isOnline` check never succeeding again even if connectivity is later
acquired. This is most likely caused by /etc/resolv.conf only being
parsed once - https://sourceware.org/bugzilla/show_bug.cgi?id=984, an
issue that was fixed in glibc 2.26 (PocketBook firmware U740.6.8.2461
has glibc 2.23).

This fix works around the problem by checking if we have a default route
first before even attempting to check `isOnline`. If we don't, then
`isOnline` is (almost) guaranteed to fail anyway.

We could alternatively check `isConnected` instead, but that only checks
wireless connectivity on many platforms, and we could have internet
access via USBNet instead. Checking for the default route via any
interface should work reliably for both wireless and USBNet
connectivity.

Another alternative fix is to add a fallback nameserver to
/etc/resolv.conf like we do for the Kobo platform [1]. Unfortunately,
this fix would not work in the following (rather common) scenario:

1. PocketBook boots, connects to WiFi
2. KOReader starts, /etc/resolv.conf looks all right, no fallback needed
3. PocketBook goes to sleep, disconnects from WiFi, clears resolv.conf
4. PocketBook wakes up, stays disconnected
5. KOReader user does a Wikipedia lookup, networking freezes

[1]: https://github.com/koreader/koreader/pull/6424/files#diff-be863601c59a2d6607af6b04b3be2392ec4494df6d25dae48250fae57b737f61R216-R224

Fixes: https://github.com/koreader/koreader/issues/10183
Related: https://github.com/koreader/koreader/issues/6421
1 month ago
Frans de Jonge 601925ab87
[minor] CSS tweaks: fix typo cellpading → celpadding (#11618) 1 month ago
Frans de Jonge a7edf213a5
[minor] FileChooser: use en-dash instead of dash for UI (#11615) 1 month ago
Frans de Jonge b9261e0245
[i18n] Font UI fallbacks: insert replacement characters with template for Weblate compatibility (#11614)
Added in <https://github.com/koreader/koreader/pull/8722> and unproblematic for the past two years, but Weblate has now decided to complain about it to the extent of disabling translations:

> Error message
String contains control character: 'If some book titles, dictionary entries and such are not displayed well but shown as \ufffe\ufffe or ��, it may be necessary to download the required fonts for those languages. They can then be enabled as additional UI fallback fonts.\nFonts for many languages can be downloaded at:\n\nhttps://fonts.google.com/noto\n\nOnly fonts named "Noto Sans xyz" or "Noto Sans xyz UI" (regular, not bold nor italic, not Serif) will be available in this menu. However, bold fonts will be used if their corresponding regular fonts exist.'
1 month ago
hasezoey 42c93a7623
FileChooser collates: use "item.sort_percent" for sorting + extra `on-hold` handling (#11592)
re https://github.com/koreader/koreader/pull/11524#issuecomment-1984110990
re https://github.com/koreader/koreader/pull/11542#issuecomment-2018164346

re #11592
1 month ago
Frans de Jonge ca8e9352ba
[i18n] Add en-GB and Romanian translation to UI (#11577)
* Add en_GB translation to UI

Follow-up to https://github.com/koreader/koreader-translations/pull/167

* Uncomment Romanian
2 months ago
poire-z 67cd647d1a
ReaderToc: add option to show chapter lengths (#11546) 2 months ago
poire-z 9a84755e56
Wikipedia EPUBs: add settings for include/highres images (#11544)
Allows setting a default answer to the "Include image"
and "slightly higher quality images" questions when
saving a Wikipedia article as EPUB.
2 months ago
SomeGuy ac0483bfce
Screensaver: 0% only on first page, 100% only on final page (#11541)
Fixes #11516
2 months ago
hius07 5414858b74
Menu widget: fix item property name (#11534) 2 months ago
poire-z 0eaa2d8248 Wikipedia: tweak EPUB css to force epub.css look
Include in the EPUB stylesheet most of our epub.css
tweaks, so we get our expected styling even when
html5.css is used as the default stylesheet.
(Users liking the "web page" look can still get it
by enabling some of our existing style tweaks.)
2 months ago
poire-z e3d7669588 Style tweaks: add tweak to avoid some presentational hints 2 months ago
hius07 6f896e9383
ReaderFooter: chapter progress bar (#11505) 2 months ago
hius07 8df885438c
Bookmarks: edit highlighted text (#11484) 2 months ago
poire-z c65d128032
Menu, DictQuickLookup, TextViewer: allow mousewheel scrolling (#11525)
We also need to catch it in TrapWidget so we can
interrupt Wikipedia articles images loading.
2 months ago
zwim 58b3367d18 anti alias rounded corners in UI 2 months ago
hius07 7edb64ecee
Upper menu: fix generating the menu (#11513)
revert all changes to the upper menu made in #11495
2 months ago
hius07 ec98c6334b
MenuSearch: open upper menu when needed only (#11495) 2 months ago
hasezoey ade1daca3a
FileChooser: "percent - unopened - finished last" consider status "complete" as 100% (#11472)
re #11369
2 months ago
hius07 72a6fa1e64
FileManager: less lfs calls when selecting files (#11476) 3 months ago
hasezoey 76980098ec
FileChooser: add new sorting method (#11369)
"percent - unopened - finished last"
(ie. 90% > 50% > 0% > unopened > 100%)
3 months ago
hius07 5d4747c593
FileManager: less lfs calls (#11452)
Use item info provided by FileChooser.
Also fix showing PathChooser with invalid path,
and fix issue when opening non-supported files.
3 months ago
poire-z 76bf85738a Style tweaks: add inpage foootnote classnames and a tweak 3 months ago
poire-z 0506ffe289
HttpInspector: new plugin for developers to inspect KOReader (#11457)
Can be used to inspect the state of the objects in
a running KOReader.
It can also be used to execute actions (like the ones
available to associate to a gesture) with HTTP requests
from a remote computer/devices/gadgets.
The TCP server side is provided either with a new
ZeroMQ StreamMessageQueueServer (thanks bneo99),
or with a LuaSocket based SimpleTCPServer.
Minor UIManager tweak to avoid uneeded inputevent
when such a ZeroMQ module is running.
3 months ago
hius07 962477e7c6
TextViewer: make find result bold (#11427) 3 months ago
zwim f836f6a237
Clear UI leftovers before doing an OTA-install, add unmovable to InfoMessage and ConfirmBox (#11412) 3 months ago
hius07 38a14ff3a0
PathChooser: fix calling Folder shortcuts (#11367) 4 months ago
NiLuJe a8a944cbaf ScreenSaverWidget: Simplify the setDirty call
No need for a closure, there's no dimen involved.
4 months ago
NiLuJe 39744d7642 TouchMenu: TouchMenuItem's UnderlineContainer should probably have its own dimen object
The coordinates could wonky otherwise, as TouchMenuItem is an
InputContainer.
Mostly harmless in practice as that UC is its main widget.
4 months ago
hius07 925aa728c9
Fulltext search: action to show last findall results (#11388) 4 months ago
NiLuJe 82bf8bf379 ScreenSaver: Properly exclude macOS resource forks again
The previous check was inlined in the dir walk, so it always saw a
relative path.
Here, it gets an absolute one instead, so act accordingly ;).

Fix #11390
Regression since #11056
4 months ago
NiLuJe e5cb24a891 ConfigDialog: Simplify the previous fix
Geom's intersectWith & friends have nil guards in place since #7664,
so the insane workaround is completely superfluous.
4 months ago
NiLuJe 19ed35e59c ConfigDialog: Don't enforce 0x0 dimensions on initial display
FrameContainer now behaves like other widgets, and no longer re-computes
dimensions in paintTo *if you provide a dimen*.
Since we do here, for.... reasons I'm not entirely sure still make any
sense, make sure we actually compute valid dimensions,
instead of an empty rect from Geom:new ;).

Fix #11389
4 months ago
NiLuJe 90ae4acca6 Chore: Review FrameContainer constructors for shared dimen objects
Nothing else seems problematic, this is mostly just cosmetic sanitization
around Geom objects.
4 months ago
NiLuJe 65e22ceafc Widgets: Fix a bunch of regressions after the FrameContainer change in #11364
FrameContainer now preserves its self.dimen, which means it cannot be
shared with another widget or container that might also modify it during
painting ;).

Fix #11370
Fix https://github.com/koreader/koreader/pull/11364#issuecomment-1894454657
Fix #11379
4 months ago
NiLuJe 5e4d182608 Fold the debug logging flip inside the "Report a bug" entry
Also, implement a Notification source that will *always* be shown,
regardless of user preferences, and use it here.
4 months ago