Commit Graph

7868 Commits (4345201e0ea70ee8e3adf6c03e906ecf28e1bf75)
 

Author SHA1 Message Date
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.
4 years ago
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>.
4 years ago
zwim f24d6f8aea
Update statusline immediately when toggling a bookmark (#6872) 4 years ago
Martín Fernández 1468646aa5
Android bundle update (#6870)
- adaptative icons
- minify + shrink
- remove unused assets to save a few KBs
- install apk by clicking on notification after download (doesn't apply to F-Droid)
4 years ago
zwim bab55bfa0d
Typo in Text (#6871) 4 years ago
jperon c5ba8a8301
Order keys in settings.reader.lua (#6868)
* Order keys in settings.reader.lua
* Comma at the end of last item in table.
4 years ago
NiLuJe 48a38504f7
Bump base (#6867)
(https://github.com/koreader/koreader-base/pull/1229)
4 years ago
zwim 926e7dd402
coverimage plugin (#6813)
* Plugin for saving the cover image to file. Useful in some e-ink android devices.
4 years ago
Galunid 25cfef3f6d
Fix wording in previous commit (#6862) 4 years ago
Galunid 8a5c2e3af6
Add menu item allowing users to disable "hold on footer to show Skim Widget" (#6852) 4 years ago
Frans de Jonge 090f33b5b8
[fix] Minor doc touchups re. QR encode (#6861)
Cf. <https://github.com/koreader/koreader/pull/6844#issuecomment-723672448>.
4 years ago
yparitcher edec69ac8b
[CRe] Tweak nightmode and CRe call cache interaction (#6859)
Simplify 4caf8f28 (#6854), allowing us not to track
nightmode in two places.
4 years ago
yparitcher 7fb20f2c55
Dispatcher: add Screenshot action (#6858) 4 years ago
jperon 7bd5933066
Methods to modify highlight menu. (#6851)
* Allow plugins to hook into highlight menu
4 years ago
tastytea 9277568a65
Apply CSS tweaks for links to all elements below a elements. (#6856)
This is for ebooks that have <span> inside of <a>.
4 years ago
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
4 years ago
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
4 years ago
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.
4 years ago
jperon dee72a431c
Set extra_plugin_paths to data_dir/plugins (#6849) 4 years ago
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
4 years ago
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.
4 years ago
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.
4 years ago
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).
4 years ago
poire-z 8f2bdf959d Style tweaks: fix some wording 4 years ago
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
4 years ago
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).
4 years ago
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
4 years ago
ezdiy ac3c97af49
Pocketbook: Use a single launcher (#6814)
* Pocketbook: Use a single launcher and make the system one a "symlink"
4 years ago
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).
4 years ago
NiLuJe 982702fdc1
Statistics: Don't blow up when annotating/highlighting stuff with the plugin loaded, but disabled (#6829)
Re #6825
Re #6827
4 years ago
Martín Fernández 40b4ccffa8
KoptInterface:getWordFromBoxes: guard against nil boxes (#6827)
Fixes #6825
4 years ago
ezdiy 144fd78986
fontlist: Skip fonts with missing family_name (#6820)
* Also don't trip on pipes
4 years ago
NiLuJe 1db07d1889
Bump base (#6816)
(https://github.com/koreader/koreader-base/pull/1225)
4 years ago
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
4 years ago
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.
4 years ago
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.
4 years ago
NiLuJe dda905271d
[Kobo, Mk. 7] Enable the power LED when charging (#6810) 4 years ago
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.
4 years ago
yparitcher 602e0b3feb ldoc fixes 4 years ago
yparitcher 433b82f162 Dispatcher: allow registering actions at runtime 4 years ago
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
4 years ago
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
4 years ago
NiLuJe 0406be3319
Random nano optimizations (#6801)
* Don't call Screen:afterPaint if nothing was actually painted

* Stupid micro-optimization (os.)time! (pun intended :D)
4 years ago
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.
4 years ago
poire-z b90f6db876 GestureDetector: add Tap interval setting, to avoid bounces
Also fix info_text not displayed, and add more
descriptive ones.
4 years ago
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
4 years ago
NiLuJe 11aeef7483
Don't shadow gettext (#6799)
(Fixes the "current book" stats page)
4 years ago
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.
4 years ago
ezdiy 5e231d759a
Bump base for sqlite. (#6796)
& make CI happy.
4 years ago
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
4 years ago