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

302 Commits

Author SHA1 Message Date
Matias N
94d8f2d397 Sony PRSTUX support (#4198)
* Sony PRSTUX support
2018-09-08 01:37:04 +02:00
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
2018-09-04 23:55:58 +02:00
Frans de Jonge
5eff127cf6
[fix, lang] Typo in Evernotes description (#4173) 2018-08-19 20:20:00 +02:00
Robert
5344e0b672 [Fix] Don't load disabled plugins (#4169) 2018-08-18 20:41:37 +02:00
Robert
4428ecb422 Plugin manager (#4159)
Also adds descriptions to all plugins.
2018-08-17 20:54:11 +02:00
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).
2018-08-10 18:05:09 +02:00
mwoz123
3fcd7344e4 News Downloader: feed config editor (#4126) 2018-08-07 21:03:43 +02:00
poire-z
a33827faf3 TextEditor: fix some wording (#4143)
Fix review comments around https://github.com/koreader/koreader/pull/4135#issuecomment-410823170
2018-08-07 20:52:32 +02:00
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.
2018-08-06 21:16:30 +02:00
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.
2018-08-01 19:29:03 +02:00
Robert
19b1c919d6 FileChooser, PathChooser: show current path in header (#4125) 2018-08-01 17:02:34 +02:00
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.
2018-07-29 03:53:57 +02:00
NiLuJe
7e97030a5c
Fix scp & sftp on Kobo/Kindle (#4108)
* Update dropbear path for the new, non-multicall binary

* Bump base to pickup dropbear changes
2018-07-25 20:01:55 +02:00
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".
2018-07-24 21:01:45 +02:00
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.
2018-07-19 08:18:55 +02:00
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).
2018-07-16 17:24:04 +02:00
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.
2018-07-15 18:39:52 +02:00
Robert
e977c4a394 Fix Reading progress display in landscape mode (#4074) 2018-07-15 10:04:48 +02:00
mwoz123
7eb2a32c5e send2ebook: fix corrupted files after download (#4063) 2018-07-11 17:10:21 +02:00
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
2018-07-07 13:03:33 +02:00
mwoz123
81798111c2 Option to show filename in Open last menu item (#4042) 2018-07-05 07:40:40 +02:00
mwoz123
27dfa30181 Send2ebook fix download after refactor from #3924 (#4027)
* fix send2ebook download after refactor from #3924

* restore removal from server
2018-06-29 20:37:39 +02:00
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
2018-06-02 12:10:55 -04:00
Robert
6fbb4e4ff4 [feat] Add default to the last value used in ReadTimer (#3963) 2018-05-19 23:29:16 +02:00
Frans de Jonge
fcc24fc7b1 [fix, i18n] plugins/SSH.koplugin: public SSH key info (#3947) 2018-05-14 20:37:00 +02:00
onde2rock
c0e80461ff [feat] Integrated Dropbear SSH server (#3842)
* Add a menu item to start an ssh server

* Add blank login option
2018-05-13 21:27:52 +02:00
Robert
e6518c4f68 Use RenderImage:renderImageData insteed of Pic.openJPGDocumentFromMem (#3930) 2018-05-05 15:07:16 +02:00
Robert
4bf4578d17 Add HTML widget in GoodReads review (#3929) 2018-05-04 23:44:09 +02:00
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.
2018-05-04 17:06:58 +02:00
onde2rock
dad7f209fa [CI] Add a check to detect tab in lua files (#3919) 2018-04-29 15:15:11 +02:00
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.
2018-04-22 17:00:29 +02:00
poire-z
9e4e71d630 coverbrowser: close sqlite db after init (#3897)
Don't keep a handle on bookinfo_cache.sqlite3 when
"Start with: last book"
2018-04-19 17:06:36 +02:00
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
2018-04-12 16:05:50 +02:00
poire-z
cc7ef363e5 [UX] CoverBrowser: set default display modes on first launch (#3834) 2018-04-06 18:14:49 +02:00
poire-z
eb613ace3e [chore] CoverBrowser: avoid page info code duplication (#3835)
Also allows full refresh with small diagonal swipe
of Menu instances (TOC, bookmarks)
2018-04-06 11:53:11 +02:00
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.
2018-04-01 15:35:05 +02:00
onde2rock
f893b01f04 [fix, UX] CoverBrowser: reset cursor (#3817)
Also don't show the underline before the first key move.
2018-03-31 07:59:12 +02:00
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
2018-03-30 23:22:18 +02:00
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
2018-03-30 12:46:36 +02:00
Frans de Jonge
3838aab169
[fix] calibrecompanion.plugin (#3799)
Fixes #3794. 

Upstream luasocket 96965b179c switched from just `socket.udp()` to `socket.udp4()` and `socket.udp6()`.
2018-03-25 21:37:30 +02:00
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
2018-03-22 21:01:38 +01:00
poire-z
79448ac046
coverbrowser: fix some vertical alignments (#3779)
introduced by the recent correction to UnderlineContainer.
2018-03-20 20:34:54 +01:00
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
2018-03-17 18:13:04 +01:00
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)
2018-03-17 00:28:37 +01:00
poire-z
04350a8409 coverbrowser: fix some texts (#3764) 2018-03-16 17:22:41 +01:00
poire-z
9858060c56 [lang] coverbrowser: fix some texts (#3759) 2018-03-15 13:45:32 +01:00
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.
2018-03-14 22:16:38 +01:00
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.
2018-03-14 18:14:52 +01:00
Frans de Jonge
18baf5b7ba
[fix, i18n] plugins/goodreads.koplugin: make untranslated string translatable (#3751)
Fixes #3748.
2018-03-14 15:50:35 +01:00
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",
2018-03-13 10:48:44 +01:00