Commit Graph

614 Commits (ce624be8b83e880b1a81106a143e1440eeda4aab)

Author SHA1 Message Date
Rafael Fontenelle 4e5779199d [plugin] fix netsh command (#5744)
The edited `netsh` command line had errors:
1- missing v4tov4 (or v6 variant)
2- should have `=` instead of `:`
3- typo in listen(ing)address and listen(ing)port
4 years ago
poire-z 0599c440cc [RTL UI] Bidi-wrap filenames, paths, urls, metadata
bidi.lua:
- Revert "Alias everything to Bidi.nowrap() when in LTR UI,
  as using LTR isolates seems uneeded when already LTR" (part
  of a628714f) which was a wrong assumption: we need proper
  wrappers for all things paths. Enhance some of these wrappers.
- Fix GetText RTL wrapping which was losing empty lines and
  trailing \n.

- Wrap all paths, directories, filenames in the code with
  these wrappers.
- Wrap all book metadata (title, authors...) with BD.auto(),
  as it helps fixing some edge cases (like open/close quotation
  marks which are not considered as bracket types by FriBiDi).
  (Needed some minor logic changes in CoverBrowser.)

- Tweak hyphenation menu text
- Update forgotten SortWidget for UI mirroring
- KoptConfig: update "justification" index for RTL re-ordering,
  following the recent addition of the page_gap_height option.
