Commit Graph

3832 Commits (991ac62ac15cb7f50cfc8fac65f674a71f79c2a4)

Author SHA1 Message Date
yparitcher 7849d58a76
Fix footer update on `UpdatePos` event (#6392)
Regression from 70f89c4d (#6292).
4 years ago
Galunid 62daa7b783
Implement numeric collator (natural sorting) in file manager (#6378) 4 years ago
yparitcher 1db2b7d875
better logic for #6386 (#6388) 4 years ago
Frans de Jonge 9a5b659a46
[fix, lang] Filemanager → file browser consistency (#6387) 4 years ago
yparitcher 6671d984ed
SetNightMode event & Night Mode refresh rate (#6386)
If the user has not set a separate refresh rate for night mode
the default one will be used, as was the previous behavior

Closes: #5019
Closes: #6094
4 years ago
zwim 4349272d9c
[UX] German keyboard layout qwertz (#6385)
Add support for German keyboard. It's mainly en_keyoard.lua with changed z/Z and y/Y.
4 years ago
NiLuJe a8da762955
Initial handling of the upcoming Kobo Nia (#6380)
Obviously untested ;p
4 years ago
yparitcher bda44a99ef
Dispatcher: use sections (#6364)
use `device` `filemanager` `rolling` and `paging` sections to organize the
dispatcher menu and allow the user to know when the action will apply

add events from ReaderGesture

allow profiles in FM
4 years ago
NiLuJe 4e5def4282
Tame a few tests that relied on `pairs` being somewhat deterministic (#6371)
* Mangle stupid defaults test so that it compares tables, and not a non-deterministic string representation of one.

It's still extremely dumb and annoying to update. (i.e., feel free to kill it with fire in a subsequent PR, I think everybody would cheer).

* Rewrite DepGraph to be deterministic

i.e., fully array based, no more hashes, which means no more pairs randomly re-ordering stuff.

Insertion order is now preserved.

Pretty sure a couple of bugs have been fixed and/or added along the way
;p.

* Resync frontend/apps/filemanager/lib/md.lua w/ upstream

And use orderedPairs in the attribute parsing code, just to make that stupid test happy.
4 years ago
yparitcher 70f89c4df1
ReaderGesture: cleanup (#6292)
convert all gesture actions to use events for better modularity
add network event handlers and device event handlers
4 years ago
Martín Fernández 1adea4a497 Add macOS target
Co-authored-by: Jason Benwell <jbenwell@hotmail.com>
4 years ago
Martín Fdez a376a52c3a easier user font paths with Device.home_dir 4 years ago
NiLuJe 509ee7bb86
Allow locking the gyro to the current screen mode (#6347)
* Allow locking the gyro to the current screen mode (i.e., orientation).
* Tweak the "sticky rota" option to work both ways
* More rotation constant usage instead of magic numbers
4 years ago
Martín Fernández f9293a67b0
[fix] Remove isAllowedScript leftovers (#6366)
Fixes #6365
4 years ago
Martín Fdez 8324154177 keep newlines outside translations 4 years ago
Martín Fdez 7094519e1b android: support for native surface rotation 4 years ago
yparitcher 8f2399caa9
[fix] Allow default FM rotation on init when `Keep FM rotation` is disabled (#6348) 4 years ago
yparitcher f7d538b108
Landscape FM / Refactor rotation (#6309)
* landscape FM / Refactor rotation

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

* bump base

update luasocket, libjpeg-turbo, curl
add logging to evernote-sdk-lua
update framebuffer for proper rotation
4 years ago
Frans de Jonge 09c654c7ec
[chore] Simplify OPDSBrowser http.request handling (#6334)
Cf. <https://github.com/koreader/koreader/pull/6307>.
4 years ago
Frans de Jonge bb376fb16b
[feat] Add text/html to OPDSBrowser (#6335) 4 years ago
Frans de Jonge 4a3710b6d3
[i18n] Add support for fledgling Hebrew translation (#6333)
See <https://hosted.weblate.org/languages/he/koreader/> if you'd like to contribute.
4 years ago
Frans de Jonge 86db43a052
[UX] Move double tap to gesture manager (#6322)
Also replaces the default with +10/-10 pages instead of prev/next chapter.

Closes <https://github.com/koreader/koreader/issues/2721>.
4 years ago
yparitcher 5795e6d63c
Dispatcher: fix table (#6324)
accessing the table via reference rather than copying the values was breaking the configdialog
4 years ago
Frans de Jonge 7a37accdcc
[UX] Add left to close to ConfigDialog for hasFewKeys (#6318)
Follow-up to <https://github.com/koreader/koreader/pull/6195>.

Part of <https://github.com/koreader/koreader/issues/4029>.
4 years ago
Frans de Jonge 060ee98048
[feat] FocusManager: wrap around horizontally (#6315)
There doesn't seem to be a reason not to, but it could be limited to `Device:hasFewKeys()` if desired.

Cf. <https://github.com/koreader/koreader/pull/6312#issuecomment-650207697>.
4 years ago
Martín Fernández 32207523b0
emulator: add fake network manager (#6314) 4 years ago
roshavagarga 46bf88c573
Add PocketBook 614W (Basic 3) definition (#6312)
Cf. <#6311>.
4 years ago
zwim 43693c9fe9
Add the possibility run shell scripts from filemanager on android (#6288) 4 years ago
poire-z 9385728769
Bookmarks prev/next via gestures: add location to stack (#6306)
Was correctly done when jumping bookmarks via the Bookmarks
menu and the SkimTo widget, but not from gestures.
Also prevent fillToc() on each page turn when book has no TOC.
4 years ago
poire-z 71744688c7 Style tweaks: use 0.8rem instead of 80% for in-page footnotes 4 years ago
poire-z 8a568a2721 bump crengine: add support for <ruby> elements
Includes:
- Fix some non-recursive subtree walkers
- Text: skip formatting optimisations when inlineBoxes
- CSS parsing: parse selectors starting with [attrib]
- Use T="" for internal elements attributes
- CSS: re-order css_d_* (display) enum for easier checking
- Rendering methods: remove erm_table_cell
- Rendering methods: remove erm_table_caption
- Rendering methods: remove erm_list_item
- getRenderedWidths(): better estimate table width
- styleToTextFmtFlags(): adds is_block parameter
- Adds support for "display: ruby" and <ruby> elements
- Fix prev/next-VisibleWord-Start/End() with CJK text

Also bump HarfBuzz to 2.6.8 and evernote-lua-sdk.
4 years ago
Galunid f09a4e7c8e
Translator: Add definition of the word to the translation (#6295)
closes #6293
4 years ago
NiLuJe ff1e50c5c0
Don't rotate BookStatus & ReadingProgress in screensavers. (#6286)
They're full-screen, and they work fine in Landscape.

re: #5724

* Fix multiline indents in the Kindle c/p ;p
4 years ago
yparitcher a9d4e97115
[plugin] Dispatcher: for profiles & gestures (#6106)
add a Dispatcher module that allows for dispatching multiple events at once.
This will allow for profiles & for gestures that do multiple things.

it has 2 methods:
Execute which is given a kv table of settings to change and fires an event for each of them.
addSubMenu adds a menu item to a menu to allow for modifying which events are called
it also has settingsList which is a master table of all allowed setting and their corresponding info
(it is mostly from ReaderGesture and needs a lot of work)

to allow for a new setting all one has to do is add a entry to settingsList with a corresponding event and it will work out of the box.

the profile plugin is right now still a stub, just to test Dispatcher. the plan is to finish it and eventually refactor ReaderGesture to rely on this.
This also needs effort to move many functions out of reader gesture into events where they belong.
4 years ago
Martín Fernández 88feefe788
[chore, UX] Move some 'permanent' settings inside more_tools (#6282)
Err, kind of nitpick PR. Is just add some "permanent" menus other than plugins to the new "more_tools" submenu. So it will never be empty.

Follow-up: #6279
Supersedes: #5512 #6092
Fixes: #5461
4 years ago
Martín Fernández 83cde64bcc
unified calibre plugin (#6177)
joins calibre metadata search and calibre wireless connections into a single plugin

search metadata changes:

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

calibre wireless connection changes:

- keep track of books in a library (includes prunning books from calibre metadata if the file was deleted locally)
- remove files on device from calibre
- support password protected connections
- FM integration: if we're in the inbox dir it will be updated each time a book is added or deleted.
- disconnect when requested by calibre, available on newer calibre versions (+4.17)
- remove unused opcodes.
- better report of client name, version and device id
- free disk space checks for all calibre versions
- bump supported extensions to match what KOReader can handle. Users can override this with their own list of extensions (or from calibre, by configuring the wireless device).
4 years ago
Martín Fernández 2e731dd4dd
[chore] Device abstraction (#6280)
* generic Device:info() function which returns the model

* add Device:canSuspend() and make it true in all devices that have suspend routines and the emulator

* also enable fake poweroff/reboot on the emulator

* add Device.home_dir

* add Device:hasExitOptions() and update menus & comments
4 years ago
Frans de Jonge f3489cdd24
[chore] Rename 'More plugins' to 'More tools' (#6279)
More tools is a submenu in the tools menu, not in the plugins menu. That everything in there happens to be plugins is merely a technical detail and not considered part of the unifying menu vision. Plugin management should be last as it is because it's only used once in a blue moon, if it should be in the tools menu at all. The same applies to settings more broadly. Putting plugin management in the tools menu is traditional, however.

Plugins should not and are not supposed to be most at home in the tools menu. Those plugins that happen to be in the tools menu are by and large there because that's where they fit best. Those that don't are new and I didn't have the heart or energy to make much of a fuzz about it provided they had a reasonable claim to the tools menu. That includes plugins like tweak document settings which should be more at home in settings → document.

Also see <https://github.com/koreader/koreader/issues/6105#issuecomment-621653800>.
4 years ago
Galunid cd440acdc4
Add chapter title when exporting notes in Evernote (JSON/HTML, remote) (#6146)
closes #4566
closes #6138
4 years ago
poire-z 5aab341ed0
Fix bottom menu item titles truncation (#6273)
Revert bit from #6267 , see https://github.com/koreader/koreader/pull/6267#issuecomment-644903608.
4 years ago
Martín Fernández 765b35a7bf
android: add a toggle to ignore back button events (#6269)
Requires koreader/android-luajit-launcher#233
Requires koreader/koreader-base#1117

It is a workaround for #6263 but can be useful on some devices with erratic back key behaviour too (yep, Onyx)
4 years ago
NiLuJe b23af97914
Fix partial HW dithered refreshes sometimes appearing to shift refreshed content (#6267)
* Fix HW dithered partial refreshes sometimes behaving as if the refreshed
content had moved a few pixels to the side...

Probably a kernel issue with the alignment fixup in the EPDC?

* Get rid of the legacy coordinates fixup

It shouldn't be necessary anymore.
And I'd rather fix the root cause, anyway.

* Bump base

(https://github.com/koreader/koreader-base/pull/1116)

* Missed a few DIVs in #6224
4 years ago
Martín Fdez 835f9f62c6 fix ANRs in Kosync plugin login/register 4 years ago
NiLuJe 1f994f8ede
Floor dimension computations (mul/div). (#6264)
* floor most every dimension computations involving MUL or DIV
Should avoid passing nonsensical floating point coordinates/dimensions
to the UI code.

* Update base

* https://github.com/koreader/koreader-base/pull/1113
* https://github.com/koreader/koreader-base/pull/1114
* https://github.com/koreader/koreader-base/pull/1115

* Bump android-luajit-launcher

https://github.com/koreader/android-luajit-launcher/pull/230
https://github.com/koreader/android-luajit-launcher/pull/231
4 years ago
NiLuJe 1384b5e97d
A few footer tweaks (allow setting height through UI) (#6257)
* * Refresh the footer instantly when changing the prefix, separator, or
  formatting.
* Allow setting the container height (formerly
  DMINIBAR_CONTAINER_HEIGHT)
* Allow setting the container bottom padding (formerly 1 flex pixel)
* Refactor ReaderFooter:applyFooterMode
  Handle toggling the genFooterText function even in all at once mode
  Make sure the layout is properly reset when changing visibility state,
  to avoid inconsistencies with complex layouts.
4 years ago
Frans de Jonge 23862fd0eb
[[doc] Add documentation to optmath (#6258)
See <https://github.com/koreader/koreader/pull/6255#discussion_r438648691>.
4 years ago
Martín Fernández 2f831bebc7
android: replace default footer margins by values that work with rounded corner devices (#6260)
That's it: replace "static 10px" margins by a value that takes device DPI into account and works with rounded corner devices.

Fixes #6157
4 years ago
NiLuJe e3f978be2c
Allow automatically marking the book as read on end of doc (#6256)
Keep showing the "mark as" option/button, though, because that one is a
toggle, it doesn't enforce the "read" status.
4 years ago
smartscripts-nl 23ab5750c3
Fix missing glyphs Ï and Ö in keyboard popup (#6254)
Fixes #6221.
4 years ago
Martín Fdez 3e3ddbfc4b desktop: don't show which results on console 4 years ago