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

7807 Commits

Author SHA1 Message Date
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
Martín Fernández
7e70f7eafa
Create ota dir (#6857)
Partially reverts https://github.com/koreader/koreader/pull/6849

Needed for new installs, mainly in https://github.com/koreader/koreader/blob/master/frontend/ui/otamanager.lua#L173.
Fix https://github.com/koreader/koreader/pull/6849#issuecomment-723491945
2020-11-08 09:19:13 +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
Galunid
5ed240077e
OnyxEPDController (#6853)
Includes:

new QualcommOnyxEPDController for Onyx Boox Nova 2 (and possibly others)
refactoring and support for qualcomm epd modes
Includes new eink test, that should work on Qualcomm Onyx devices.
2020-11-06 17:47:59 +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
poire-z
1af4ed0154
bump crengine: upstream sync, some rendering fixes (#6837)
Includes:
- Update German hyphenation patterns
- (Upstream) Rename lChar16/lString16 to lChar32/lString32
- (Upstream) Ignore provided document w/h if negative
- (Upstream) Parse and skip '@charset' in CSS
- (Upstream) Fix possible segfault in ~ldomDocument()
- lvDefFatalErrorHandler(): add comment on how to get a real crash
- writeNodeEx: dont show ="" on empty attributes
- List item markers: draw even when they overflow
- Strut confining: avoid it too when only no break spaces
- Text: ensure LTEXT_FIT_GLYPHS around images/inline boxes
- Font: fix synthetized italic metrics
- Font: fix synthetized bold italic drawing
- In-page footnotes: always push vertical margin before
2020-10-28 16:01:26 +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
ezdiy
ac3c97af49
Pocketbook: Use a single launcher (#6814)
* Pocketbook: Use a single launcher and make the system one a "symlink"
2020-10-26 13:11:27 +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
NiLuJe
982702fdc1
Statistics: Don't blow up when annotating/highlighting stuff with the plugin loaded, but disabled (#6829)
Re #6825
Re #6827
2020-10-26 12:27:05 +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
NiLuJe
1db07d1889
Bump base (#6816)
(https://github.com/koreader/koreader-base/pull/1225)
2020-10-23 00:07:51 +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
NiLuJe
42b866cd7f
Statistics: Handle DB migration to 20201022 (#6812)
* Add a few IF (NOT) EXISTS guards to DB schema stuff

* Chunk DB migrations into each specific schema revision

And bump to 20201022 to pickup the changes from #6807

Always VACUUM at the end of a (set of) migration.
2020-10-22 20:15:35 +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
poire-z
b40331085a
Statistics: speed up Calendar view (#6807)
Just by tweaking the SQL queries, and adding an index
on page_stat_data(start_time).
Also, in the hourly histogram, show at least a 1px bar
when there was any reading this hour.
2020-10-21 18:49:08 +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
9fc87e3b85
Address some DB migration concerns (#6804)
* Don't overwrite an existing DB backup during DB migrations

* Try to be gentler with wonky DBs during migration
2020-10-20 01:14:24 +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
NiLuJe
d9b658034d
Ensure the SD card is actually detected in Nickel on exit. (#6800)
* Ensure the SD card is actually detected in Nickel on exit.

Regression since #6522
2020-10-18 16:46:06 +02:00
NiLuJe
11aeef7483
Don't shadow gettext (#6799)
(Fixes the "current book" stats page)
2020-10-17 23:22:23 +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
ezdiy
5e231d759a
Bump base for sqlite. (#6796)
& make CI happy.
2020-10-16 02:34:59 +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
Martín Fdez
4fb59e2253 bump LuaJIT, fix android native orientation logic 2020-10-13 21:16:19 +02:00
NiLuJe
e15b7f7d4b
Bump base (#6783)
(https://github.com/koreader/koreader-base/pull/1213)
(https://github.com/koreader/koreader-base/pull/1214)
2020-10-12 20:56:58 +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
Frans de Jonge
c8e71a35bb
[i18n] Bump translations for 2020.10 release (#6776) 2020-10-09 19:24:38 +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
Frans de Jonge
624762a6bf
[chore] (#6764)
Add authentication to Docker image.

This will be required by November 1.

See <https://docs.docker.com/docker-hub/download-rate-limit/> and <https://discuss.circleci.com/t/authenticate-with-docker-to-avoid-impact-of-nov-1st-rate-limits/37567?mkt_tok=eyJpIjoiT1dVNE9EWmhNRFJtWTJObSIsInQiOiJOd1lnZHJidWpyU2ZqMG1JM21cL1Yxc1BsK1M1cWYwWnljeE43WlQ2K2tcL0ZKNnpXUElISjl6djlIM2FucTl4ekY3bjFBUVRxbXJ5XC93YTlZYlF2Z0pWeU1OM2FQR2RFNWFWOFBURk80RElsK3JabHZqT09qc3FYOE1aS0VUdFo4MiJ9> for more information.
2020-10-09 19:15:16 +02:00
ezdiy
b8fa553407
Actually set sorting hints in plugins (#6770) 2020-10-09 07:40:23 +02:00
Martín Fernández
0ed4680967
Remove PB hardware requests (#6767)
Because @ezdiy has one (or more?) and is doing a great work with it.

I also have one (Touch HD3) which I don't use and I don't plan to use, so it's available for any contributor that wants to tinker with the platform. Thanks to @Cellaris for providing the device 😄
2020-10-08 15:56:09 +02:00