4 years ago
Frans de Jonge e3fa9bd4b8
[fix] Various minor string issues (#5719)
Fixes <https://github.com/koreader/koreader/issues/5712>.
4 years ago
poire-z 908151a3b0 [feat] Adds Document> Auto-save book metadata sub-menu (#5687)
Replaces DAUTO_SAVE_PAGING_COUNT in defaults.lua with
a new option available in menu, that allows setting
an interval in minutes instead of a page count.
4 years ago
poire-z 1d55afac67 CoverBrowser: Mosaic: better words wrap in text covers
Update words wrapping tweaks for use_xtext: add zero-width spaces
around dots and underscores to allow more wraps.
Fix overlap of directory name and nbitems for long directory names.
4 years ago
Mustafa Ali Mutlu 7b0b5d5ba7 [fix] Crash when exporting notes (#5677)
Fixes https://github.com/koreader/koreader/issues/5609
4 years ago
poire-z 7952fa2c09 [RTL UI] update widgets and apps for UI mirroring
Small tweaks all around to handle UI mirroring:
- swap existing symbols like arrows, or use alternative ones
- rotate some images, like chevrons and dogear icons
- flip some left and right swipe handling
- flip some geometry arithmetic like tap on left or right
  side of page or dict window
- use new ProgressWidget:getPercentageFromPosition() instead
  of geometry arithmetic
- BD.wrap() some concatenated string bits, like in reader
  and menu footers
- flip inverse_reading_order when UI is mirrored

More specific tweaks:
- ReaderGesture: reset some specific gestures when UI direction
  has changed (tap on top/bottom left/right corners, for
  bookmarks and FileManager "Plus menu").
- ReaderRolling: show markers on the correct side of page,
  in single or dual page mode.
- KoptOptions: swap left and right icons in Alignment toggle
- CheckMark: proper rendering in all 4 mirroring/rtl combinations.
- VirtualKeyboard: forbid any mirroring
- Move util.getMenuText into Menu.lua
4 years ago
poire-z d6d49a64a7 [RTL UI] use auto or LTR text direction in some specific cases
Allow TextBoxWidget new text direction/lang parameters to be
set on upper widgets, and propagate them all the way to it
(ScrollTextWidget, InputText, InputDialog, TextViewer).

Use specific non-default ones in some specific cases:
- Force LTR text direction when showing HTML and CSS, and
  configuration files (in some plugins).
- Use Wikipedia server language and text direction when
  showing an article.
- Use auto with Dictionary results, as we don't know the
  dictionary language, and they may contain mixed content.
- Force LTR when showing some paths (still needs more of them)

TextEditor plugin: add 2 new options "Auto paragraph direction"
and "Force paragraph direction LTR".

Footnotes popup: grab HTML direction, and forward it
to MuPDF for proper display.
4 years ago
poire-z 016df709af CoverBrowser: list mode: fix overlap of directories and nb items 5 years ago
poire-z 7b4b06f557 CoverBrowser: Mosaic: only left-align for File browser
Left align partially filled rows for File browser/chooser, but
have them centered for History and Favorites for a prettier
look when only a few items are displayed.
5 years ago
Martín Fernández 5fb03475c5 revert #5493 - show android mountpoint on system stats 5 years ago
Robert 830fc790f1 Battery stats plugin: fix and improvements (#5626)
- fix incorrectly shown awake, sleeping, charging and discharging,
- remove unneeded debug mode and logging to external file,
- prevent showing values like inf, -inf, nan in estimated times
  (we now show "n/a"), and values below zero,
- show extra confirm box when we want to reset data,
- show time in format xxhxxm instead of only pure minutes,
- check at initialization that the device was charging when it was
  turned off (battery level larger than at the time of exit).
5 years ago
poire-z 085d162f23 CoverBrowser: Mosaic: fix alignment on non-fully filled rows 5 years ago
Robert 03fda96041 [fix] Empty directory path and crash on TextWidget (#5606) 5 years ago
Frans de Jonge dc4453eb7f
[fix, plugin] Don't show full widget together with isOnline() (#5575)
Fixes https://github.com/koreader/koreader/issues/5415

Cf. https://github.com/koreader/koreader/pull/5452 https://github.com/koreader/koreader/pull/5573 https://github.com/koreader/koreader/pull/5574
5 years ago
Robert 371e3336a5 [feat] Favorites: organize book into collections (#5527)
View, add, remove, sort, open book to/from collections.
For now, only one collection named Favorites.
5 years ago
poire-z 16c021a76a
CoverBrowser: fix files_per_page setting type (#5556)
Avoid saving/getting "12.0" (as the lua-ljsqlite3 driver does),
and save/get "12" instead by properly converting it to a string
and back, as the config.value table column is of type TEXT.
5 years ago
poire-z 602a821acc
CoverBrowser: list mode: better default for files_per_page (#5551)
Don't use a hardcoded default value of 10 files per page, but
compute it from available height, as previously (this reverts
a bit from 0ecf42e9).
5 years ago
NiLuJe 4f52c4147f
Fix a deadlock with empty settings (#5546)
* Fix deadlock on empty settings
Emulator only. Was stuck looping forever on directory == base == .
5 years ago
Robert dec0e73a7b [statistic plugin] Don't generate md5 sum on open document (#5528)
There is no need to generate a md5 sum for documents that were already opened.
5 years ago
poire-z 0ecf42e995
CoverBrowser: list mode fixes and tweaks (#5525)
- Use a hardcoded default value of 10 files per page.
- Save cover sizetag as "s<nb of items per page>" instead
of "s<item height>" so they are stable (and not re-fetched)
when switching between FileBrowser and History, which have
some small geometry differences.
- When showing History in landscape mode, decrease perpage
from the set value, so items don't look smaller.
- Use a step, larger with big items, when iterating and decreasing
font sizes to make text fit, to speed up the process a bit.
5 years ago
Jörg Derungs 946595fa46 CoverBrowser: select nb of items in Detailed list mode
New menu options:
- Detailed list mode: select nb of items per page
- Series: new option to show it on a separate line
5 years ago
poire-z f05e62c1fb
TextWidget: small refactoring, better handle max_width (#5503)
Lots of code was doing some renderText calls to get the size
of some text string, and truncate it to some width if needed,
with or without an added ellipsis, before instantiating
a TextWidget with that tweaked text string.

This PR fixes/adds some properties and methods to TextWidget
so all that can be done by it. It makes the calling code
simpler, as they don't need to use RenderText directly.
(Additionally, when we go at using Harfbuzz for text rendering,
we'll just have to update or replace textwidget.lua without
the need to update any higher level code.)

Also:
- RenderText: removed the space added by truncateTextByWidth
  after the ellipsis, as it doesn't feel needed, and break
  right alignment of the ellipsis with other texts.
- KeyValuePage: fix some subtle size and alignment issues.
- NumberPickerWidget: fix font size (provided font size was
  not used)
5 years ago
Nick ef22e85469 UI Changes (#5508)
* Changed File Browser text

KOReader looks nicer than KOReader File Browser,

* Remove the "page x of x" if only one page

Removes it from the bottom of the file browser

* Remove the "page x of x" if only one page

Removes it from the top menu, if there is only one page, why show page 1 of 1

* Renamed ~ to Home

Since the file browser can be considered "Home"

* Added 12 hour time option

Also tweaked the charging icon,  looks nicer than +, tweaked seperator between time and battery, - instead of @
5 years ago
Frans de Jonge 17244cca2f
[fix, plugin] Remove wakeup task on resume (#5502)
Should fix #5495.
5 years ago
Martín Fernández bae69c0ef3 show android mountpoint on system stats (#5493) 5 years ago
teroshan ebcefe1c98 [feat] plugins/Wallabag: add ability to set a list of tags to ignore (#5467)
A new setting has been adding allowing to set a comma separated list of
tags to ignore.

Entries with either of these tags will be skipped by the client when
fetching the list of articles to download. Extra articles will be
fetched from the server to make up for the skipped articles, ensuring to
meet the target number of articles.
5 years ago
Mustafa Ali Mutlu 16d0e380ea [Plugin] Support for exporting annotations/bookmark renames (#5440)
Changes :parseHighlight() to parse renamed bookmarks/highlights

see #5408
5 years ago
yparitcher 8ed088159c [Plugin] Per directory defaults (#5428) 5 years ago
teroshan 63e80c7bb7 [wallabag] comply with coding conventions 5 years ago
teroshan 26437758e5 [wallabag] fetch pdf files directly instead of converting them
Currently, all the articles were converted to .epub by default. When
handling an article that linked to a .pdf file, it resulted in an
unreadable file.

This patch skips the conversion for a pdf file, and download it directly
instead.
5 years ago
Mustafa Ali Mutlu a0e2f02c32 [Plugin] Joplin support (#5431)
Adds joplin support, fixes https://github.com/koreader/koreader/issues/5086

Changes
-adds a submenu to evernote menu 
   - -Joplin
      |-Set IP and port
      |-Set authorization token
      |-Export to Joplin
      |-Help

-adds EvernoteExporter:exportBooknotesToJoplin()
-adds JoplinClient.lua
-modifies html_export, txt_export and joplin_export flags to work with each other. (eg if user selects one others deactivated)
5 years ago
Frans de Jonge 5557adef14 [plugin] Normalize autoshutdown_timeout_seconds variable name
This discrepancy caused accidentally not properly updating the timeout setting from the GUI dialog.
5 years ago
Frans de Jonge e257c4e45e
[feat, Kobo] Autoshutdown (#5335)
The methods used here will likely work on most embedded devices, which is why I put them in their own WakeupMgr interface/scheduler module, separate from Kobo.

See https://www.mobileread.com/forums/showthread.php?p=3886403#post3886403 for more context.

Fixes #3806.
5 years ago
Robert deebbfe606 [plugin/statistics] Synchronize Current book with footer (#5344)
Better synchronize statistics Current Book with footer.

Also some stylistic improvements in the strings.
5 years ago
Robert 48f20b2153 [i18n, plugins] ReadTimer - better plural forms (#5315)
See: https://github.com/koreader/koreader/pull/3420#pullrequestreview-71776459
5 years ago
Frans de Jonge 4cdc3ab99b
[feat, plugin] Add AutoTurn (#5295)
Fixes <https://github.com/koreader/koreader/issues/3019>.
5 years ago
Frans de Jonge 6979e080f8
[fix, UX] Update kosync login/logout text (#5278)
As a side effect of <https://github.com/koreader/koreader/pull/4189> some menus have to manually trigger updates.

I'm not overly enthused with this solution but I couldn't think of anything better right now.

Fixes <https://github.com/koreader/koreader/issues/5224>.
5 years ago
Frans de Jonge be87fb27a0
[chore] Convert a couple more todos (#5267)
Cf. <https://github.com/koreader/koreader/pull/5244>.

Also update check.
5 years ago
Frans de Jonge ba8099f906
[lang] Miscellaneous improvements (#5263)
Some grammar/style, some fixes.
5 years ago
Frans de Jonge 102180b202 [i18n, plugins] Statistics: fix estimated days to read plural 5 years ago
Frans de Jonge 2c555830f9
[feat, i18n] Implement ngettext (#5257)
Fixes <https://github.com/koreader/koreader/issues/5249>.

See https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html and https://www.gnu.org/software/gettext/manual/html_node/Translating-plural-forms.html for more information.

Usage:
```lua
local T = ffiUtil.template
local _ = require("gettext")
local N_ = _.ngettext

local items_string = T(N_("1 item", "%1 items", num_items), num_items)
```
5 years ago
Frans de Jonge 45a0f285f1
[fix, i18n] Make two strings translatable (#5256)
Fixes <https://github.com/koreader/koreader/issues/5255>.
5 years ago
Frans de Jonge 6ed58346a1
[i18n] Add translator notes (#5250)
Thanks to <https://github.com/koreader/koreader/pull/5237> we can now  extract the knowledge currently embedded in Transifex and put it directly in our source. This positively affects <https://github.com/koreader/koreader/issues/3754>.

Translation instructions and knowledge that comes out of localization-related questions should be preserved in the source, because Transifex is too ephemeral. For example, the links from <https://github.com/koreader/koreader/pull/2290> are no longer accessible. Even when they are, it's quite useful to have this information around while dealing with the code as well, and I also hope it'll be informative to contributors who seldom visit Transifex.

This commit also makes a few minor changes to obviate the need for comments where possible.
5 years ago
Frans de Jonge a2dcfe9aec
[doc] Tag @todo, @fixme and @warning (#5244)
This commit standardizes the various todos around the code a bit in a manner recognized by LDoc.

Besides drawing more attention by being displayed in the developer docs, they're also extractable with LDoc on the command line:

```sh
ldoc --tags todo,fixme *.lua
```

However, whether that particular usage offers any advantage over other search tools is questionable at best.

* and some random beautification
5 years ago
Frans de Jonge da988c15de
[CI] Switch to custom xgettext build to extract multiline strings (#5242)
Because let's face it, it just looks much better this way.

Docker image update in https://github.com/koreader/virdevenv/pull/43

Discussion in https://github.com/koreader/koreader/pull/5238#issuecomment-523675211 and https://github.com/koreader/koreader/pull/4524
5 years ago
Frans de Jonge e2ceace302
[fix, CI] Push to Transifex from master, fix multiline strings for xgettext (#5238)
Related to https://github.com/koreader/koreader/pull/5237
5 years ago
lucarota ac7b6aaab5 Fix: Zsync -> Subscribe to book share crashes (#5184)
Patch similar to PR #3086.
Same problem #2638 when tap Subscribe to book share.
"Zsync" -> "Subscribe to book share" crashes koreader if not connected to wifi

After this fix when koreader is offline after "Zsync" -> "Subscribe to book share" we are asked to enable wifi.
5 years ago
lucarota bcb662c863 minor: translate some menu text and error message (#5185) 5 years ago
Robert 825a3c4b52 Add gesture - show current book statistics (#5167) 5 years ago
NiLuJe e2961097e7
Don't use WAL on devices where it's not supported (#5162)
(i.e., truly ancient kernels and weird FS).

In which case, we use TRUNCATE, which might be a tad less terrible than
DELETE on said weird crap FS.
5 years ago
Robert c6c8c5a037 Add vertical edge gesture (#5156)
* Add vertical edge gesture
* Add left/right edge swipe gesture
* Move kobolight plugin to ReaderFrontlight
* Remove kobolight plugin
5 years ago
Le Tuan 6cf9b4c89d [feat] plugins/Wallabag: archiving instead of deleting articles (#5148)
Marks finished articles as read (archived) instead of permanently deleting them.
5 years ago
Le Tuan 14bdf4782a [feat] Wallabag: customizable articles count per sync (#5147)
Includes:
- New client settings menu and dialog.
- Articles count to fetch per sync is customizable.
5 years ago
Robert 93b6335421 [statistics] Remove conversion message on new installations (#5120) 5 years ago
NiLuJe 282062c1d9 Add some nil guards around cover_cache_info access
Managed to get it nil'ed by playing with a sleepcover magnet...
5 years ago
NiLuJe 2e7a910178
Some BookStatus QoL tweaks (#5100)
* Make the cover thumbnail respect the cover's AR in the widget
* Add a "Mark as read/unread" button in the FM's longpress menu.
* Make sure the cover_info cache is wiped if necessary (sidecar purge/BookInfo cache clear).
5 years ago
Frans de Jonge 9300a59a89
[fix] util.getSafeFilename() maximum extension length (#5067)
Strip HTML and do some semi-intelligent detection of faux extensions (i.e., more than 10 characters probably isn't one).

Fixes #5049.
5 years ago
Frans de Jonge 2f335e2e6e
[fix, plugins] NewsDownloader: close document on go to folder (#5064)
Same as https://github.com/koreader/koreader/pull/5063. Also see https://github.com/koreader/koreader/issues/5060#issuecomment-499416617.
5 years ago
Frans de Jonge e261d95218
[fix, plugins] Wallabag: close document on go to folder (#5063)
See https://github.com/koreader/koreader/issues/5060#issuecomment-499416617
5 years ago
limerainne 8fdb7483a2 [fix, plugin] Change perception expander plugin behaviors (#5051)
* Landscape status not detected when reloading document
* Settings are mostly not applied immediately; have to flip page to see effects
5 years ago
Tom Hall e213a7665d NewsDownloader: Fix createFromDescription for atom feeds (#5041)
Atom feed content is found under the xml tag, 'content', not 'context'.
The content field is a actually a table, with the text/html at [1].
5 years ago
Tom Hall 1e9074ca6a NewsDownloader: Allow including images when using text from feed (#5040)
Split the html page download out of createEpub, so that createFromDescription
can pass in its own html for epub packaging (with optional image download).
Still pass in a url, so that relative urls can be made absolute.
5 years ago
Frans de Jonge 439f876ad8
[fix] util.getSafeFilename() default to worst-case scenario (#5036)
Also pass path from Wallabag plugin.

Fixes #5025.
5 years ago
Tom Hall 38f3bfdde7 NewsDownloader: Improve info shown on UI during processing (#5030)
Pass strings into functions, so that they can add their own info to the
UI without overwriting the information shown by the calling function.
5 years ago
Frans de Jonge 8815cbe07a
[fix, chore] Abstract filename logic in util.getSafeFilename() (#5026)
Fixes https://github.com/koreader/koreader/issues/5025

The OPDS browser was doing some fancier stuff in a way that should be abstracted away in util (because it applies anywhere files will be saved):

eace8d25c1/frontend/ui/widget/opdsbrowser.lua (L482-L491)
5 years ago
Sergey Avseyev f6e561923c newsdownloader: rebuild URL on redirect to bare path (#5012)
The server might redirect to only path, in this case the scheme and host
should be taken from original URL
5 years ago
Tom Hall 0636ab7c79 NewsDownloader: Skip re-downloading files which already exist (#5008)
Fixes #5005

Results from re-running "Download news" should be as before, except when the
article content has changed between runs, but the title has not and an updated
date has not been given in the feed. User can force it to re-download an
article by manually deleting the file then running "Download news".
5 years ago
Vani Ramakrishnan 08fa5e2f17 Info message typo fix (#5003)
"succesfully" => "successfully"
5 years ago
BloodRagg 3009f5ae54 Kobo only mounts in /mnt/, set filter in case user uses some custom mount points (#4981)
Normally only mmcblk* stuff (internal/external) will get mounted to /mnt/onboard or /mnt/sdcard, but it can sometimes be useful, see: https://github.com/koreader/koreader/pull/4981#issuecomment-487670972
5 years ago
Tom Hall 9b41adb2f1 NewsDownloader: Fix UI when downloading multiple feeds (#4987)
Wrap the whole of loadConfigAndProcessFeeds with Trapper:wrap so that feeds are downloaded sequentially, otherwise they become interleaved and the UI progress updates get confusing. Use Trapper:info in place of manually constructed InfoMessages.
5 years ago
Tom Hall 8e23d2a937 NewsDownloader: Process articles sequentially
Lift the Trapper:wrap call out of the individual article processing code,
so that articles are processed one by one, in order to:
* Avoid concurrent progress updates fighting over the UI dialog
* Avoid trying to download many images at the same time
5 years ago
Tom Hall cad4d25d24 NewsDownloader: Add flag 'include_images' to feed config
Allow the user to specify whether to download images for each individual
feed specified in feed_config.lua. Default to false to stay closest to
existing behaviour.
5 years ago
Tom Hall 1588d4c64a NewsDownloader: Download images and output EPUBs
Initial commit of new NewsDownloader which downloads images as well as text
and packs it all into an epub.

Based on Wikipedia "Download as EPUB" code.
5 years ago
Frans de Jonge 837e9d85cb
[fix] plugins/send2ebook: crash on setting download dir (#4944)
Also fix weird indentation.

Reported on the forum: https://www.mobileread.com/forums/showthread.php?p=3833021#post3833021
5 years ago
NiLuJe 33946aa732
Some FL regression fixes after #4901 (#4921)
* Make hasNaturalLight* caps safe to call without a device check. (fix #4919)
Make it clear that it's expecting the NTX implementation, though.
* Don't turn the FL on on resume if it was off on suspend
* Make sure turnOn/turnOff actually updates hw_intensity in the process where it matters, instead of just in a short lived fork ;). (fix #4923)
5 years ago
NiLuJe 2a91b2b038 Go back to "UI" refreshes in the FM (#4903)
Going with partial ends up being problematic on REAGL devices in a
number of different ways.

On Kindle (at least pre EPDCv2), it's slightly flickery because of the
whitespace and the boldface.
On Kobo, it's slow when anything else tries to queue an update (i.e.,
flashing the chevrons).
Which is a non-issue on the Forma because then it's fast when using
pageturns to navigate, but, still :D.

The obvious downside is we lose the automatic flash after n refresh,
which is potentially annoying on older, non-reagl devices.
It's not really on issue on REAGL devices, especially on EPDCv2.
5 years ago
Frans de Jonge 709207a621
[feat, UX] Add external link to Wallabag (#4863)
Offers a choice when Wallabag is available.
5 years ago
poire-z 7396abebf2 [chore] reformat all gestures "overrides" to be diff friendly 5 years ago
Frans de Jonge 76fd9228d3
[feat] plugins/wallabag: addArticle() method (#4852)
Currently unused, but a prerequisite for dynamically adding links to Wallabag.
5 years ago
NiLuJe 7210fb478d
Faster blitting @ BB8/BBRGB32 when no processing is needed (#4847)
* Pickup the eponymous blitting performance tweaks from koreader/koreader-base#878
* Cleanup BitOpts usage (require & cache)
* Unify oddness checks (MOD -> AND)
* Enforce the native Portrait orientation on Kobo (except @ 16bpp, i.e., KSM w/ 8bpp swap disabled), to allow for faster blitting when unrotted.
* Switch CRe BB to 32BPP on color screens
* Minor cleanups
5 years ago
NiLuJe fe3fc78171 Move AutoSuspend menu to the Plugin itself 5 years ago
poire-z 17f07e755f CoverBrowser: speedup "View full size cover"
It was doing a full document load to get the cover. It now does
the faster "only metadata" load.
Also move the trick of setting a default font in CreDocument, so
that all callers of document:loadDocument(false) benefit from it.
Prevent crash when no cover image is available (even if the cache
says it has one, the file may have been updated and doesn't have
it anymore).
5 years ago
NiLuJe 2011cf1ad1 Various blitting related cleanups (#4789)
* Fix the "Enable debug logging" checkbox so that it properly disables "Enable verbose debug logging" when it gets disabled
* Avoid asking ImageWidget for alpha-blending when it's not useful
* Make ImageWidget's alpha-blending code-path double-check that alpha-blending actually is needed, and avoid it if possible
* In the same vein, only do alpha-blending in textboxwidget when absolutely necessary
* Prefer color constants over the gray() method, ensuring that they're part of the eInk palette

Depends on https://github.com/koreader/koreader-base/pull/853

Fix #4774
5 years ago
poire-z ad7dc86a43 CoverBrowser: fix a few "Extract and cache" issues
Ignore path and cover specs when last invoked menu
was History.
Fix InfoMessage size, broken by InfoMessage auto resize.
5 years ago
Frans de Jonge 090a0f8035 [feat] plugins/wallabag: Allow calling Wallabag retrieval with event 5 years ago
NiLuJe bb3f49a566 [feat, Kobo] On Kobo, drop fb to 8bpp on startup (#4637)
* The Great 8bpp Experiment

Swap to 8bpp on Kobo, because we're 'effing grayscale, for pete's sake!

* Always swap to 8bpp, no matter the launch method.

Because it turned out that, even when restarting Nickel, we had to
restore the expected bitdepth ourselves, because pickel/Nickel didn't do
the job completely.

(I'm going to guess the grayscale flag wasn't getting flipped properly).

* Dither every non-transparent icon to the eInk palette

* Make sure hasBGRFrameBuffer is only enabled when the Kobo fb actually is
@ 32bpp...

* Re-process badly grayscaled icons

* And re-grayscale that one w/ gamma correction so the squares show up
better.

* Allow the fbdepth switch to be disabled (in Developer settings).

Also, allow setting debug mode that way.

Also, forcibly disable verbose logging when disabling debug.

* Update setting name to piggyback on the existing check in reader.lua

* Update icons postprocessing info
5 years ago
NiLuJe 6c29b7da65 [fix] PicDocument: Pass a copy of image_bb in getCoverPageImage() (#4628)
Avoids a use-after-free in mupdf.scaleBlitBuffer

Fix koreader/koreader-base#821

Thanks for the hint, @poire-z ;).

* As @poire-z suggested, the original unscaled bb should probably be free'd.
5 years ago
Frans de Jonge e123cc5dca
[fix, AppImage] writable zsync outbox location (#4568)
* [fix, AppImage] writable zsync outbox location

* change to zsync-outbox
5 years ago
NiLuJe 812e595608
Enable HW dithering in a few key places (#4541)
* Enable HW dithering on supported devices (Clara HD, Forma; Oasis 2, PW4)
  * FileManager and co. (where appropriate, i.e., when covers are shown)
  * Book Status
  * Reader, where appropriate:
    * CRe: on pages whith image content (for over 7.5% of the screen area, should hopefully leave stuff like bullet points or small scene breaks alone).
    * Other engines: on user-request (in the gear tab of the bottom menu), via the new "Dithering" knob (will only appear on supported devices).
  * ScreenSaver
  * ImageViewer
* Minimize repaints when flash_ui is enabled (by, almost everywhere, only repainting the flashing element, and not the toplevel window which hosts it).
  (The first pass of this involved fixing a few Button instances whose show_parent was wrong, in particular, chevrons in the FM & TopMenu).
* Hunted down a few redundant repaints (unneeded setDirty("all") calls),
  either by switching the widget to nil when only a refresh was needed, and not a repaint,
  or by passing the appropritate widget to setDirty.
  (Note to self: Enable *verbose* debugging to catch broken setDirty calls via its post guard).
  There were also a few instances of 'em right behind a widget close.
* Don't repaint the underlying widget when initially showing TopMenu & ConfigDialog.
  We unfortunately do need to do it when switching tabs, because of their variable heights.
* On Kobo, disabled the extra and completely useless full refresh before suspend/reboot/poweroff, as well as on resume. No more double refreshes!
* Fix another debug guard in Kobo sysfs_light
* Switch ImageWidget & ImageViewer mostly to "ui" updates, which will be better suited to image content pretty much everywhere, REAGL or not.

PS: (Almost 💯 commits! :D)
5 years ago
poire-z 335a513826 [chore] cleanup multi-lines translatable strings
Revert 9971eb85 and make multi-lines strings more readable.
(Multiline translatable strings extraction has been fixed
in koreader-misc tralua_xgettext.py.)
5 years ago
sonix-github 4d15058773 NewsDownloader: fix RSS titles decoding (#4502) 5 years ago
Brian Winkler b6298810bb Fixed Wallabag plugin's parsing of wrong API url. (#4501)
The Wallabag plugin's callAPI() method was attempting to parse the user supplied
URL for the Wallabag API. Unfortunately, the parse was silently failing since
the variable apiurl did not contain a complete URL. The scheme of the parsed
URL (always nil) was then used to select either http or https (default). The
result being https was always selected, regardless of the user supplied setting.

The parsed URL was switched to the variable server_url instead of apiurl but the
behavior resulting in the default selection of https when parsing fails was left
unchanged.
5 years ago
James Brechtel 3bf4db9960 [fix] Wallabag - Use JSON.encode to encode auth JSON (#4449)
Previously the plugin was creating JSON by hand for authentication requests.
This would cause invalid JSON to be sent when the password contained characters
that need to be escaped (e.g. "). Using JSON.encode will result in values being
properly escaped when necessary.
5 years ago
poire-z d500a6ace5 CoverBrowser: options to show pages read/left as progress 5 years ago
NiLuJe f6743a45db
Proper Forma support (#4414)
* Enforce a known rotation on startup, to make sure we handle touch input coordinates properly.
* Proper FrontLight warmth support (thanks to @cairnsh & @pazos in #4291)!
* Fix the PageTurn buttons mapping to match Nickel's defaults
* Properly remap PageTurn buttons depending on the current rotation.
* Actually enable the Mk.7 screen refresh codepath on *all* Mk.7 devices (I'd messed up the device check...).
* Full accelerometer handling (includes a touch of refactoring regarding orientation handling in general).
* Fix insidiously broken USBMS behavior in Nickel after we exit on FW >4.8.

Fix #4291
Fix #3002
5 years ago
Frans de Jonge f1a348b251
[UX] SSH: double info dialog timeout (#4417)
I tried to actually use this feature and five seconds isn't enough time to register the relevant IP:port to connect.

I'd add a menu item to call up the info (without a timeout) but this is just a web interface quickie.
5 years ago
visig 5692b6e62a [fix, lang] rename calibre companion to calibre wireless connection in Plugin management menu (#4411) 5 years ago
Frans de Jonge 8932a5e765
[fix, i18n] plugins/wallabag: make a few overlooked strings translateable (#4408)
Notified on the forum https://www.mobileread.com/forums/showthread.php?p=3787617#post3787617
5 years ago
Frans de Jonge 1cba60765b
[feat] MenuSorter: add sorting_hint support (#4399)
By adding a `sorting_hint` to a menu item, the program will put orphaned items in the relevant (sub)menu instead of in the first menu with a NEW prefix.

Fixes #4393.
5 years ago
Yann Muller 3f7f5f07bf Wallabag fixes and improvements (#4347)
* Improved error handling.

* Removed unused variable.

* [fix] Skip remote deletes if disabled.

* Addded Wallabag preffix to logger output.
6 years ago
Martín Fernández 1e69fae7bc [feat] Add support for BQ/Fnac devices (#4294)
Adds support for devices found in https://blog.bq.com/es/bq-ereaders-developers-program/. Tested on BQ Cervantes 4 (last BQ device from 2017).

It adds a new touch input event handler (discussed in #4275) which should work on other single touch devices (ie: Kobo Touch, Mini, Glo, Aura HD) but wasn't tested.

Includes base bump with: [feat] Add BQ/Fnac device support (https://github.com/koreader/koreader-base/pull/745)
6 years ago
Yann Muller 653741dfac [fix] Wallabag: fix for un-configured plugin error (#4277) 6 years ago
Frans de Jonge 588de66bcd
[lang] Plugins: Wallabag fix typo (#4273) 6 years ago
Yann Muller 846f8bfa18 Wallabag plugin (#4271)
A plugin to download articles from a Wallabag server, an
open source read-it-later service (https://wallabag.org).
6 years ago
Robert 028dad2cec Custom server URL for calibre wireless connection (#4238)
* Custom server URL for calibre wireless connection

* DEBUG to logger.dbg or logger.info

* Add timeout
6 years ago
Robert dc5a479b66 Gesture manager (initial) (#4240)
Manager supports separate gestures for the file manager and the reader. Gestures from the manager have a higher priority than built-in gestures.

Settings available in Gear -> Device -> Gesture manager
6 years ago
Robert 3d128b543b [Statistics] Add estimated reading finished date (#4241) 6 years ago
poire-z 47bcfc531e
Allow closing full screen dialogs with swipe down (#4237)
Mostly all that have a close button at top right, that may
be hard to reach or hit for some people: TOC, Bookmarks, History,
KeyValuePage (Book information, Statistics...), Book status...
Added full refresh on diagonal swipe where it was missing.
CoverMenu: removed onSwipe override, as it had become the same as
Menu a few months ago.
6 years ago
Robert f0d099b62c calibre companion plugin: misc changes (#4214) 6 years ago
Robert a706fde2d7 Cleanup downloadmgr titles (#4222) 6 years ago
Robert 1d34fcbb12 Show hidden dirs in Choose Cloud and ZSync inbox (#4213) 6 years ago
Matias N 94d8f2d397 Sony PRSTUX support (#4198)
* Sony PRSTUX support
6 years ago
poire-z 850be52177
Keep some menus open when Tap or Hold (#4189)
TouchMenu: added options to menu items with the following defaults:
    keep_menu_open = false
    hold_keep_menu_open = true
So, default for Tap callback is to close menu, and for Hold callback
to keep menu open.
In both cases, provide the TouchMenu instance as the 1st argument to
the callback functions (instead of a refresh_menu_func I added in #3941)
so the callback can do more things, like closing, refreshing,
changing menu items text and re-ordering...

ReaderZooming: show symbol for default (like it was done for
ReaderFont, ReaderHyphenation...)
TextEditor plugin: update the previously opened files list in real
time, so the menu can be kept open and used as the TextEditor main
interface.
SSH plugin: keep menu open and update the Start/Stop state in real time
ReadTimer plugin: tried to do what feels right (but I don't use it)

Also remove forgotten cp in the move/paste file code
6 years ago
Frans de Jonge 5eff127cf6
[fix, lang] Typo in Evernotes description (#4173) 6 years ago
Robert 5344e0b672 [Fix] Don't load disabled plugins (#4169) 6 years ago
Robert 4428ecb422 Plugin manager (#4159)
Also adds descriptions to all plugins.
6 years ago
poire-z adceda15b7
TextEditor: allow scrolling by lines with Pan (#4145)
Feature of ScrollTextWidget, only used for now by TextEditor.
Pan is like Swipe, but wait a bit at end of gesture to release:
the line on which Pan was started will be moved to where Pan is
released.

May conflict with MovableContainer (so not enabled for DictQuickLookup,
where it could have been nice - but it would work only with text
dictionaries, not with HTML ones, as ScrollHtmlWidget can't really
do that).
6 years ago
mwoz123 3fcd7344e4 News Downloader: feed config editor (#4126) 6 years ago
poire-z a33827faf3 TextEditor: fix some wording (#4143)
Fix review comments around https://github.com/koreader/koreader/pull/4135#issuecomment-410823170
6 years ago
poire-z 6e35e683dd
Text editor plugin, InputDialog enhancements (#4135)
This plugin mostly sets up a "Text editor>" submenu, that allows
browsing files, creating a new file, and managing a history of
previously opened file for easier re-opening.
It restore previous scroll and cursor positions on re-opening.
Additional "Check lua" syntax button is added when editing
a .lua file, and prevent saving if errors.
The text editing is mainly provided by the enhanced InputDialog.

InputDialog: added a few more options, the main one being
'save_callback', which will add a Save and Close buttons
and manage saving/discarding/exiting.
If "fullscreen" and "add_nav_bar", will add a show/hide keyboard
button to it.
Moved the preset buttons setup code in their own InputDialog
methods for clarity of the main init code.
Buttons are now enabled/disabled depending on context for feedback
(eg: Save is disabled as long as text has not been modified).

Added util.checkLuaSyntax(lua_string), might be useful elsewhere.
6 years ago
poire-z 9971eb8533 Fix untranslatable strings (#4132)
Some problem somewhere with [[...]] strings starting with a
leading newline. Should probably be allowed, but for now
fix the few such cases to allow them being translated.
6 years ago
Robert 19b1c919d6 FileChooser, PathChooser: show current path in header (#4125) 6 years ago
NiLuJe 0924b57877
Tweak/unbreak my CPUFreq experiment (#4119)
* Only switch to ondemand when we actually can, and when it's better than the current governor...
  This potentially leaves Mk.5 in the lurch, but there's no perfect solution there :/.

* Switch to UI for the unmark event of navigation hints markers
Might help on non-REAGL devices, and doesn't hurt there (re #3983).

* Switch SQLite DBs to WAL
Sounds nice in theory, behaves fine in practice.
6 years ago
NiLuJe 7e97030a5c
Fix scp & sftp on Kobo/Kindle (#4108)
* Update dropbear path for the new, non-multicall binary

* Bump base to pickup dropbear changes
6 years ago
poire-z d8d0def122
Floating punctuation: change default to disabled (#4101)
It was enabled by default, but it's mostly only needed for CJK users.
Furthermore, when floating punctuation is enabled, some rendering
issues exist (text right alignment, variable margins...) that
only CJK developpers could really fix. So, best to disable it and
avoid these rendering issues for most users.

Also: fix CoverBrowser crash when "Delete cache database"
followed by "Prune cache of removed books".
6 years ago
poire-z 7666644362
Bookmarks, CoverBrowser: scale dogear icon (#4081)
The Dogear icon is 20x20 pixels and was never scaled where used. Now:
- The bookmark icon (top right of screen) is scaled to 1/32th of the screen
width (previously, it was 1/30th on a 600px wide emulator, 1/53th on a GloHD).
On CreDocument, furthermore decrease its size if needed depending on the
selected margins so it never overwrite the text.
- CoverBrowser list view: scale it to the available room under
the "N % of P page" text, so it does not cover "page".
- CoverBrowser mosaic view: scale it to 1/16th of the cover rectangle, which
should prevent if from overwritting the text thanks to a max text width of
7/8 of the cover rectangle.

Also for CoverBrowser: don't index metadata for unsupported document
(which could happen when browsing files with PathChooser) and show
full filename for such documents.
Also: ImageWidget: small fix in case we use both scale_factor and
scale_for_dpi.
6 years ago
NiLuJe 464672108e
Misc. minor fixes (#4080)
* Unbreak dropbear after #4077
* Move the Kindle SO check to init
* Various virtual keyboard fixes to eradicate the remaining refresh conflicts (i.e., tearing artifacts), no matter the user's settings. (re #4069, re #3130).
6 years ago
NiLuJe 5d0359b257
Minor dropbear tweaks (#4077)
* Tweak dropbear plugin a bit
Create hostkeys on demand
Make platform-specific stuff only run on the affected platform.
6 years ago
Robert e977c4a394 Fix Reading progress display in landscape mode (#4074) 6 years ago
mwoz123 7eb2a32c5e send2ebook: fix corrupted files after download (#4063) 6 years ago
poire-z 8b3432ae76 Reader menu: adds "Open previous document" (#4056)
* Reader menu: adds "Open previous document"

Allows for quick switching between 2 documents, and keep
symmetry with FileManager menu "Open last document".

* Use "Last:" and "Previous:" when Show filename
6 years ago
mwoz123 81798111c2 Option to show filename in Open last menu item (#4042) 6 years ago
mwoz123 27dfa30181 Send2ebook fix download after refactor from #3924 (#4027)
* fix send2ebook download after refactor from #3924

* restore removal from server
6 years ago
NiLuJe 5871132c25
UI Behavior tweaks (#3983)
* Switch all initial highlights to "fast" update

i.e., everything that does an invert
Plus a few other things that refresh small UI elements onTap
Re #3130

* Tweak refreshtype for a number of widgets:
  * Fix iconbutton dimen
  * Make touchmenu flash on close & initial menu popup. Full-screen on close.
  * Use flashing updates when opening/closing dictionary popup. Full-screen on close.
  * Switch FileManager to partial.
    It's mostly text, and we want flash promotion there.
  * Make configdialog & menu flash on exit
  * Make FLWidget flash on close
  * virtualkeyboard: flash on layout change & popup.
  * Potentially not that great workaround to ensure we actually see the
highlights in the FM's chevrons
  * Flash when closing BookStatus Widget
  * Optimize away a quirk of the dual "fast" update in touchmenu

* Promote updates to flashing slightly more agressively.

* Document what each refreshtype actually does.

With a few guidelines on their optimal usecases.

* Switch remaining scheduleIn(0.0) to nextTick()

* Tighter scheduling timers

Shaving a hundred ms off UI callbacks...

* Cache FFI C Library namespace

* Ask MuPDF to convert pixmaps to BGR on Kobo

Fix #3949

* Mention koxtoolchain in the README

re #3972

* Kindle: Handle *all* fonts via EXT_FONT_DIR instead of bind mounts insanity

* Make black flashes in UI elements user-configurable

(All or nothing).

* Jot down some random KOA2 sysfs path
6 years ago
Robert 6fbb4e4ff4 [feat] Add default to the last value used in ReadTimer (#3963) 6 years ago
Frans de Jonge fcc24fc7b1 [fix, i18n] plugins/SSH.koplugin: public SSH key info (#3947) 6 years ago
onde2rock c0e80461ff [feat] Integrated Dropbear SSH server (#3842)
* Add a menu item to start an ssh server

* Add blank login option
6 years ago
Robert e6518c4f68 Use RenderImage:renderImageData insteed of Pic.openJPGDocumentFromMem (#3930) 6 years ago
Robert 4bf4578d17 Add HTML widget in GoodReads review (#3929) 6 years ago
Robert 9e67c5a614 CloudStorage: Allow use reserved characters in FTP username and FTP password (#3924)
Depends on RFC 3986 compliant util.urlEncode() and adds unit tests for the new functions.
6 years ago
onde2rock dad7f209fa [CI] Add a check to detect tab in lua files (#3919) 6 years ago
poire-z 4bb3999cbc RenderImage: factorize all image rendering and scaling code
New module RenderImage (alongside existing RenderText) to provides
image rendering and scaling facilities.
Uses MuPDF, but tries first giflib on GIF.
Allows for getting all the frames from an animated GIF.
6 years ago
poire-z 9e4e71d630 coverbrowser: close sqlite db after init (#3897)
Don't keep a handle on bookinfo_cache.sqlite3 when
"Start with: last book"
6 years ago
mwoz123 a6b824ed90 NewsDownloader: add date time to filename (#3863)
* Download all files from ftp server(Not only epub). Show failed download number

* add date and time to filename

* optimalization - decrese max redirect number

* remove new external lib from luacheck

* add new lib licence info
6 years ago
poire-z cc7ef363e5 [UX] CoverBrowser: set default display modes on first launch (#3834) 6 years ago
poire-z eb613ace3e [chore] CoverBrowser: avoid page info code duplication (#3835)
Also allows full refresh with small diagonal swipe
of Menu instances (TOC, bookmarks)
6 years ago
David Engster ba46376299 [UX] plugins/kobolight: Handle automatic warmth
If warmth is handled automatically, do not try to change warmth but
display a message instead.
6 years ago
onde2rock f893b01f04 [fix, UX] CoverBrowser: reset cursor (#3817)
Also don't show the underline before the first key move.
6 years ago
onde2rock 74a06d98a2 [chore] Code cleanup : deprecate the 'Enter' event, replaced with 'Press' (#3815)
'Escape' now do 'Back' on SDL
'Enter' now do 'Press' on SDL
6 years ago
onde2rock e502bf04d3 [feat, UX] Support the virtualKeyboard on non touch-device (#3796)
* [VirtualKeyboard] Add support for keynaviguation

Also rename the variable "layout" to "keyboard_layout" because conflict
with the layout from the focusmanager

* Make the goto dialog compatible with key naviguation

My solution is to change the order of the widget. The last one will the
virtualkeybard so it catch all the keybinding, and below it, make the
dialog "is_always_active = true" so it can receive touch event.

* Correctly show the virtual keyboard on dpad devices

* change the order to call the virtualKeyboard so it end up on top

* Handle the multi input dialog

* Support reopening the virtualKeyboard by the Press key

* add check focusmanager

* Fix https://github.com/koreader/koreader/issues/3797

* MultiInputDialog : Now work on non touch-device

* Set the virtualkeyboard to be a modal widget

* Fix the layout in multiinputwidget

* Fix for the various combination of
hasKeys,hasDpad,isTouchDevice

* [Focusmanager] Better handling of malformed layout
6 years ago
Frans de Jonge 3838aab169
[fix] calibrecompanion.plugin (#3799)
Fixes #3794. 

Upstream luasocket 96965b179c switched from just `socket.udp()` to `socket.udp4()` and `socket.udp6()`.
6 years ago
onde2rock dfd87447da [UX] Make the reader bottom menu compatible with key navigation (#3785)
* [toggleswitch] Add support for key navigation to this widget

Add the onFocus an onUnfocus event handler
add a new function that just circle the switch if not touch event is
detected

* Add key navigation to the readermenu

The shortcut is still Alt-gr on sdl, to be defined on Kindle

* Remove the old method of handling the Press key.

Now the event is handled by the main widget who implement focusmanager
and then dispatched to the currently focused item.
Modify the fine font tuning only for non touch-devices

See : https://github.com/koreader/koreader/pull/3785#issuecomment-375306466
6 years ago
poire-z 79448ac046
coverbrowser: fix some vertical alignments (#3779)
introduced by the recent correction to UnderlineContainer.
6 years ago
poire-z b3b7e3d279 Remove some leading and trailing newlines (#3768)
in some InfoMessage and ConfirmBox, introduced willingly
or not, that cause top or bottom padding
6 years ago
poire-z 0fde66c2c6
BookInformation: speedup getting EPUB metadata/cover (#3767)
coverbrowser: also plug optimised callback to the right
button ("Book information" was shifted when "Open with..."
was added)
6 years ago
poire-z 04350a8409 coverbrowser: fix some texts (#3764) 6 years ago
poire-z 9858060c56 [lang] coverbrowser: fix some texts (#3759) 6 years ago
onde2rock e8aab49ee9 Kindle4NT improvements (#3745)
* [device][kindle4] add fake event to kindle4

* modify focusmanager to allow for more complex layout

The focusmanager now naviguate the layout by avoiding nil value
instead of relying on table lenght. It should be completely backward
compatible

* add Dpad naviguation to the touchmenu

* fix crash because virtualkeyboard on non touch device

the kindle4NT has no keyboard nor touch, the fix open the virtual
keyboard so koreader dont crash but it's not useable

* Enable device with keys to use the touchmenu

* Don't get stuck in reader progress statistics plugin

* [underlinecontainer] Fix and remove unused function

References #1898.
6 years ago
poire-z 9849d89f0e
coverbrowser: allow for batch metadata extraction (#3750)
This adds a button to the Tap Plus menu, that allows
extracting metadata and cover images for books in
current directory. Info about the process and questions are
initially shown and asked, and the process can be aborted at
any moment.
6 years ago
Frans de Jonge 18baf5b7ba
[fix, i18n] plugins/goodreads.koplugin: make untranslated string translatable (#3751)
Fixes #3748.
6 years ago
cramoisi ac3325fb95 [typo] PerceptionExpander: main.lua fix typo (#3747)
correcting a typo (as requested by @Frenzie) in line 18  name = "percepton_expander", =>     name = "perception_expander",
6 years ago
poire-z c5b547f6b3 Fix some minor plugin errors on exit (#3739) 6 years ago
poire-z db31bd4b96
coverbrowser: quicker extraction of EPUB metadata (#3736)
bump crengine:
Allow for quicker loading when interested in metadata only.
Allow for more than 65535 different attribute values.
Increase gamma values range.
6 years ago
poire-z fdb8dfd295
Set default 'cre_storage_size_factor' also in coverbrowser (#3733) 6 years ago
poire-z a8e71706b1 coverbrowser list view: show book status (#3708)
Replace reading percentage with 'Finished' or 'Abandoned'
when book status is no more 'Reading' (can be changed back
via Book Status widget).
6 years ago
poire-z 3c857e4016 coverbrowser: keep up to date with recent core changes (#3707)
Remove the subprocess management functions from xutil.lua, as they were
moved into base/ffi/util.lua, and use them from there.
Also use the cre_storage_size_factor setting when processing credocuments,
to avoid CRE WARNING while indexing too.
Fix dealing with MuPDF document opening failures (previously, these
were not noticed and indexing was retried each time).
6 years ago
mwoz123 83b88fcbcd send2ebook: Download all files from ftp server(Not only epub). Show failed download number (#3702) 6 years ago
Frans de Jonge 40ff967615
[fix, lang] Send2Ebook: remove stray space (#3694) 6 years ago
mwoz123 25a67a2e17 Send2Ebook (receiver) plugin (#3681) 6 years ago
Frans de Jonge 0c7bba225f [fix] KoboLight: typo (#3672) 6 years ago
Frans de Jonge 91bbfc4190 [i18n, fix] KoboLight plugin: fix up text issues (#3665) 6 years ago
David Engster af694a3d89 kobolight.plugin: Support for setting natural light
Add new swipe zone on the right border to change 'warmth' value for
natural light.
6 years ago
mwoz123 c63d31f8d5 NewsDownloader: Message with details when invalid configuration. (#3658) 6 years ago
mwoz123 016c17e616 NewsDownloader: better exception handling and basic redirects (#3652) 6 years ago
mwoz123 d0f9b53eb3 NewsDownloader externalize download engine (#3618) 6 years ago
Frans de Jonge 7d7280a1dd
[fix] NewsDownloader: non-existent logger.error to logger.err (#3643) 6 years ago
poire-z ba389c9a00
epub metadata: support multiple authors (#3624)
crengine may now give us multiple authors (if multiple <dc:creator>
in epub metadata) separated by \n.
Deal with that where needed.
Limit the number of authors displayed in coverbrowser views.

Bumped base/crengine: multiple <dc:creator> + fix mobi images order
Bumped base: util.runInSubProcess(): give child its own process group
6 years ago
mwoz123 1d0a5b4aa3 [feat] Add NetworkManager:beforeWifiAction() to enable optional auto-connect (#3482) 6 years ago
Frans de Jonge 21274f5e92
[feat] Add NetworkManager:isConnected() (#3593)
This enables connecting to calibre and FTP without Internet connectivity.
6 years ago
Hzj_jie 65f26cecbb Do not execute background runner if device is suspended (#3608) 6 years ago
Robert cffe95b54a DoubleKeyValuePage: make PgUp and PgDown key go to prev/next page (#3601) 6 years ago
poire-z 7797c2369e
credocument: deal with loadDocument() failures (#3570)
cre:loadDocument() may fail in recognizing the document format, and
koreader would previously keep calling other methods on it, which would
make crengine segfaults. We now check loadDocument success at the
various places it is called, and try to deal the best way we can when it fails.
6 years ago
Ben Kelly f9ac8b138b Basic fixes to calibre-sync (#3558)
* Properly create intermediate directories when receiving books from Calibre.

This fixes an issue where you can't receive books except into directories that
already exist on the Kobo, which, in particular, causes problems when your
configuration in Calibre is something like "put books in $Author/$Title.epub"
and you haven't previously synced any books by that author.

* Wake up periodically to process ZMQs if any are registered.

This fixes an issue where if there are any timed events (such as the suspend
timer) in the queue, ZMQ events may not get processed until the timed event
fires, which is a problem when (for example) the suspend timer goes off in
an hour and you have something trying to send a book to the kobo over wifi
*right now*.

With this change, the event loop will wake up every 50ms to check for ZMQ
events and process them if necessary. If there are no ZMQs registered (which
is typical), it uses the original behaviour -- so this won't affect battery
life under normal usage.
6 years ago
Robert a692b5adfb KeyValuePage: option to align value to the right (#3550)
Applied in Reading statistics plugin
6 years ago
Robert efa0d06df9 Add new options to screensaver (#3535)
* Prevent open screensaver more than one in the same time

* Add option to enable/disable background in message screensaver

* fallback to random images if this book cover is excluded feature + fix Disabled (leave screen/page as it is)

* Autostretch disable by default, more fallback options, leave screen as it is
6 years ago
Robert a6de9ff7d4 [UX] Right align keyvaluepage in statistics (#3507) 7 years ago
mwoz123 6d1e185555 NewsDownloader: Number items in processing InfoMessage (#3467) 7 years ago
mwoz123 456e31a358 NewsDownloader: Compatibility for users with previous configuration files (#3445) 7 years ago
mwoz123 c2bed639e3 NewsDownloader: wifi off prompt after download (#3395) 7 years ago
mwoz123 424593ca7c NewsDownloader: Remove NewsDownloader files from history (#3424) 7 years ago
mwoz123 97a72e2dd4 NewsDownloader: use feed.description as news context instead download full web page (#3426)
Fixes #3425.
7 years ago
Robert e1019baf46 separate strings for singular and plural (#3420) 7 years ago
mwoz123 23ab33c0b9 NewsDownloader promptWifiOn (#3388) 7 years ago
poire-z c573bdd610 CoverBrowser: some optimizations
Speedup initialization (needs to be done only once, and avoid
saving current mode to sqlite each time) and reader-to-filebrowser
switch, by doing a single rendering (instead of 2 or 3 previously).
ListMenu: cache sidecar file parsing results (page/percent
completed) for the browsing session duration.
Fix "No choice available" when on last page and changing
to a display mode with less pages.
7 years ago
poire-z c15915a4ee Added util.getFriendlySize() (#3381)
* Added util.getFriendlySize()

* Allow for GB
7 years ago
Robert 3c99600835 close button alignment (#3367) 7 years ago
Robert 9f50ef696f [Goodreads] lookup improvement (#3354)
* add navigation button (next, prev) on the bottom of screen
* flash item when selecting
* small lookup improvements
* fix refresh "Please wait..."
7 years ago
poire-z 561caadc5c Avoid recalculation of partial_md5_checksum at each opening (#3352)
This is done by/for kosync plugin at each opening, because
the docsettings was re-opened and saved for this, but later
overwritten by the current koreader docsettings - so it was
redone each time. This correctly adds this partial_md5_checksum
to the current koreader docsettings, which will be saved on
document closing - so it will not be redone next time.
Note: this partial_md5_checksum is not (yet) used by anything.
7 years ago
poire-z efd0d4f0de calibre 'series' metadata fixes (#3349)
Decode XML entities in series metadata and display decimal in series number
if any.
7 years ago
Robert 31f8372c87 [fix] Statistics: onPosUpdate and save stats when closing document (#3332) 7 years ago
poire-z 66e521f34b Fix stats in cre scroll mode (#3331) 7 years ago
Robert ddf700043d [ReadTimer] Time from now (#3311) 7 years ago
Robert 0b2b2bbc2b refresh footer (#3313) 7 years ago
poire-z b483c54be8 Fix footer, stats, TOC position with cre in scroll mode (#3304)
This gives the page position to these modules even in scroll mode.
Also, in readerrolling: don't query battery/charging status
when crengine does not need it (used only when it shows its top
progress bar).
7 years ago
Robert ceb7cf9771 Migrate Goodreads to https (#3298) 7 years ago
poire-z b55265ba91 CoverBrowser: avoid crash when indexing some cre documents (#3293) 7 years ago
Frans de Jonge 23e2183931 [fix] KOSync plugin server location (#3288)
This is only step one. It remains to be determined why the connection is downgraded to sslv3, which will result in a handshake failure.
7 years ago
Robert f45188fb9d Time reader with normal time format v2 (#3279) 7 years ago
poire-z e350e0e35a CoverBrowser: use a cache for crengine books extraction (#3277)
We previously disabled cache, but that may cause excessive
memory usage with big books. We now use a temporary
cache directory, that we clean when no more needed.
7 years ago
poire-z 48d888bedb CoverBrowser: use MuPDF for down-scaling images (#3272) 7 years ago
Robert 8d765e7d0d Add back button to statistics (#3267)
Closes: #3236 and #3235
Details:

> Also, when looking in days, we see info how many hours we read. It would be great if we could tap a day, it opens info on book(s) we read that day with info pertaining to that day, and if we tap on book, we receive book info for that book.

>  Statistics plugin is really great, I started to look in my reading statistics now much more, but all the time I can go only in one way. And I need to exit at lowest level of info. It would be great if I can use statistics plugin like part of menu, to go up and down within statistics data and exit at my wish, not when I have to.

Also added:

 * new statistics book by week
 * new statistics book by month
 * last year by week now we can see days in selected week
7 years ago
Frans de Jonge ff3ca5d98d [Android] Enable CoverBrowser (#3264)
I was reminded by @KenMaltby that this is disabled on Android.

https://www.mobileread.com/forums/showthread.php?p=3586162#post3586162
7 years ago
mwoz123 e7da93da89 Adapt ND to changes in code where 0 means no limit (#3258)
+ reorganize config, improved comments
7 years ago
Frans de Jonge 8f3a5353e5 [fix] statistics: typo (#3252) 7 years ago
Frans de Jonge a6be301695 Added Size module 7 years ago
Frans de Jonge 9eb073a524 [travis] Add protection against unscaled sizes
As pointed out by @poire-z

* [fix, UX] SkimToWidget scaling

* [fix] Button scaling

* [fix, UX] Scale ProgressWidget

* [fix, UX] Scale confirmbox

* [fix, UX] Scale just about everything
7 years ago
Robert f0b9a66359 Book information for all books (#3250) 7 years ago
poire-z 4d18ac1100 Some History fixes and enhancements (#3247)
Made the onHold buttons table similar to the one of File browser.
Added "Purge .sdr" and "Delete" to these buttons.
Moved the purgeSettings and removeFileFromHistoryIfWanted
logic into filemanagerutil functions.
Stay on the same page when manipulating history (previously, we were
always put back on first page).
Really keep deleted files in history (unless setting says otherwise).
Show deleted files in grey or dimmed in classic History and all
CoverBrowser display modes.
7 years ago
Robert 019513f785 Prevent crash Timer in Filemanager (#3237) 7 years ago
Robert 2c3936ddb4 Refactoring readerfooter statistics - TB and TC (#3223) 7 years ago
Robert 7c88bad189 [fix] Statistics settings reset to default when on save without change (#3188)
* Fix: #3186
7 years ago
Robert e5eb015f1b Statistics in bookstatuswidget (#3218) 7 years ago
Robert b617efa21f Disable Current book when statistics are disabled (#3210) 7 years ago
Robert 392209c200 Change message after import (#3197) 7 years ago
Robert c948472b66 On monthly statistics we can see the daily stats (#3175) 7 years ago
Robert 807c4a256d Fix problem with import old .stat files (#3195) 7 years ago
Hzj_jie 12af617b46 Revert last change to autofrontlight.koplugin 7 years ago
Robert a003b375c2 Fix: Remove primary key from page_stat (#3157)
* Fix: Remove primary key from page_stat

* Fix: Prevent crash on Reading progress when no data from last 7 days

* Add indexes
7 years ago
Hzj_jie 1ff46a67b4 SwitchPlugin and BackgroundTaskPlugin with tests (#3137) 7 years ago
Frans de Jonge a8d65aad35 [fix] Statistics: translation (#3151)
* [fix] Statistics: translation
7 years ago
Robert 7cec63e77a database name change to statistics.sqlite3 (#3147)
Clearer filename.
7 years ago
Robert 0e2d20353a Statistics plugin v2 (SQLite) (#2893) 7 years ago
poire-z 2595dbb0ec Add some settings to Display mode/Other settings menu (#3129) 7 years ago
Hzj_jie b89435b432 Move PluginShare.backgroundJobs into PluginShare module (#3128) 7 years ago
poire-z 031df2ffee Added PicDocument:getCoverPageImage() and :getProps()
So an image file can have a cover in coverbrowser's display.
It also allows for an alternative viewer (ImageViewer widget)
when holding on file / View full size cover.
7 years ago
poire-z cf95f5e8d3 Ensure TextWidget's width and heigth are integer
And removed workarounds in coverbrowser plugin.
7 years ago
poire-z b4e7dc947c Added TextBoxWidget.has_split_inside_word flag
Used by coverbrowser's Text covers to choose the best font size.
7 years ago
poire-z 3b5cd4c23b CoverBrowser plugin: alt views for File Browser and History (#2940)
* CoverBrowser plugin: alt views for File Browser and History

* Added Prune cache and Compact cache menu actions

* Support for book descriptions, and settings stored in db
7 years ago
robert00s ddd36d4150 Fix: Zsync -> Share this document crashes 7 years ago
Frans de Jonge 16dd5170b8 Newsdownloader: add HTTPS support and fixes
* Fixes #3041 (HTTPS)
* Fixes unlimited (limit = 0) was broken
* Fixes titles and links with attributes
7 years ago
Hzj_jie a8513c95b6 Several minor fixes (#3057)
1. Android.getScreenBrightness() is used in frontend/device/android/powerd.lua to retrieve the frontlight intensity.
2. kosync.koplugin won't save settings for whisper sync.
3. batterstat.koplugin won't work correctly if several on* events are fired.
7 years ago
Frans de Jonge b4167672fd Read timer: various improvements
* no timeout on alarm
* autoclose menu when starting timer
* show time in menu when active
7 years ago
Hzj_jie c9a997f42c BackgroundRunner (#3008)
* Use getCapacityHW() to ensure latest battery capacity can be retrieved

* BackgroundRunner

* Start background_runner_spec.lua

* AutofrontLight plugin now uses BackgroundRunner plugin
7 years ago
robert00s a675d21e34 Enable text justification in GoodReads review 7 years ago
mwoz123 b0cf2ca18a News downloader settings menu entry (#2990)
Placeholder with info.
7 years ago
Hzj_jie e67ff2ab98 Use PluginShare to exchange data between plugins (#2981) 7 years ago
Hzj_jie 4ec96e377a Use getCapacityHW() to ensure latest battery capacity can be retrieved 7 years ago
Hzj_jie 970f2e7306 Several improvements of AutoFrontlight plugin and enable it by default (#2975)
* Force refresh when kindle is out of screensaver or usb is unpluged.

* Improve AutoFrontlight

* More plugins sub menu

* Last brightness should always be updated

* Finish autofrontlight improvement and enable it by default.

* More tets

* onFlushSettings

* MenuSorter can now correctly sort sub menus
7 years ago
Hzj_jie 7d2ed4c3d0 Move kobo auto-suspension logic out of UIManager (#2933) 7 years ago