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

1015 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
99045b4311
Minor util & ffi/util cleanups (#6657) 2020-09-15 20:39:32 +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
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
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
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
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
tjader
54b299b639
Fix typo (#6570) 2020-08-29 20:38:12 +02:00
poire-z
bafc52afd1 util: adds util.secondsToHour(), util.secondsToDate() 2020-08-29 20:07:26 +02:00
Martín Fdez
454ed0ebeb enable usage of system fonts 2020-08-27 21:40:18 +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
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
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
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
Galunid
627716db9c
Allow setting text selection rate (#6449) 2020-08-06 00:13:26 +02: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
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
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
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
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
poire-z
6e7c7bb841
Text selection: cleanup text obtained from engines (#6410) 2020-07-22 00:14:57 +02:00
yparitcher
7849d58a76
Fix footer update on UpdatePos event (#6392)
Regression from 70f89c4d (#6292).
2020-07-19 06:56:39 +02:00
yparitcher
6671d984ed
SetNightMode event & Night Mode refresh rate (#6386)
If the user has not set a separate refresh rate for night mode
the default one will be used, as was the previous behavior

Closes: #5019
Closes: #6094
2020-07-17 08:54:21 +02:00
yparitcher
bda44a99ef
Dispatcher: use sections (#6364)
use `device` `filemanager` `rolling` and `paging` sections to organize the
dispatcher menu and allow the user to know when the action will apply

add events from ReaderGesture

allow profiles in FM
2020-07-14 17:39:03 -04:00
yparitcher
70f89c4df1
ReaderGesture: cleanup (#6292)
convert all gesture actions to use events for better modularity
add network event handlers and device event handlers
2020-07-12 14:47:49 -04:00
NiLuJe
509ee7bb86
Allow locking the gyro to the current screen mode (#6347)
* Allow locking the gyro to the current screen mode (i.e., orientation).
* Tweak the "sticky rota" option to work both ways
* More rotation constant usage instead of magic numbers
2020-07-09 19:11:44 +02:00
yparitcher
f7d538b108
Landscape FM / Refactor rotation (#6309)
* landscape FM / Refactor rotation

refactor and simplify the orientation handling code. the user generally cares about the rotation (what direction the device is facing) and not about if koreader is displaying in portrait or landscape mode

* bump base

update luasocket, libjpeg-turbo, curl
add logging to evernote-sdk-lua
update framebuffer for proper rotation
2020-07-01 16:17:41 -04:00
Frans de Jonge
86db43a052
[UX] Move double tap to gesture manager (#6322)
Also replaces the default with +10/-10 pages instead of prev/next chapter.

Closes <https://github.com/koreader/koreader/issues/2721>.
2020-06-28 15:41:24 +02:00
poire-z
9385728769
Bookmarks prev/next via gestures: add location to stack (#6306)
Was correctly done when jumping bookmarks via the Bookmarks
menu and the SkimTo widget, but not from gestures.
Also prevent fillToc() on each page turn when book has no TOC.
2020-06-25 21:19:50 +02:00
poire-z
71744688c7 Style tweaks: use 0.8rem instead of 80% for in-page footnotes 2020-06-25 14:51:32 +02:00
Martín Fernández
83cde64bcc
unified calibre plugin (#6177)
joins calibre metadata search and calibre wireless connections into a single plugin

search metadata changes:

- search directly into calibre metadata files.
- search can be performed on more than one library (configurable from a menu)
- device scans now find all calibre libraries under a given root
- search options can be configured from a menu. (case sensitive, find by title, author and path)
- removed legacy global variables.
- *option* to search from the reader
- *option* to generate a cache of books for faster searches.

calibre wireless connection changes:

- keep track of books in a library (includes prunning books from calibre metadata if the file was deleted locally)
- remove files on device from calibre
- support password protected connections
- FM integration: if we're in the inbox dir it will be updated each time a book is added or deleted.
- disconnect when requested by calibre, available on newer calibre versions (+4.17)
- remove unused opcodes.
- better report of client name, version and device id
- free disk space checks for all calibre versions
- bump supported extensions to match what KOReader can handle. Users can override this with their own list of extensions (or from calibre, by configuring the wireless device).
2020-06-19 12:22:38 +02:00