2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

4187 Commits

Author SHA1 Message Date
Martín Fdez
be2bcac28e switch between internal and external sdcard 2020-11-29 10:19:47 +01:00
jperon
1f16815f94
[chore] Get rid of ui/data/strings.lua (#6921)
As suggested [here](https://github.com/koreader/koreader/pull/6885#issuecomment-734865881)
2020-11-29 10:18:59 +01:00
NiLuJe
bba8b31e1d
AutoSave: Delay I/O until after the pageturn (#6917)
nextTick was too early ;).

Prevents small hitches when turning the page for the page where this
triggers.

Apply the same trickery to the Stats DB insert, even if that one probably
had a much smaller impact.
2020-11-28 22:59:27 +01:00
NiLuJe
931f01ef26
Kobo: Warn on restart if the startup script is outdated (#6916)
* Warn on restart if the startup script has been updated, because a restart will not reload it.

* Also warn right after the update if it contained a startup script update...
2020-11-28 22:48:09 +01:00
jperon
8eeb010dc9
Paged documents: rework zoom options (#6885)
- Move zoom options from top menu to bottom config
- Add option to manually define zoom (relative to
  page width) and overlap (in percent)
- Add options to zoom to columns or rows, possibly
  with overlap. Add panning direction options when
  page forward in these modes
2020-11-28 17:18:57 +01:00
zwim
52f66a89d2
CoverImage plugin: enable on Remarkable and PocketBook (#6906) 2020-11-28 13:58:44 +01:00
poire-z
da95091e7b
ReaderTypography: fix language names order in menu (#6913)
Also fix just added "Latin (liturgical)" hyph filename.
See https://github.com/koreader/koreader/pull/6910#discussion_r531091283
2020-11-26 20:53:34 +01:00
jperon
16b37b5605
bump base (thirdparty, crengine), add Latin hyphenation (#6910)
Includes:
- Resync libue w/ KoboUSBMS
- Update to FBInk v1.23.0
- Update to KoboUSBMS v1.0.0
- Revert "blitbuffer: Always enable JIT workaround" (6705c028)
- BB: Ensure consistent types are being used in writePNG
- bump crengine: hyphenation: add Latin, update Esperanto
2020-11-26 16:06:46 +01:00
NiLuJe
0ae86fc0ec
ReaderFooter: Cleanup some more messy dimensions handling (#6898)
Some stuff was still hacked on manually instead of trusting the widget system to do things right, which it does, if you update the right stuff at the right time the right way ;). *This Is The Way*.

Fix #6893 (and address https://github.com/koreader/koreader/pull/6878#discussion_r523411883, because it was indeed redundant ^^).

Includes a bonus fix for a number of (footer) settings not being applied immediately in PDFs.
2020-11-22 04:52:03 +01:00
NiLuJe
960b2ae62a
OPDS*: Mangle Calibre feeds some more so that they don't confuse luxl/us (#6902)
By essentially dropping the whole XHTML block, instead of trying to salvage each and every tag one by one as we did before.

Also, as that's usually the result after broken parsing, handle nil URLs slightly better in the frontend, so that they get caught/reported properly instead of doing nothing and/or crashing half the time.
2020-11-22 04:51:32 +01:00
poire-z
dde497a0df
ReaderCropping: prettier bottom buttons (#6900)
Also remove the grey gap between the page and the buttons
that would appear only when the footer is visible.
2020-11-21 00:19:24 +01:00
Frans de Jonge
ded8ae6efb
[lang] Minor touch-up to non-linear info text (#6895)
As an aside, it should be "ToC," not "Toc." ;-)

Cf. <https://github.com/koreader/koreader/pull/6847>.

* Also fix newlines in to be translated string
2020-11-20 09:02:30 +01:00
Jellby
5e3c554dd7 Hide non-linear fragments
Add option to hide (skip) non-linear fragments, only working
in 1-page mode. Tweaks mostly to footer, toc and skim code
to make it clear(er) which pages belong to linear or non-linear
fragments.
2020-11-18 18:28:47 +01:00
Jellby
f892d4559f Fix typos 2020-11-18 18:28:47 +01:00
Martín Fernández
4a6f8769ae
android: fix dict overrides (#6887)
- User overrides marked as false were not checked
- Actions without app were skipped.
2020-11-18 16:43:20 +01:00
Jellby
dba7112390
Footer: ensure minimum height for the in-fill in progress bar (#6878) 2020-11-18 13:06:36 +01:00
poire-z
314ac1973a Dict/Wiki: update footer on full refresh 2020-11-18 11:41:51 +01:00
poire-z
8d49b8d46b Reference page numbers list: highlight current page 2020-11-18 11:41:51 +01:00
NiLuJe
510ea5963c
[Kobo] Don't attempt to restart Nickel when asking for a reboot/shutdown (#6880)
* Don't attempt to restart Nickel when asking for a reboot/shutdown

Use a magic exit code to ID those cases.

* Limit this to Kobo, to avoid breaking potentially existing assumptions
with other platform's startup scripts
2020-11-14 23:39:19 +01:00
Martín Fernández
d914476973
sdl: resize FM (#6882)
Required after #6309.

Uses the same logic as in android (I cannot locate the PR right now). Tested on a mac.
2020-11-14 21:15:05 +01:00
Frans de Jonge
6cc0ab8dc9
[fix] Always initiate empty context table (#6874)
In case of no environment language. I suppose that doesn't tend to happen much in the wild since I added the offending code early in 2020. ;-)

Fixes <https://github.com/koreader/koreader/issues/6873>.
2020-11-13 16:54:01 +01:00
zwim
f24d6f8aea
Update statusline immediately when toggling a bookmark (#6872) 2020-11-13 13:04:27 +01:00
jperon
c5ba8a8301
Order keys in settings.reader.lua (#6868)
* Order keys in settings.reader.lua
* Comma at the end of last item in table.
2020-11-12 20:38:11 +01:00
zwim
926e7dd402
coverimage plugin (#6813)
* Plugin for saving the cover image to file. Useful in some e-ink android devices.
2020-11-10 15:00:56 +01:00
Galunid
25cfef3f6d
Fix wording in previous commit (#6862) 2020-11-09 22:45:27 +01:00
Galunid
8a5c2e3af6
Add menu item allowing users to disable "hold on footer to show Skim Widget" (#6852) 2020-11-09 20:16:53 +01:00
yparitcher
edec69ac8b
[CRe] Tweak nightmode and CRe call cache interaction (#6859)
Simplify 4caf8f28 (#6854), allowing us not to track
nightmode in two places.
2020-11-08 22:55:11 +01:00
yparitcher
7fb20f2c55
Dispatcher: add Screenshot action (#6858) 2020-11-08 22:43:37 +01:00
jperon
7bd5933066
Methods to modify highlight menu. (#6851)
* Allow plugins to hook into highlight menu
2020-11-08 13:07:51 +01:00
tastytea
9277568a65
Apply CSS tweaks for links to all elements below a elements. (#6856)
This is for ebooks that have <span> inside of <a>.
2020-11-08 13:03:18 +01:00
NiLuJe
4caf8f281d
[CRe] Ensure toggling nightmode invalidates the drawCurrentView cache (#6854)
* Use a CRe set* method when toggling nightmode

This ensures it gets flagged as add_reset by the call cache, and that
CRe will actually re-render, as it's necessary if nightmode_images is
enabled (the default).

Fix #6845

* Prevent ReaderHighlight:onTap from running ReaderHighlight:clear when
it's unnecessary.

Avoiding a clearSelection call in CRe that could invalidate the cache
and cause unnecessary redraws.

* Don't store empty highlight arrays when all HLs on a page have
been deleted
2020-11-08 02:18:50 +01:00
jperon
dee72a431c
Set extra_plugin_paths to data_dir/plugins (#6849) 2020-11-06 17:46:26 +01:00
Martín Fernández
91708e25d0
android-luajit-launcher refactor (#6821)
- Lcd devices won't use the SurfaceView, just the good old native content/window (except AndroidTv and ChromeOS)
- All android dialogs will be presented with Material Design on recent devices.
- Added an option to device settings to manage application battery optimization.
- Permissions that require the user to go to a settings page will be presented with a native android dialog.
- bump android-luajit-launcher

- Changes under the hood: koreader/android-luajit-launcher#257
2020-11-04 19:15:07 +01:00
jperon
43ba8a1173
Qrcode support (#6844)
2 new widgets:

- QRWidget, that's like an ImageWidget, but with a text property that will be converted to a QR code ;
- QRMessage, that's like an InfoMessage, but shows the message as QR code.
Moreover, it adds the ability to export QR codes to the text editor.

1 new plugin:

- Generate QR codes from clipboard

Changes to text editor plugin:

- Add the ability to export QR codes.
2020-11-04 18:59:39 +01:00
poire-z
8403154d4d
Reader: rationalize "Back" key/action handling (#6840)
Have ReaderBack be the sole handler of onBack.
Add 4 mutually exclusive options for the Back key,
to avoid ReaderLink and ReaderBack location stacks
from interfering (ReaderBack's stack being always a
superset of ReaderLink's stack).
So, remove "Enable back history", which is replaced
by Back option "Go to previous read page".
Fix a few possible crashes and inconsistencies (when
zoom, scroll or reflow have changed) with ReaderPaging
and ReaderView when restoring previous page/view.
2020-11-03 22:51:11 +01:00
poire-z
74c1813a82 GestureDetector: add Tap interval on keyboard setting
Follow up to b90f6db8: allow specifying an other
value for tap interval when the keyboard is shown
(a good value for tap interval on reader and UI
elements might be too long on the keyboard, and
prevent typing fast).
2020-10-31 09:36:24 +01:00
poire-z
8f2bdf959d Style tweaks: fix some wording 2020-10-31 09:36:24 +01:00
NiLuJe
a393137273
Another round of ReaderFooter fixes (#6830)
* When auto_refresh_time is enabled, don't actually refresh anything when the footer is hidden.
* Fix a bunch of state tracking related to height computations, meaning `getHeight()` is now actually accurate, always, and we don't need shitty workarounds anymore.
  * `footer_container.dimen.h` *includes* the progress bar, so, never reset it to 0 unless the progress bar is disabled (some `settings.progress_bar_position` codepaths were mistakenly doing just that).
  * More aggressively set/reset `footer_text.height` (not sure this one makes much of a difference, and/or if it's actually useful at all, but, the tracking was already there, but hella inconsistent, so, just fix it).
* Honor `settings.reclaim_height` in other bits of code that were only checking `footer_visible` to figure out the visible page area.
* Ask ReaderView to update the `visible_area` *now* when toggling the footer's visibility (for ReaderPaging).
2020-10-27 16:48:34 +01:00
NiLuJe
c810a19040
H2O: Fix initial tap detection (#6832)
* Fix initial tap on the H2O

There's no slot 0, so make sure the initialState doesn't get confused by input's init data that otherwise assumes the main slot is 0
2020-10-27 16:42:22 +01:00
NiLuJe
8e1c6c8409
UIManager: Handle covers_fullscreen properly in close (#6828)
* When closing a widget, stop sending setDirty call for widgets lower on
the stack as soon as we hit a full-screen one.

This prevents inflated refresh regions when closing stuff on top of a
stack of multiple covers_fullscreen widgets (i.e., InfoMessages on top
of the Favorites page on top of the FM, for instance).

And, while we're there, also prevent getting infected by dithered
widgets when they're below a non dithered full-screen widget (the exact
same examples works, if the underlying FM page requires dithering).
2020-10-26 12:28:00 +01:00
Martín Fernández
40b4ccffa8
KoptInterface:getWordFromBoxes: guard against nil boxes (#6827)
Fixes #6825
2020-10-26 12:26:18 +01:00
ezdiy
144fd78986
fontlist: Skip fonts with missing family_name (#6820)
* Also don't trip on pipes
2020-10-24 13:23:05 +02:00
Martín Fernández
99ad13b13c
android: handle onDestroy (#6811)
* handle onDestroy

we need it if killed by the system (ie: battery optimizations or OOM)
we need it to exit the lua VM when we call finish() from Kotlin

This prevents us for being trapped into a zombie state
2020-10-22 20:18:36 +02:00
ezdiy
5a86443eb1
Pocketbook: waveform presets (#6794)
On pocketbook, update modes are not as clear cut due to overall
chipset and kernel version mess. Inkview solves this by always
using the slowest (and safe) GC16 waveform. We now do that too
by default.

Slow updates suck though, so there's now a menu entry to configure
it for speed (with mild artifacts at best, kernel panic at worst).

This is a generic interface (any eink Screen can announce support).
The driver may interpret the slow/fast range however they want.
2020-10-22 13:23:09 +02:00
NiLuJe
dda905271d
[Kobo, Mk. 7] Enable the power LED when charging (#6810) 2020-10-22 01:17:34 +02:00
yparitcher
602e0b3feb ldoc fixes 2020-10-20 18:11:55 -04:00
yparitcher
433b82f162 Dispatcher: allow registering actions at runtime 2020-10-20 18:11:55 -04:00
ezdiy
a73bf1afda
fontlist: Cache categorized font info (for mupdf) (#6786)
Info about each face (l10n, name, family, style etc) is
now cached offline, so fonts can be queried ahead of time.

Fixes https://github.com/koreader/koreader/issues/6763
2020-10-20 06:30:41 +02:00
NiLuJe
0406be3319
Random nano optimizations (#6801)
* Don't call Screen:afterPaint if nothing was actually painted

* Stupid micro-optimization (os.)time! (pun intended :D)
2020-10-18 20:38:17 +02:00
poire-z
633d43b322 Devices: get rid of touch_probe_ev_epoch_time
On devices where the event time is the uptime (time since
boot), we don't need to trash it and use TimeVal:now()
and lose precision. We can still use these times for
relative delays and durations computations, which is
mostly all we use them for.
We just need a real clock time in GestureDetector for
two timers (long-press and double tap), where we do
the event time type detection on the first event, on
all devices.
2020-10-18 20:13:44 +02:00
poire-z
b90f6db876 GestureDetector: add Tap interval setting, to avoid bounces
Also fix info_text not displayed, and add more
descriptive ones.
2020-10-18 20:13:44 +02:00
ezdiy
893909146d
Pocketbook: use raw input I/O (#6791)
This allows for better energy efficiency (no more 50Hz tick poll),
as well as lower input lag / higher precision - touch events are
native linux ones.

In addition, auto off/suspend plugin is used in this mode, as we need
to trigger (timed) sleep / poweroff on our own, since the OS ones
will no longer work whenever koreader has focus.

This is for rooted devices only, and possibly somewhat FW
specific, so enabled only on PB740-2 where it's reasonably tested.
2020-10-17 12:59:24 +02:00
NiLuJe
dfe3502b91
ReaderStatistics: Data collection improvements (#6778)
* Update the data collection format & handler to make it much less tortuous
* Update the pagecount & resync the stats on document layout changes
* Update the database schema to allow doing most queries against a SQL view that rescales the collected data to be accurate regardless of document layout (thanks to @marek-g for the SQL magic ;)).
* Add a "reset stats for current book" entry in the list of reset options, one that won't horribly break stats in said book ;).
* Fixed a couple of resource (SQL connection) leaks (in ReaderStatistics:getCurrentBookStats & ReaderStatistics:getCurrentBookStats).
* Flush stats to the DB on periodical metadata saves.
* Minor cosmetic tweaks to the code
2020-10-15 05:31:21 +02:00
Martín Fdez
009e2b3b94 android: reinit FM after surface change 2020-10-13 21:16:19 +02:00
NiLuJe
d2f533e5b7
A couple of hotfixes for 2020.10.1 (#6781)
* PB Crash Screen:
	* We don't actually support the "tap to restart now" behavior, it's a
	  plain sleep.

* Remove CBB toggling leftovers missed in #6696

Fix #6780
2020-10-11 23:08:24 +02:00
NiLuJe
ac6b121c85
Disable HW inversion on rM (#6779)
Turns out it's being weird like on Mk. 7 Kobos with a crapload of PxP
processing flags.
Except without the "crapload of flags", part :D.
2020-10-10 21:43:24 +02:00
Galunid
39faa8b860
Move numeric sort up, so it looks better (#6777) 2020-10-09 22:27:57 +02:00
NiLuJe
b932b97b20
A few reMarkable QoL fixes (#6772)
* Enable AutoSuspend plugin on rM

Fix #6769
Re: #6028

* Use the PowerEvent handler on rM

It makes much more sense than the fire & forget & hope for the best
approach copied from the Kindle platform, because we *are* controlling
suspend ourselves (mostly), unlike on Kindle ;).

Fix #6676

* Enable HW inversion on the rM

I mean, we kinda forgot to ever test that, but I don't really see why it
wouldn't work ;).
2020-10-09 19:23:57 +02:00
yparitcher
fca89a816b
InfoMessage: accept options for lang and para direction (#6766) 2020-10-08 12:58:13 +02:00
Marek Gibek
20a413389c
[UX] Add Polish keyboard layout (#6762) 2020-10-07 17:29:47 +02:00
NiLuJe
0295bfa124
ReaderFooter: Make the wonky "hide me if I'm off" behavior consistent and user-configurable. (#6754)
* ReaderFooter:
	* Make the wonky "hide me if I'm off" behavior consistent and user-configurable.
2020-10-06 05:25:37 +02:00
poire-z
eb137d720e Font menu: show font names with their own font 2020-10-06 00:34:17 +02:00
georgeto
0fa45c21cf SortWidget: Fix moving of items over several positions
Previously items weren't actually moved, but swapped with the item
at their new position. That works well if you move an item for one position.
However, if you move an item over several positions, you won't get the
expected behaivor.
2020-10-05 18:22:47 +02:00
georgeto
b668791c9c SortWidget: Toggle checked status when tapping on checkmark
In a checkable SortWidget a tap on a checkmark now toggles the checkmark,
instead of selecting the corresponding item.
2020-10-05 18:22:47 +02:00
georgeto
f31bd736f7 Allow sorting of dictionaries 2020-10-05 18:22:47 +02:00
georgeto
ace3525ce1 SortWidget: Add support for checkmarks 2020-10-05 18:22:47 +02:00
NiLuJe
d6cecc9ee3
Bump base to bring in a few fixes & cleanups (#6753)
* Bump base

https://github.com/koreader/koreader-base/pull/1205
https://github.com/koreader/koreader-base/pull/1206
https://github.com/koreader/koreader-base/pull/1207

* The strcoll shenanigans have been moved to ffi/util
2020-10-05 16:34:46 +02:00
NiLuJe
e17a0d4068
Don't generate separators for empty generators (#6752) 2020-10-05 16:18:31 +02:00
poire-z
a50774003f ImageViewer: allow saving current view as an image
And to make it the screensaver image.
Done on two-finger large diagonal tap on multitouch
devices (like regular ScreenShoter) as long-diagonal
swipe is reserved for panning.
Fallback to tap in the bottom left corner on
non-multitouch devices.
2020-10-03 18:12:10 +02:00
poire-z
f9e06c8d8b Font: fix possible messy font sizes when geometry/dpi change 2020-10-03 18:12:10 +02:00
poire-z
8b886e5922
bump crengine: sync with upstream, new hyphenation languages (#6746)
Includes:
- (Upstream) various unimpacting changes to keep in sync
- (Upstream) Fix issues with legacy text rendering
- (Upstream) FB3/DocX/ODT: get lang and description metadata
- (Upstream) remove some global settings, make them per-doc
- TextLang, hyphenation: add Armenian, Friulian, Piedmontese,
  Romansh, Zulu and Brazilian Portuguese.

Also make cre the prefered engine for .xhtml (over MuPDF)
and for .xml (which might be HTML).
2020-10-03 15:07:07 +02:00
ezdiy
6b4188074e
Pocketbook: Fix silly rotation bug on PB1040 (#6735)
Ditto as PB740
2020-10-01 00:10:22 +02:00
ezdiy
592e54aa02
Pocketbook: Fix silly rotation bug on PB740 (#6734)
It detects B288, disables hwrot...
.... and there wasn't the isAlwaysPortrait enabled to serve as an alternative.
2020-09-30 23:27:40 +02:00
NiLuJe
ec3ec8dc21
Show full ToC entry on hold (#6729)
Fix #6728
2020-09-30 19:56:56 +02:00
NiLuJe
e169b34577
Fancier Wi-Fi status icons in ReaderFooter (#6725)
* In icons mode, just use two different icons to display Wi-Fi status

* Enable Wi-Fi status icon on Kobo & Cervantes, too

* Refresh footer on (dis)connect if the Wi-Fi status item is enabled
2020-09-29 01:06:41 +02:00
ezdiy
7a40b496fb
blitbuffer: fixups for base (#6714)
fixups for base bumped to https://github.com/koreader/koreader-base/pull/1201
otherwise tilecache breaks
2020-09-28 01:04:59 +02:00
NiLuJe
1ac5846eff
Revamp ToC ticks handling (#6716)
Replace the level `0` `getTocTicks` heuristic with a simple sorted, deduped flat listing of *every* ToC node (via `getTocTicksFlattened`).
2020-09-27 22:25:16 +02:00
ezdiy
25d5e9322c
Pocketbook: Try to auto-detect HW feature caps more precisely (#6721)
The differences between Allwinner/MXC matter surprisingly little in practice, it's not even worth
it to bother the base mxc driver with it. Instead, frontend can make some informed choice by
probing for the hardware and tweaking requested device caps accordingly.

On Allwinner B288, we disable both hwrot (done in software in kernel and terribly, ie not worth it)
and hwinverse (no support whatsoever). On NXT we'll keep both on, as the kernel driver seems
to be using the hardware properly .
2020-09-27 21:35:03 +02:00
Galunid
b297fb7cf6
Panel zoom - improve output image resolution (#6709) 2020-09-25 20:14:01 +02:00
smartscripts-nl
abfba6c709
Sort folder shortcuts (#6707)
In the current KOReader version the folder shortcuts are sorted by date of addition. When a user has many folder shortcuts (like I do blush ) they are easier to find again when sorted alphabetically.
2020-09-25 15:54:14 +02:00
smartscripts-nl
9a9f6f5d28
[fix] Save document settings before activating USBMS (#6713)
As things were, when I activated USBMS, any bookmarks recently added and not yet stored in the sidecar file would be lost after returning to the reader. These changes fix that.
2020-09-25 15:52:08 +02:00
ezdiy
ef8d2d0d6e
linuxfb: is_always_portrait must be passed to screen init() from all frontends. (#6712)
This is because fb driver should not be inspecting self.device for low level
caps anymore.

Fixes #6711
2020-09-25 13:20:02 +02:00
Galunid
15455b594d
[feat] Comics: zoom to panel (#6511)
This pull requests aims to provide convenient way to zoom in comics. The idea is when user holds/double taps (not decided yet) on a manga/comic panel, it gets cut out from the rest of the image and zoomed. More details in koreader/koreader-base#1148. Depends on koreader/koreader-base#1159
2020-09-24 15:17:37 +02:00
NiLuJe
aeaf911758
Make sure Dispatcher doesn't pickup eInk settings on !eInk devices (#6702) 2020-09-24 05:06:13 +02:00
ezdiy
5345728cc4
Clean up C blitbuffer kludges. (#6696)
CBB now handles nightmode correctly (by deferring to Lua), so we no longer
need to do monkey dances about disabling it when hw invert is missing.

canUseCBB cap is resolved by generic device re-configuring blitbuffer
on the go, so as to avoid repeating the same thing in every device driver.

The dev setting can now flip cbb on the go, so one can gloat at the near
meaningless perf difference - 2Mp draw is 15ms Lua / 10ms C on 1GHz Cortex A7.
2020-09-22 23:26:05 +02:00
ezdiy
d59a3e217e
Pocketbook: Implement HW screen rotation, bring in PB specific kludges from linuxfb (#6684)
* Uses bunch of new plumbing in base to configure screen rotations in hardware (koreader normally does this via blit buffer rotations, except for android).

* Some PB specific kludges that used to pollute core/framebuffer_linux are brought into PBs frontend driver.
2020-09-22 22:04:37 +02:00
yparitcher
34b3d5541d Gestures/Profiles: make sure dispatcher is initalized
even when the menu is not opened. this was causing a crash when the event name was parsed from creoptions
2020-09-22 07:21:37 +02:00
yparitcher
c6ce316d4e Dispatcher: crengine contrast (gamma) 2020-09-22 07:21:37 +02:00
NiLuJe
dcb8215a3f
Fix point release and revision detection in Version:getShortVersion (#6693) 2020-09-21 21:40:48 +02:00
Frans de Jonge
a5089f0272
[i18n] Add missing bookmark count translation (#6692)
Cf. <https://www.mobileread.com/forums/showpost.php?p=4037153&postcount=8>.
2020-09-21 20:52:40 +02:00
yparitcher
3e063498fc
FrontLight: fix footer update on FL on/off toggle (#6664)
move state change event to higher level function so it will be called after powerd.is_fl_on is updated.

makes _setIntensity redundant so get rid of it

obsoletes #6667
2020-09-20 21:48:06 -04:00
Frans de Jonge
9e96fdfb5f
[fix] Czech is now cs, not cs_CZ (#6689)
Cf. <https://www.mobileread.com/forums/showthread.php?p=4036709#post4036709>.
2020-09-20 20:43:13 +02:00
Martín Fernández
27fe0d7957
add eudic from gplay (#6682) 2020-09-19 20:25:51 +02:00
NiLuJe
23efabb913
[PB] Fix WAIT_FOR_UPDATE_COMPLETE ioctl (#6669)
* Fix WAIT_FOR_COMPLETE ioctl (fix #6000)

* Prevent a promotion to a flashing on fg/bg toggle

* Bump base for the matching PB updates

(https://github.com/koreader/koreader-base/pull/1188)
2020-09-19 19:05:35 +02:00
poire-z
4d53ec76fe
bump crengine: ODT support, more typography languages (#6675)
Includes:
- Update German hyphenation patterns
- (Upstream) Adds ODT (ODF) format support
- TextLang, hyphenation: add Basque, Croatian, Esperanto,
  Estonian, Georgian, Latvian, Lithuanian, Macedonian,
  Occitan, Welsh; update Bulgarian, Irish, Portuguese,
  Slovak, Dutch, Norwegian, Spanish; update hyphen min
  for Czech, English, Greek; fix Romanian and Ukrainian
  pattern file names
- HyphMan: adds HyphMethod::getLeft/RightHyphenMin()
- epub.css: update HR default style
- fb2.css: keep <date> in main text left-aligned
- getRenderedWidths(): inline-block and table fixes
- CSS: avoid style hash mismatch when serializing content:''
- Tables: re-order row groups when necessary
- XML parsing: don't drop trailing text
- HTML parser: tweak implicit head/body insertion code
- Fix text search failure when blank at start or end

readertypography.lua: some cleanup by removing the first
table listing hyph dicts, and including their filenames
in the second table so we can build the first table
dynamically. Also fetch hyph left/right min limits from
crengine to not have to duplicate them here and keep them
in sync.
css_tweaks.lua: for in-page footnotes, switched from
"-cr-only-if: epub-document" to ": -fb2-document"
("not" FB2 documents), so these tweaks also work with
DocX and ODT footnotes.

Also included in base bump:
- KOPTContext: add comic panel detection function/additional
  leptonica declarations
- Forcibly disable docs when building giflib
2020-09-18 19:34:46 +02:00
poire-z
b4214d3f16 Footnote popups: allow setting an absolute font size
In the "Set footnote popup font size", allow toggling
between setting a relative (to the document) font size
and setting an absolute font size (that won't change
with the document font size).
2020-09-18 18:09:54 +02:00
poire-z
fca426c17c Footnote popups: CSS: add more styles for FB2 elements
Add styles for some more non-HTML FB2 tags, so MuPDF
can render them as expected.
2020-09-18 18:09:54 +02:00
poire-z
62d0cf5dfa Wikpedia EPUBs: fix failure saving some files
Since 8815cbe0 and getSafeFilename() taking additional
parameters, and :gsub() returning multiple values,
filesystem type wasn't really checked and replacements
were not ensured, so saving articles like "Portal:Stuff"
failed on VFAT devices as ':' wasn't replaced.
2020-09-18 18:09:54 +02:00
NiLuJe
f1918cdfbb
[Kobo] Don't send a flood a FrontlightStateChanged events during the FL ramps (#6667)
* Only send a single FrontlightStateChanged event on toggle

Prevents the ReaderFooter refresh from going wonky
2020-09-17 19:49:03 +02:00
zwim
73b0c701ce
correct bug introduced with #6641 (#6665) 2020-09-17 13:16:19 +02:00
ezdiy
152ee087a8
Pocketbook: Fix frontlight handling. (#6663)
Account for InkView 5.x having different API for on/off states.
2020-09-17 11:36:58 +02:00
NiLuJe
99045b4311
Minor util & ffi/util cleanups (#6657) 2020-09-15 20:39:32 +02:00
NiLuJe
078b579081
More verbose debug logging around OPDS caching (#6653)
Re #6649
2020-09-13 22:14:05 +02:00
NiLuJe
592e4f42df
Hilariously simpler fix for #6616 (#6650)
* Hilariously simpler fix for #6616

Reverts #6648 for a much, much simpler solution, that will actually
cover every possible situation automagically.
2020-09-13 19:00:03 +02:00
NiLuJe
e0546d0fc8
Prevent automatic footer refreshes from drawing the footer on top of stuff that isn't ReaderUI (#6648)
* Prevent refreshing the footer automatically where it doesn't make sense to.

Issue exposed by #6540
Fix #6616
2020-09-12 22:57:53 +02:00
Martín Fernández
2263931b99
Pocketbook misc fixes (#6633)
After the awesome work made by @ezdiy:

- Remove empty dir from release zip
- Remove misc files (txt, md, html, gif) to prevent displaying them in PB library
- Do not asociate executable files (sh and py for the moment), just openable files
- Rename the font sample from html to template (to prevent wiping it during clean)
2020-09-12 10:47:35 +02:00
NiLuJe
c28f1b3450
Only ask to start an USBMS session when plugged into a USB host on Kobo (#6645)
* Only ask to start an USBMS session when plugged into a USB host on Kobo

Also, fix a typo that broke plugout detection on cervantes

* Bump base (necessary input/KoboUSBMS changes)

https://github.com/koreader/koreader-base/pull/1183
2020-09-11 23:23:57 +02:00
Martín Fernández
ffa9857ff1
ftp: guard against nil file (#6640)
Fixes #6636
2020-09-09 17:59:57 +02:00
Martín Fernández
8f61bc750b
AndroidPowerD: remove unneded syntactic sugar & JNI calls (#6641)
Each JNI call has a little overhead, so don't use them when it is not needed.
The syntactic sugar is not needed to use android module's functions.
2020-09-09 17:58:44 +02:00
smartscripts-nl
16ece06d45
[UX] Add bookmark count as footer item (#6629)
Optionally display number of bookmarks in footer. If no bookmarks defined, don't show this item
2020-09-05 14:54:53 +02:00
smartscripts-nl
4e281f00ed
Dispatcher: adds Show terminal (#6626) 2020-09-03 01:14:06 +02:00
ezdiy
a110fe8686
Pocketbook: Add reboot option. (#6625)
Turns out there's an IPC command for it.
2020-09-02 23:35:59 +02:00
ezdiy
63e938f508
Pocketbook: Add file associations into "Open with" menu (#6624)
We used to put koreader alone in there, but apparently other
handlers can be left in as optional - see #6415
2020-09-02 22:44:38 +02:00
smartscripts-nl
20ddad2951
Terminal: add shortcuts for re-useable commands (#6609)
To be able to quickly repeat often used terminal commands
2020-09-02 16:09:27 +02:00
poire-z
f15aa7103f
Allow following links and footnotes with keys (#6619)
Only with CreDocuments (as no way currently to highlight links
in PDFs).
Tab or Shift-Tab to select next or previous links.
Press to follow (or show footnote in popup, and in there Press
to follow), back to go back.
2020-09-01 23:29:56 +02:00
ezdiy
4857e97e30
Pocketbook: Launcher OS integration (#6620)
* Bring in restart koreader & shutdown device exit options
* Existing instance reused for opens via native book explorer
2020-09-01 21:43:21 +02:00
ezdiy
c9a339ead0
Pocketbook: File handling OS integration (#6617)
* Show opened file in task manager
* Remember file to open on power-off
* Perform file associations
2020-09-01 17:52:16 +02:00
ezdiy
426f7b5ddc
Add API to set OS level file associations (#6615) 2020-09-01 16:39:47 +02:00
poire-z
000fb45ed9 bump crengine: TextLang, hyphenation: add Serbian 2020-09-01 15:13:01 +02:00
Strana (eng: Page)
d26ab968c9
Added Serbian typography rules (#6596)
(required crengine bump in next commit)
2020-09-01 14:37:15 +02:00
ezdiy
724d3aa5ff
PocketBook: Auto-standby plugin (#6602)
Adaptively pins the auto-standby UI lock. When frequent input
from user is observed, we'll prevent for increasingly longer
periods of time, and revert back to more aggressive standby
with infrequent input (infrequent taps when reading a book).
2020-09-01 00:23:09 +02:00
poire-z
962fd02c98
Tame BackgroundRunner: stop running when no more job (#6605)
A BackgroundRunner plugin instance will stop running
(rescheduling a check every 2 seconds) when there is no
(or no more) job to run.
Clients of this service now have to emit an event after
adding a job into PluginShare.backgroundJobs, so an
already loaded but stopped BackgroundRunner can notice
it and start running again.
2020-08-31 16:48:29 +02:00
smartscripts-nl
0e7f1ba317
Dispatcher: adds Texteditor: open last file (#6600) 2020-08-31 11:47:37 +02:00
ezdiy
6d3d45a93b
Pocketbook frontend: Fix up missing require. (#6604)
This one slipped through tests somehow.
2020-08-30 18:36:41 +02:00
ezdiy
3c0e14703d
Poll mode pocketbook frontend. (#6559)
Out of the box, it behaves exactly as native pocketbook apps should, ie aggressive
standby, but no freezing at operations in progress.

Config UI will be done via koplugin that will also do adaptive standby. This is
because the API is now device independent (albeit PB is the only implemented user).
2020-08-30 17:27:37 +02:00
ezdiy
fd31bcc5fd
Make UIManager track prevent/allowStandby state. (#6558)
Conversely, Trapper and plugins report standby interruptibility.
2020-08-30 15:01:56 +02:00
Galunid
0d501f2308
[chore] Fix a few typos (#6601) 2020-08-30 05:27:17 +02:00
tjader
54b299b639
Fix typo (#6570) 2020-08-29 20:38:12 +02:00
poire-z
85a16d0064 Open with: add Text Editor plugin 2020-08-29 20:07:26 +02:00
poire-z
cfa45f8d88 History: show last read date instead of file size
In classic and list display modes.
2020-08-29 20:07:26 +02:00
poire-z
bafc52afd1 util: adds util.secondsToHour(), util.secondsToDate() 2020-08-29 20:07:26 +02:00
poire-z
5c1ccda314 FileChooser: allow traversing unreadable directories 2020-08-29 20:07:26 +02:00
zwim
2c1d87a956 resolve ANR on hold and native light dialog 2020-08-29 20:06:09 +02:00
zwim
6fb2a0469b
update statusline after native light dialog (#6584) 2020-08-29 16:46:59 +02:00
zwim
24af0810d2
turn on frontlight switch on Tolino. (#6586) 2020-08-29 16:42:57 +02:00
NiLuJe
e402c9d6f3
More KoboUSBMS related tweaks & cleanups (#6590)
* Be even more defensive around KoboUSBMS handling in the startup script

And add some more logging. To the log before a session, to the syslog
after, because we can't be sure onboard is viable.

* Display a short version string straight in the Version label

* Move system statistics inside the Help menu

* Move Version inside Help


* Bump base

https://github.com/koreader/koreader-base/pull/1173
2020-08-29 05:20:28 +02:00
zwim
06bce655c5
[chore] Remove frontlightDialog leftover (#6578) 2020-08-28 13:14:20 +02:00
Martín Fernández
c7f77de72a
refactor thirdparty app integration (#6513)
* refactor thirdparty app integration
* Fix fora package name
2020-08-27 21:41:16 +02:00
Martín Fdez
454ed0ebeb enable usage of system fonts 2020-08-27 21:40:18 +02:00
NiLuJe
1919764825
Some more KoboUSBMS tweaks (#6566)
* Enable i18n in KoboUSBMS

* Rejig the "No confirmation" USBMS setting:

In now *only* affects the USB plug in event.
The menu entry will never show the popup (clicking on it should already
be confirmation enough, that, yes, we really would like to do that,
please ;)).

Also, enable said plug in behavior on Cervantes, too ;).

* Add an option to disable USBMS entirely

* Bump base

https://github.com/koreader/koreader-base/pull/1170
2020-08-27 01:06:41 +02:00
poire-z
29d83b67d3 Text/HTML widgets: allow scrolling with the scrollbar
By tapping on or panning the scrollbar.
2020-08-26 23:43:10 +02:00
poire-z
69d11ebfd9 Start with: add Favorites 2020-08-26 23:43:10 +02:00
poire-z
27e953b127 Bookmarks: avoid possible crash
(Not sure how and with what this check works and if
we still get such kind of items, but avoid a crash
when item2.pos0 exists but item1.pos0 does not.)
2020-08-26 23:43:10 +02:00
Martín Fernández
189397e38c
android: fix frontlight dialog gesture (#6568) 2020-08-26 09:13:19 +02:00
Rodrigo Exterckötter Tjäder
9d4c85d6c1
Fix typo in font test sample (#6571) 2020-08-26 08:18:28 +02:00
yparitcher
4639b03c29
Dispatcher: incremental gesture fix (#6565)
have a user set number override a gesture (gestures will still work when set to 0), this allows incremental FL changes with a tap gesture
2020-08-25 21:07:17 +02:00
NiLuJe
af3d98aeb7
Always update the table of footer text generators (#6563)
It's only needed by all_at_once, but we were skipping it if nothing or
only a single mode was enabled.
It lead to desync w/ the settings, or a crash.

Fix #6561
2020-08-25 16:47:32 +02:00
poire-z
8d99523388
bump crengine: new HTML parser, libRu and FB2 tweaks (#6560)
Includes:
- Revert "FB2: don't draw cover in scroll mode"
- (Upstream) FB2: fix coverpage drawing in scroll mode
- FB2 footnotes: only merge run-in when next is erm_final
- fb2.css: use OTF tabular-nums for footnote numbers
- Text: ignore ascii and unicode control chars
- Fix HR positionning when floats involved
- writeNodeEx(): minor tweaks
- OnTagClose(): add self_closing_tag parameter
- HTML format detection: accept HTML5 doctype
- HTML parser: rework Lib.ru specific handling
- HTML parser: new more conforming implementation
- HTML parser: ensure foster parenting inside tables

Also includes:
- SDL: don't bypass X11 WM compositor
2020-08-25 15:45:05 +02:00
zwim
66e8087c66
[android]: fix backlight toggle (#6520)
* check on startup if frontlight can be changed.
* Init fl_min if necessary not to use intensity==0
2020-08-25 14:42:39 +02:00
NiLuJe
6e3a3e8069
[Kobo] Support USBMS exports (#6552)
* \o/

* Make sure the (debug) event log doesn't end up in the fd table of our child processes...
Otherwise, it breaks USBMS.

* Close suspicious fds in the Wi-Fi scripts
To prevent any and all issues w/ USBMS down the road...

* Minor USBMS UI tweaks

* Always ask for confirmation to start on USBMS session on plug

* Bump base

https://github.com/koreader/koreader-base/pull/1161
https://github.com/koreader/koreader-base/pull/1162
https://github.com/koreader/koreader-base/pull/1163
https://github.com/koreader/koreader-base/pull/1165
https://github.com/koreader/koreader-base/pull/1167
2020-08-25 02:00:59 +02:00
NiLuJe
9abd92044a
Make sure "Clear history of deleted files" actually persists. (#6557)
* Make sure "Clear history of deleted files" actually persists.

The current code was only clearing the live table, it was forgotten after a restart.
2020-08-25 01:47:04 +02:00
Martín Fdez
09e5143d2f pocketbook: fix for devices without natural light :p 2020-08-23 14:30:14 +02:00
roshavagarga
61e9d0b40a
Specify that PocketBook 515 has no frontlight (#6549)
It doesn't have one, and having it in there might lead to issues.
2020-08-23 11:15:49 +02:00
NiLuJe
0e27963ae7
Minor flash tweaks after #6528 (#6540)
* Boundaries are now detected both when paging forward and backward.

Fixes potential false-negatives in the chapter boundary heuristic code, as mentioned in https://github.com/koreader/koreader/pull/6528#issuecomment-678610188 ;).

* Tweaked ReaderFooter to not repaint ReaderUI when it's unnecessary. (toggling/cycling it on a page with significant image content would flash the full screen).

* Only flash the first time a page w/ significant image content is shown. (Menus, among other things, could otherwise re-trip the flash).
2020-08-23 03:46:05 +02:00
NiLuJe
b5d3305876
A few e-Ink flash rate QoL tweaks (#6528)
* Add an option to *always* flash on chapter boundaries

* Optionally, in flash on chapter boundaries mode, also flash on the *second* page of a chapter.

(There's often a large river at the top of the page on a chapter's first page)

* In CRe, request a flashing update when there is significant image content on the page.

* Register all refresh rate related options in Dispatcher, making them available in Gestures & Profiles.
2020-08-21 14:33:08 +02:00
NiLuJe
1b904f0f0d
Revamp manual rotation events (#6530)
Restore a Swap event like before #6309
Implement an Invert one
And keep the fairly useless +90° CW one, but under an accurate name.

Fix #6524
2020-08-20 13:38:48 +02:00
roshavagarga
87fac74ea2
Fixes and changes to PocketBook definitions (#6533)
**Changes:**
- [x] Added new CIS-unique device definition for PocketBook 606 - [News article](https://pocketbook.ru/news/novyy-pocketbook-606/)
- [x] Added new CIS-unique codename for PocketBook Aqua (640) - [Russian manual](http://support.pocketbook-int.com/fw/640/ru/4.4.1853/manual/User_Guide_PocketBook_640_RU.pdf) (last page)
- [x] Added new CIS-unique codename for PocketBook Ultra (650) - [Russian manual](http://support.pocketbook-int.com/fw/650/ru/5.14.789/manual/User_Guide_PocketBook_650_RU.pdf) (last page)
2020-08-20 10:09:54 +02:00
yparitcher
b9311a1772
FM: rotation flush setting before reinit (#6532)
when rotation was caused by a gesture the gesture settings were not flushed leading to weird state when the FM reinit reloaded the gestures plugin

discovered in #6530 caused by #6309
2020-08-20 05:31:57 +02:00
Martín Fernández
b9ffb2e0d0
pocketbook: warmth lights support (#6531)
* also enables natural light controls for the emulator
2020-08-19 22:41:10 +02:00
Teteros
01ed79fb92
Update PB633 device definition (#6529) 2020-08-19 16:24:39 +02:00
roshavagarga
a9aa63d94c
Update PocketBook device definitions (#6525) 2020-08-19 14:49:17 +02:00
poire-z
c8b8ee3ba9
bump crengine: better linebreaks at em-dash, fb2 fixes (#6521)
Includes:
- (Upstream) LVBase64NodeStream: fix possible segfault
- (Upstream) Fix getting encoding from HTML META tags
- FB2: also look for cover in <src-title-info>
- FB2: fix cover image colors
- FB2: don't draw cover in scroll mode
- TextLang: better linebreaks at em-dash (EN/ES/FR)
- TextLang: increase _lb_props static array size

FB2 footnotes style tweaks: avoid gap above first footnote,
caused by the title bottom margin collapsing into it.
2020-08-18 13:34:28 +02:00
yparitcher
d53dc3f890
Dispatcher: fix events with static argument (#6519)
Fixes showing Favorites from a gesture.
2020-08-18 12:41:58 +02:00
yparitcher
986f45871a
Dispatcher: show selected number (#6472)
followup to #6441
2020-08-17 09:55:03 +02:00
themanifold
23ebe39031
Support for Apache WebDAV module (#6510)
This change to the parser in `cloudstorage.lua` adds support for the [Apache WebDAV module][1]

It was manually tested using the [bytemark/webdav][2] docker container.

I developed this in Windows, with a docker container that hosted an extracted AppImage and a VNC server that I viewed using a VNC client.

I will write up my work flow at a later point.

Changes have not been tested against other webdav servers (what was this originally tested against?). Please could someone test against other webdav servers?

I also noticed a logic inversion error where we were looking for a slash at the end of the URL and if it exists, then we explicitly set `has_trailing_slash=false` - so I fixed it to set to `true`. I had to do this so that we weren't visiting the URL without a trailing slash - apache sends back a 301 redirect with a `location` header with a trailing slash, if you don't put a trailing slash.

As a side note, I think we should consider replacing this regexp pattern matching parser with the [XML parser in the newsreader plugin[3]

[1]: https://httpd.apache.org/docs/2.4/mod/mod_dav.html
[2]: https://github.com/BytemarkHosting/docker-webdav
[3]: https://github.com/koreader/koreader/blob/master/plugins/newsdownloader.koplugin/lib/xml.lua
2020-08-17 09:54:16 +02:00
zwim
b3f64dc73b
gesture: messages and sensitivity changes for small (warmth) scales; devicelistener dedup (#6468)
* deduplicate code on warmth/brightness swipes

if device has a small scale (e.g. warmth is going from 0..10)
* adjust warmth message
* use a smaller gesture sensitivity
2020-08-17 09:42:34 +02:00
yparitcher
5a7ecabaed
ReaderRolling: fix gotoPercent (#6503)
Before it only worked in scroll mode not page mode & it used 10000 instead of 100%
2020-08-15 21:42:27 +02:00
Martín Fernández
d935ca6937
sdl: keep track of window position and size (#6495) 2020-08-13 13:20:49 +02:00
roshavagarga
ec87d36e57
PocketBook: Add new device definitions (#6481) 2020-08-07 23:02:30 +02:00
Martín Fdez
9037a1f4f2 bump luajit-launcher and remove frontlightwidget leftovers 2020-08-06 17:19:12 +02:00
Galunid
627716db9c
Allow setting text selection rate (#6449) 2020-08-06 00:13:26 +02:00
Martín Fdez
bdbebb9e08 standalone osx application bundle 2020-08-05 13:04:06 +02:00
yparitcher
7583571707
Dispatcher Gestures Profiles: only flush settings when changed (#6471) 2020-08-05 00:19:28 +02:00
Frans de Jonge
49a5aa179b
[fix] Allow closing SortWidget (#6464)
For now, close on any keypress.

Cf. https://github.com/koreader/koreader/issues/6463
2020-08-03 15:56:44 +02:00
yparitcher
79c5e088af Dispatcher: get name from item & add separators to menu & fixes 2020-08-02 16:55:09 -04:00
yparitcher
2a99b014a2 initial refactor of ReaderGesture into Gestures plugin 2020-08-02 16:55:09 -04:00
zwim
a6763465b4
[Android]: Native light dialog (#6426)
* Adds support for Tolino Epos 2 warmth light
2020-08-02 22:27:49 +02:00
Frans de Jonge
0511cb1d48
[chore] Allow translating "Font Size" in Dispatcher (#6462)
See https://github.com/koreader/koreader/pull/6428#issuecomment-667687997
2020-08-02 20:31:21 +02:00
poire-z
517c31e3e1
bump crengine: reworked hanging punctuation (#6456)
* bump crengine: reworked hanging punctuation

* move setting management from ReaderTypeset to ReaderTypography

And fix initial handling of defaults being loaded as true/false
but needing to be saved as 1/0.

* fix luacheck
2020-07-30 22:58:00 +02:00
Frans de Jonge
991dcab27b
Update tesseract data files URL (#6452)
Reported by @lescheck on Weblate.
2020-07-30 22:15:02 +02:00
poire-z
cd0d248dc5 fix luacheck 2020-07-30 21:37:58 +02:00
poire-z
5662712549 move setting management from ReaderTypeset to ReaderTypography
And fix initial handling of defaults being loaded as true/false
but needing to be saved as 1/0.
2020-07-30 21:29:45 +02:00
Galunid
a9d0990f84
Add Set Frontlight/Set Frontlight Warmth to dispatcher (#6440)
Add Set Frontlight/Set Frontlight warmth events to dispatcher. This allows users to set day/night profiles with different fl/warmth values as requested in #6444
2020-07-29 23:48:28 +02:00
Gauthier
f91a855dd7
add more media types to OPDS browser (#6450)
following #6443 i thought i would check the other types

application/x-mobi8-ebook is replaced by application/vnd.amazon.mobi8-ebook (see https://www.iana.org/assignments/media-types/application/vnd.amazon.mobi8-ebook)
application/djvu doesn't seem to be an official one. image/x-djvu was the previous one, and is replaced by image/vnd.djvu (https://www.iana.org/assignments/media-types/image/vnd.djvu)
2020-07-29 07:49:04 +02:00
NiLuJe
2ad976387d
More #6424 cleanups (#6442)
* Simplify logic, and more detailed debug logging
* Kill Nickel's FIFO on startup
Avoids udev/udhcpc scripts hanging when trying to open() it.
2020-07-29 03:27:04 +02:00
Gauthier
072d960b68
Add additional media types to OPDS Browser (#6443)
* Add additional media types to OPDS Browser

The media types for CBZ and CBR (added in #5940) are deprecated, and replaced by `vnd.comicbook+zip` and `vnd.comicbook+rar`. In addition, many OPDS servers will use the actual media type of the file, ie `application/zip` and `application/x-rar-compressed`.

See here about the new `vnd` types:
- https://www.iana.org/assignments/media-types/application/vnd.comicbook+zip
- https://www.iana.org/assignments/media-types/application/vnd.comicbook-rar

* added vnd.rar also
2020-07-28 17:24:31 +02:00
NiLuJe
744e933036
Minor cleanups after #6424 (#6438)
* Minor cosmetic code cleanup
* String tweak
2020-07-28 03:53:20 +02:00
yparitcher
87b1f0c1f2
simplify Dispatcher (#6435)
there is no need to pass the caller rather just the table where the setting is located. passing the setting alone is not enough as sometimes it is nil and then you do not get a reference to its location
2020-07-27 21:26:56 -04:00
yparitcher
93eadbaf88
recalculate footer progress bar correctly on UpdatePos (#6436)
Closes: #6434
2020-07-26 22:38:09 -04:00
NiLuJe
37a01100b7
Various Wi-Fi QoL improvements (#6424)
* Revamped most actions that require an internet connection to a new/fixed backend that allows forwarding the initial action and running it automatically once connected. (i.e., it'll allow you to set "Action when Wi-Fi is off" to "turn_on", and whatch stuff connect and do what you wanted automatically without having to re-click anywhere instead of showing you a Wi-Fi prompt and then not doing anything without any other feedback).
* Speaking of, fixed the "turn_on" beforeWifi action to, well, actually work. It's no longer marked as experimental.
* Consistently use "Wi-Fi" everywhere.
* On Kobo/Cervantes/Sony, implemented a "Kill Wi-Fi connection when inactive" system that will automatically disconnect from Wi-Fi after sustained *network* inactivity (i.e., you can keep reading, it'll eventually turn off on its own). This should be smart and flexible enough not to murder Wi-Fi while you need it, while still not keeping it uselessly on and murdering your battery.
(i.e., enable that + turn Wi-Fi on when off and enjoy never having to bother about Wi-Fi ever again).
* Made sending `NetworkConnected` / `NetworkDisconnected` events consistent (they were only being sent... sometimes, which made relying on 'em somewhat problematic).
* restoreWifiAsync is now only run when really needed (i.e., we no longer stomp on an existing working connection just for the hell of it).
* We no longer attempt to kill a bogus non-existent Wi-Fi connection when going to suspend, we only do it when it's actually needed.
* Every method of enabling Wi-Fi will now properly tear down Wi-Fi on failure, instead of leaving it in an undefined state.
* Fixed an issue in the fancy crash screen on Kobo/reMarkable that could sometime lead to the log excerpt being missing.
* Worked-around a number of sneaky issues related to low-level Wi-Fi/DHCP/DNS handling on Kobo (see the lengthy comments [below](https://github.com/koreader/koreader/pull/6424#issuecomment-663881059) for details). Fix #6421 
Incidentally, this should also fix the inconsistencies experienced re: Wi-Fi behavior in Nickel when toggling between KOReader and Nickel (use NM/KFMon, and run a current FW for best results).
* For developers, this involves various cleanups around NetworkMgr and NetworkListener. Documentation is in-line, above the concerned functions.
2020-07-27 03:39:06 +02:00
poire-z
1c49f817fd
Fix ConfigDialog's ButtonProgress Fine tune updating presets (#6433)
Witnessed with "L/R Margins": tapping on a button
sets the value to the preset table, by reference.
Tapping the -/+ fine tuning buttons was updating
these tables in-place, in effect modifying the presets.
2020-07-25 23:15:31 +02:00
yparitcher
2f3fda3fe8
allow some strings to be translated (#6428) 2020-07-25 15:26:26 +02:00
NiLuJe
db843929f0
Don't store document-specific rotation when sticky rotation is enabled (#6423)
It doesn't do so for the FM, so the inconsistency is confusing.
Plus, if you're actively using sticky rotation, saved rotations are
ignored anyway.

Re #6420
2020-07-24 11:26:49 +02:00
Frans de Jonge
7c1a716d57
Fake battery status in readerfooter_spec to succeed on devices with batteries (#6417)
Cf. <https://github.com/koreader/koreader/pull/6370#issuecomment-662382487>.
2020-07-24 00:06:23 +02:00
NiLuJe
b4d5cfccb7
Fix a few logic holes in dithering mode selection (#6419)
* Allow switching to SW dithering on a HW-capable device without that being lost on boot (and, worse, left in an undithered state).
* Make sure the automagic toggles between HW/SW in the Dev menu are properly saved.
2020-07-23 06:01:46 +02:00
Martín Fernández
ca21d1401a SDL: use platform as model for desktop computers, report battery if available 2020-07-22 14:41:11 +02:00
Martín Fernández
94c0d7854f remove filechooser 2020-07-22 14:41:11 +02:00
poire-z
6e7c7bb841
Text selection: cleanup text obtained from engines (#6410) 2020-07-22 00:14:57 +02:00
Frans de Jonge
da507f8607
[chore] Update MD5 calls with new sha2 library (#6411)
Depends on <https://github.com/koreader/koreader-base/pull/1149>.
2020-07-21 23:25:46 +02:00
Martín Fdez
fca7f9e7d5 desktop/emulator 2020-07-21 00:23:05 +02:00