2
0
mirror of https://github.com/koreader/koreader synced 2024-11-02 15:40:16 +00:00
Commit Graph

10033 Commits

Author SHA1 Message Date
NiLuJe
d3964bb4a0 "Fix" the ImageWidget test 2022-06-13 02:37:01 +02:00
NiLuJe
6ea292ef13 ImageWidget: Always return a bb, even on decoding failure.
(In which case we return a checkerboard pattern).

ScreenSaver: Make sure the choose image/folder/document settings
report what the code actually does on empty settings...
2022-06-13 02:37:01 +02:00
NiLuJe
a4f6693919 OPDSBrowser: Handle renderImageData failure in streamPages 2022-06-13 02:37:01 +02:00
NiLuJe
35c33d5308 RenderImage: Always pcall C/FFI stuff, and return nil on error 2022-06-13 02:37:01 +02:00
weijiuqiao
cafbf36bb2
Vocabulary builder: store word context, other tweaks and fixes (#9195)
Add a copy button and save word context (off by default), shown
via the three-dot menu of word entries.
Also some db refactoring and minor UI improvements:
- a dedicated book title table in order to shrink db size by storing
  references to title names instead of repeated actual strings,
- alignment of different forms of the "more" button and possible
 clipped words in translations.
- fix plugin name so it can be disabled
2022-06-12 21:34:17 +02:00
zwim
def02846ec
AutoDim: Don't update footer if not necessary (#9192) 2022-06-12 19:16:46 +02:00
Frans de Jonge
50b8b60400
[CI] Don't hide docs generation log (#9204)
With reference to https://github.com/koreader/koreader/pull/9193#issuecomment-1153128485
2022-06-12 13:37:07 +02:00
Martín Fernández
2213e6410f
[plugin] Exporter: fix crash on joplin when token is invalid (#9203)
https://github.com/koreader/koreader/issues/9197#issuecomment-1153129147
2022-06-12 13:12:26 +02:00
Wulf C. Krueger
0f238c3179
Auto frontlight plugin: Newer Oasis models are also supported (#9202)
On a Kindle Oasis 2 and 3 the plugin would be disabled due to not
checking for "KindleOasis2" and "KindleOasis3" respectively.
2022-06-12 12:19:14 +02:00
NiLuJe
2e681353d7 UIManager: Simplify setPMInputTimeout (from #9173)
This was originally designed for finer-grainbed control (specifically,
to correct by the amount of time spent in standby), but the final fix
only ever sets this to 0.

Simplify and rename (consumeInputEarlyAfterPM) to avoid useless computations.
2022-06-12 00:19:45 +02:00
NiLuJe
299c34a49c ScreenSaver: Ignore macOS resource forks when choosing a random image
Might help w/ https://www.mobileread.com/forums/showthread.php?t=343622
2022-06-12 00:19:45 +02:00
zwim
e8597c2e0c
Footer: update on network disconnect (#9185) 2022-06-11 22:03:51 +02:00
poire-z
cc185bae4e Embedded fonts toggle: disabled if no embedded font
Have the enabled/disabled state of the toggle show the
presence or not of embedded fonts in the current book.
Also show the names of the embedded fonts in the
help_text InfoMessage.
2022-06-11 20:58:52 +02:00
poire-z
b9724f1e93 Text highlighting: extend to include punctuations
When selected text seems to be a "sentence segment"
(that is, when there are punctuations around start
AND end), extend the selection to include the relevant
punctuation.
Do this only when saving highlights and for translation
(but not when dict or wikipedia lookups, or search).
2022-06-11 20:58:52 +02:00
poire-z
141fa98a32 bump crengine: text selection tweaks and helpers
Includes:
- lvtext: fix m_kerning_mode type
- XML: let 'gb2312' (Chinese) encoding be known
- Add ldomXPointer::getChar()
- LVDocView::getNodeByPoint(): tweak for text selection
- Fonts: allow fetching the list of embedded fonts
cre.cpp:
- getTextFromPositions(): use getNodeByPoint(forTextSelection=true)
  to allow panning in margins and get the nearest text instead
  of nothing.
- add extendXPointersToSentenceSegment() to allow extending some
  xpointer range to include punctuations at start or end (with
  for now a quite rudimentory implementation).
- add getEmbeddedFontList() to allow fetching the list of
  embedded fonts in the current EPUB book.
2022-06-11 20:58:52 +02:00
NiLuJe
dcb11c2542
Make luacheck >= 0.26 happy (#9174)
Re: https://github.com/koreader/koreader-base/pull/1487
2022-06-11 19:06:06 +02:00
Martín Fdez
d644b1a851 android: update doShareText signature 2022-06-10 22:47:18 +02:00
Martín Fdez
8ac8db69ad bump android-luajit-launcher 2022-06-10 22:47:18 +02:00
zwim
02abbfedf1
Clear screen before zsync OTA update starts (#9114) 2022-06-08 12:09:51 +02:00
zwim
5bcd3d0962
[plugin, Terminal] fix crash on clear screen (#9119)
This fixes https://github.com/koreader/koreader/issues/9108#issuecomment-1132243061

Tapping on clear screen during a running program like top, let's KOReader crash.
2022-06-07 21:06:40 +02:00
NiLuJe
73b2b38954
AutoSuspend: Make sure we send a LeaveStandby event ASAP (#9173)
Even in corner cases where we're woken up without user input (e.g., rtc alarm).

(Followup to #9124)
2022-06-07 00:22:22 +02:00
poire-z
c825d50c8f CRE: add "CJK width scaling" option
The setting is handled like all other bottom menu options
but, as it's really not useful and its target audience is
very limited, make it not shown in the bottom menu, but
available via another button in the (also quite not useful)
Word Expansion fine tuning widget.
2022-06-06 01:08:59 +02:00
poire-z
f29ee8475e Style tweaks: add "Tailor widths and text-indent for CJK"
Also add a timeout to the "Changed language for
typography rules" InfoMessages.
2022-06-06 01:08:59 +02:00
poire-z
ccd527ee48 bump crengine: improved typography for Chinese and Japanese
Includes:
- initTableRendMethods(): fix possible crash
- ldomXPointer::getRect(): skip inline pads
- Ruby: keep any last text wrapped in internal table elements
- Font: fix HarfBuzz localized glyphs with CJK punctuation
- lvtext: store kerning mode as a Formatter property
- CJK: improved typography by tweaking punctuations
- CJK: allow scaling CJK glyphs' widths
- CSS/lvrend: adds "-cr-hint: cjk-tailored"
- CJK: expand last line as previous justified line
- CJK: add 1/4 em of spacing between CJK and western words
2022-06-06 01:08:59 +02:00
zwim
d868da6977
[plugin, autosuspend] Clean up after #9055 (#9146) 2022-06-05 23:17:38 +02:00
Utsob Roy
6918d62bad
Pretty JSON export (#9165) 2022-06-05 16:52:05 +02:00
Utsob Roy
aa4cc6da56
Exporter: fix remote error (#9167) 2022-06-04 22:10:07 +02:00
weijiuqiao
18db85ea0d
[plugin] Vocabulary builder bugfix and quick word deletion (#9168)
This PR fixes the bug #9162 caused by unsafe db operation and adds an edit mode for quick deletion of words requested at #9132 (comment)
2022-06-04 14:54:58 +02:00
Utsob Roy
c71167fc6b
[plugin] Exporter: add info messages with status (#9166) 2022-06-04 09:37:26 +02:00
zwim
05d51997f1
SpinWidget, DoubleSpinWidget: add units to bottom menu (#9126)
* Units to bottom menu

* add ¹’¹ to 96dpi
2022-06-04 09:35:33 +02:00
Utsob Roy
71c7a8a042
[Android] Highlights share (#9153) 2022-06-03 19:56:10 +02:00
weijiuqiao
ee6197efff
[fix, plugin] Vocabulary builder: prevent resetting changes when reviewing backwards (#9161) 2022-06-03 09:52:39 +02:00
yparitcher
5b29f1b927
Page turn animations: add to dispatcher (#9160)
For real this time :)

See #9123

https://www.mobileread.com/forums/showthread.php?p=4226937#post4226937
2022-06-02 23:59:29 +02:00
zwim
f3df8923fa
Move autodim menu position (#9158) 2022-06-01 23:18:48 +02:00
zwim
84c7e33606
AutoDim: Allow to dim the frontlight on idle (#9028) 2022-06-01 16:22:42 +02:00
zwim
b26d3e9815
Autoturn: change to minutes and seconds (#9055)
fix #9051
and add some internal improvements (default values) to the datetimewidget.
2022-06-01 00:04:46 +02:00
Frans de Jonge
d30a9b52dc
[CI] Use Ubuntu 20.04 Docker image for CI tests (#9007)
They don't seem to crash.

Supersedes #7775.
2022-05-31 22:20:41 +02:00
weijiuqiao
e1b137339c
[feat, plugin] Vocabulary builder (#9132)
Made the old dictionary lookup history into a flashcard-ish vocabulary builder.
2022-05-31 22:11:35 +02:00
zwim
5a033f1221
DateTimeWidget: don't make ":" and "/" translatable (#9145)
* And the ellipsis
2022-05-29 22:32:16 +02:00
NiLuJe
e1ac3c4853
Minor Input:inhibitInput followup to #9065 (#9139)
* GestureDetector: Downgrade probeClockSource log messages to debug

We're seeing a bit more of 'em between autostandby and inhibitInput now,
and the whole thing was implemented long enough ago that it's no longer
critical to see this in random non-debug logs ;).

* Input: Reset gesture state in inhibitInput

Should prevent bogus gestures when re-enabling the handlers if we were
called in the middle of gesture detection.
2022-05-29 03:05:15 +02:00
Utsob Roy
6804b77251
Markdown export (#9076)
Enables users to export markdown locally with some configuration options to allow users to format the output to a certain extent.
2022-05-28 10:32:36 +02:00
NiLuJe
ae5b2d68ca
AutoSuspend: Don't send LeaveStandby events from a zombie plugin instance (#9124)
Long story short: the LeaveStandby event is sent via `tickAfterNext`, so if we tear down the plugin right after calling it (in this case, that means that the very input event that wakes the device up from suspend is one that kills ReaderUI or FileManager), what's in UIManager's task queue isn't the actual function, but the anonymous nextTick wrapper constructed by `tickAfterNext` (c.f., 
https://github.com/koreader/koreader/issues/9112#issuecomment-1133999385).

Tweak `UIManager:tickAfterNext` to return a reference to said wrapper, so that we can store it and unschedule that one, too, in `AutoSuspend:onCloseWidget`.

Fix #9112 (many thanks to [@boredhominid](https://github.com/boredhominid) for his help in finding a repro for this ;)).
Re: #8638, as the extra debugging facilities (i.e., ebb81b9845) added during testing might help pinpoint the root issue for that one, too.

Also includes a minor simplification to `UIManager:_checkTasks`, and various other task queue related codepaths (e.g., `WakeupMgr`) ;).
2022-05-25 23:36:41 +02:00
Utsob Roy
46f09b9e6c
exporter.koplugin: use safe filename
fix #9130: files missing in some devices.
2022-05-25 18:14:05 +02:00
zwim
081bc6784f
[plugin, statistics] simplify ReaderProgress for better translations (#9113) 2022-05-25 17:44:14 +02:00
hius07
e336983fd2
Cloudstorage WebDAV: more fix slash in server address (#9128)
Honor server addresses with or without trailing slash.
Regression since #9061. Closes #9125.
2022-05-25 17:02:46 +02:00
zwim
d5d5867d4e
DoubleSpinWidget, SpinWidget: add units, make usage more consistent (#9046) 2022-05-24 00:25:50 +02:00
zwim
13274d6212
datetimewidget: simpler usage, allows 2 to 6 numberpickers for date and time (#9070) 2022-05-23 20:32:59 +02:00
yparitcher
8f316b1e8c
Merge discardEvents & inhibitInput (#9065)
Rename `discardEvents` to `inhibitInputUntil`
only discard Input events
2022-05-23 13:52:52 +02:00
yparitcher
a97dbb05ed
Page turn animations: add to dispatcher (#9123)
xref: https://www.mobileread.com/forums/showthread.php?p=4224443&postcount=1119
2022-05-23 09:19:47 +02:00
Glen Sawyer
cb95dcd4c9
Fix reMarkable crash bug v2022.05: event overwrite with new time module (#9121)
The change from timeval to time completely broke reMarkable.
frontend/device/remarkable/device.lua was using TimeVal:now() to manually overwrite event time values, as noted in the code comments.
Input:handleTouchEv is expecting those event time values to be timevals, not integer times.
So as soon as the user touches the screen, crash.
2022-05-22 08:01:24 +02:00