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

1064 Commits

Author SHA1 Message Date
poire-z
8f79c662cf Notification: closed by any event, but not consuming it
Make Notification have toast=true, and UIManager deal
specifically with such widget:
a "toast" widget gets closed by any event, and let
the event be handled by a lower widget.
This should allow us to not wait or tap to get rid
of a notification, and just go on with what we're
doing.
Also make them have a default timeout of 2s,
used with all existing ones.
2021-01-12 00:34:30 +01:00
Markismus
67ca9c35f5
Prevent sdcv from interpreting search term starting with dash as an option (#7134) 2021-01-11 14:32:10 +01:00
zwim
8991ec1372
Align wording of AltStatusBar menu to the bottom one (#7130)
Also change to "Font size (%1)"
2021-01-10 19:37:51 +01:00
poire-z
475bb648b0 Margins info msg: show left/right margin values
As we can now tweak them independantly.
2021-01-10 01:14:48 +01:00
poire-z
27b493afef Fix selected word non-highlighted on PDF
Optimisation for CRE from dd74194e made it not work with
KOpt-based documents.
2021-01-10 01:14:48 +01:00
poire-z
9ec3dcb376 ReaderDictionary: fix possible crash with Wikipedia
Also reword some "...canceled" to "...interrupted"
for consistency.
2021-01-10 01:14:48 +01:00
zwim
a44c178d74
show AltStatusBar when changing the font size (#7119) 2021-01-08 16:06:54 +01:00
poire-z
6c23d29a8a ReaderDictionary: tweak timings if interrupted quickly
Rework b66d0be3 and 6205f260 by making that simpler
to comprehend:
- If interruption or search result window is shown in
less than 3 secondes: no specific tweak, a tap outside
will dismiss everything instantaneously.
- If done after 3 seconds: show the interruption or result
window, and discard input for a few 100ms.
- UIManager:discardEvents(): increase a bit default delays.
2021-01-07 23:10:24 +01:00
poire-z
02ac2c4ce6 DictQuickLookup: re-add "tap on title" to set as preferred dict
Restore feature removed in c98dfef7: tap on title
to set dict of current result as a preferred dictionary
for this document.
Changes from former implementation:
- trust sdcv for ordering, instead of doing it ourselves
  by looking at the results (which didn't always work)
- allow setting multiple preferred dicts
- order of preference is shown with a number as a prefix
  to the dictionary name in the title
- taping again allows removing it from preferred dicts,
  and taping again allows setting it back as the first
  preferred dict
2021-01-07 23:10:24 +01:00
poire-z
dc80321688 Search: fix matches not highlighted on current page
Regression (typo from cut and paste) from 7bd59330.
2021-01-07 23:10:24 +01:00
zwim
1a61e79a2c
Add menu to configure the top/alt status bar in crengine (#7107)
Allows toggling from the UI some crengine settings
related to the top status bar (which previously could
be done by editing cr3.ini).
2021-01-07 21:22:40 +01:00
NiLuJe
1925f6e653 ReaderFooter:
* Flush mode to settings ASAP when an unrelated option updates the mode.
    Fixes, among other things, *enabling* the progress bar while the status
    bar is hidden: this showed it, but kept mode as "off".
  * Don't stomp on the current mode when toggling the progress bar.
    And *always* pop the status bar back up to see the difference, even if
    it's hidden.
    This used to be done only when *enabling* the progress bar.
2021-01-06 20:14:21 +01:00
poire-z
6205f26047 Dict, Trapper: prevent dismissal by past events
Add UIManager:discardEvents(), to allow dropping events
for a period of time.
Default duration of 600ms on eInk, 300ms otherwise.
Used when showing the dict result window, so that a tap
happening just when it's being shown won't discard it.
Used with Trapper:confirm()/:info(), to avoid taps made
in a previous processing to dismiss (and so, select the
cancel action) a ConfirmBox not yet painted/visible.
2021-01-02 11:50:32 +01:00
poire-z
aedab2d695 Dict/Wiki lookup: less text cleanup on manual input
Don't cleanup input text as much when entered manually
(or when it's sane) than when coming from book text
selection.
This may allow looking up words like "-suffix", or
do more precise Wikipedia queries.
2021-01-02 11:50:32 +01:00
NiLuJe
a5468ba385 Fix opacity of the dictionary window
Brainfart from 6162c287e8

Forgot to zap the original UIManager:show(), so we were stacking two
identical widgets on top of each other, which obviously affected alpha.

Re #7029
2021-01-01 13:35:10 +01:00
Jason Benwell
32b28c0b80
Footer: add "Pages left in book" as footer item (#7047) 2020-12-31 23:48:16 +01:00
poire-z
c98dfef7fc DictQuickLookup: various tweaks
- Rework widget layout to avoid implicit (and wrong)
  sizing, using proper padding/margins and correct
  measurements of components.
- Adjust lookup word font size so it's not smaller
  than the definition.
- Tweak small window positionning: keep it centered
  if possible, only move it to keep the highlighted
  word shown when we can.
- Large window: adjust to screen size correctly,
  leaving room for footer.
- Always have a "Close" button at bottom right.
  Former always displayed button "Follow link" will
  be added as a 3rd row in the rare case we select
  a word in a link.
- Replace "tap on lookup word to edit and redo the
  query" with an icon on the right: tap on it to
  edit the queries word, long-press to edit the
  current result word. Only close the current dict
  window when lookup is launched.
- Remove feature "tap on title to set current dict
  as the default dict for this document", as it didn't
  really work, and it was bad UX.
2020-12-31 13:28:08 +01:00
poire-z
b66d0be3f9 ReaderDictionary: show nothing if interrupted quickly
If interrupted quickly just after lookup launch, don't
display anything (this might help avoiding refreshes
and the need to dismiss after accidental long-press
when manipulating the device).
2020-12-31 13:28:08 +01:00
poire-z
cac7db1a1c InfoMessage: allows being drawn only after a delay
- InfoMessage: add an option show_delay.
- MovableContainer: avoid possible crash when
  not yet painted.
- ReaderDictionary: use show_delay=0.5 instead of
  scheduleIn(0.5n...) (a5b133da) as we need the
  InfoWidget to be known to UIManager to catch tap
  and allow interrupting lookups properly.
- ReaderDictionary: rework handling of no_refresh_on_close
  (6162c287) with proper regions comparisons
2020-12-31 13:28:08 +01:00
poire-z
dd74194e0a cre.getWordFromPosition(): fix a few issues
Drop the use of crengine's getWordFromPosition() which
is a bit unreliable: it may returns wrong coordinates,
or words from far away in the book (ie. when holding
in the margins).
Rely only on the robust getTextFromPositions() that
we already use for multi words selection.
Having good coordinates allows refreshing a smaller region
(the higlighted word, or the 2 lines if hyphenated).
2020-12-31 13:28:08 +01:00
Frans de Jonge
a96181d74f
Fix typo in "remove bookmark?" (#7062) 2020-12-27 14:10:43 +01:00
Frans de Jonge
b8bed49a61
Pass dict_path to dictionary fix_html_func (#7057)
That way images can be made to work in a more generic, portable manner, such as:

```
return function(html, dict_path)
    html = html:gsub('<rref[^>]*>([^<]*%.jpg)</rref>', '<img src="'..dict_path..'res/%1">')
    return html
end
```

Cf. <https://github.com/koreader/koreader/issues/6056>.
2020-12-26 18:30:19 +01:00
Galunid
d5103bddc3
Add fall back to text selection option to panel zoom (#6960)
* Add fall back to text selection option to panel zoom
* Add functions to allow per extension settings
2020-12-24 09:07:27 +01:00
yparitcher
b2b9b49859 ReaderActivityIndicator: fix isStub()
it was being overridden by the EventListener:new

caused by #7002

c.f. https://www.mobileread.com/forums/showthread.php?t=335886
2020-12-23 23:49:53 -05:00
yparitcher
405c48b6ea Show only 1 End Document Dialog at a time
if scrolling past the end of a document the EndOfBook event get fired once per scroll (a lot)
2020-12-23 23:43:54 -05:00
Frans de Jonge
a5b133dadc
[UX] Wait 0.5s before showing "searching for" dialog (#7012)
Fixes <https://github.com/koreader/koreader/issues/3030>.

Cross-ref to <https://github.com/koreader/koreader/pull/6998>.
2020-12-19 20:02:09 +01:00
poire-z
24424e505e Update UI layout code to use new SVG icons
- Add IconWidget, use it for icons instead of ImageWidget.
  Specify icons by name only, look for them (with either
  .svg or .png suffixes) in multiple directories (including
  koreader/settings/icons/ to allow customizing them).
  Don't crash when icon name not found, shown a black
  background warning icon instead.
- Don't trust the icons' native sizes: replace
  scale_for_dpi=true with width/height=DGENERIC_ICON_SIZE,
  so all icons get the same (tunable) size - except in
  a few specific use cases.
- Top and bottom menu bars: normalize, and have icons
  properly centered in them, extend vertical line
  separators up to the edges.
- TOC: adjust expand/collapse icons size to items size
2020-12-19 14:49:18 +01:00
NiLuJe
17356bbb2a
Kindle: Make ReaderActivityIndicator a stub (#7002)
And only actually flesh it out and register it in the very few cases
where it can actually do something (i.e., old FW 5.x with KPV).
2020-12-18 18:26:58 +01:00
NiLuJe
32bf53cfdf
ReaderFooter: Don't duplicate a 12h clock time format option (#6973)
* ReaderFooter:
	* Honor the global twelve_hour_clock setting, instead of
	  duplicating a local one.
	  (Re #6969)

* os.date is a thin wrapper around strftime, so we might be able to get
away with some not-quite-standard extensions...

These are *definitely* supported on Linux, but are *NOT* the glibc
extension (that'd be e.g., %-I), so, hopefully, they're somewhat
portable...

They are also supported on BSD/macOS.
They are *not* supported by the MS UCRT. That means MinGW-w64, too.
This *appears* to be supported on current Bionic (it might even support
said glibc format altering extensions).

* And of course, Windows is terrible, so, make this terribly ugly to not
break it there...

* Turns out BSD also supports the dash trim format extension, so, leave
the trimming to the libc, and handle the special-casing in a way that
doesn't create stupid locals.

* Random unrelated cleanup ^^.

(https://gitter.im/koreader/koreader?at=5fd24be492aa1c4ef5d11f31)

* Update the testsuite

(Because the default used to be 24h clock).

Changed the default to 24h clock ;p.

* Explain why we don't try to fix it in Lua
2020-12-12 10:44:35 +01:00
John Beard
096b3176dc
Add columns to ReaderZooming paged_modes (#6970)
This means it will warn when changing to continuous mode while
zoom to columns is active.
2020-12-11 19:28:55 +01:00
Martín Fernández
c481c5aa04
move unpackArchive to Device, use native version on android (#6959) 2020-12-10 16:59:14 +01:00
NiLuJe
6162c287e8
ReaderDictionary: Avoid an irritating refresh when dismissing the InfoMessage (#6934)
* ReaderDictionary: Don't refresh when dimissing the lookup info
InfoMessage

Re #6932

* Fix dict_largewindow in Landscape

Have to leave some room for the UI chrome
2020-12-03 17:37:46 +01:00
NiLuJe
493eab92c9
[RFC] Make default UI tapzones more generous (#6918)
* Top menu & bottom menu tapzones are now full-width, thanks to the now sane override system.
* A separate, extra tapzone was also created for each of them to provide a taller, but narrower tapzone extension (one that doesn't clash with the prev/next tapzones).
* The footer tapzone was made much taller.
2020-12-03 17:33:54 +01:00
jperon
3d8342a98c
Fix #6929 (#6930)
A check was missing on a flag not defined for images.
2020-11-30 11:21:14 +01:00
Frans de Jonge
575b86593f
[chore, i18n] Remove extra quotation marks (#6927)
@jperon Did my review comment about this get lost? :-/
2020-11-30 09:03:23 +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
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
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
Jellby
dba7112390
Footer: ensure minimum height for the in-fill in progress bar (#6878) 2020-11-18 13:06:36 +01:00
poire-z
8d49b8d46b Reference page numbers list: highlight current page 2020-11-18 11:41:51 +01:00
zwim
f24d6f8aea
Update statusline immediately when toggling a bookmark (#6872) 2020-11-13 13:04:27 +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
jperon
7bd5933066
Methods to modify highlight menu. (#6851)
* Allow plugins to hook into highlight menu
2020-11-08 13:07:51 +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
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
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
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
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
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
f31bd736f7 Allow sorting of dictionaries 2020-10-05 18:22:47 +02:00
NiLuJe
e17a0d4068
Don't generate separators for empty generators (#6752) 2020-10-05 16:18:31 +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
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
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