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

1837 Commits

Author SHA1 Message Date
Robert
eed3a4b5a2 Fix setting contrast on non-touch devices (#4219) 2018-09-13 13:49:23 +02:00
Robert
a706fde2d7 Cleanup downloadmgr titles (#4222) 2018-09-13 13:20:09 +02:00
NiLuJe
2eabf1dfac
Reinstate the comment explaining the fiddling with regions in UIManager (#4203) 2018-09-08 03:29:55 +02:00
Matias N
94d8f2d397 Sony PRSTUX support (#4198)
* Sony PRSTUX support
2018-09-08 01:37:04 +02:00
NiLuJe
ababbd7aad
Enhanced visual feedback around tar & zsync! (#4194)
* Move Kindle scripts to FBInk
* Proper progress bars around tar invocations
* Spinner during zsync processing
2018-09-06 01:35:48 +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
NiLuJe
4320359b25
One more øMQ FFI fix that slipped through the cracks (#4188)
(Actually should be size_t, but gcc-lua downgraded that to the
pointed-to type, for... reasons?).

Fix #4187
2018-08-30 15:36:42 +02:00
poire-z
b2c89b93b6
Small keyboards updates (std, fr) (#4177)
Provided by @gerhaher: removed some duplicated keys, replaced
them with other useful ones (to swedish and kenyan people).
Stick cyrillic letter io to a single key
French keyboard: aligned to std.lua, fixed '.' and ',' keys.
2018-08-22 22:11:33 +02:00
poire-z
e1ba5ccffe Various minor fixes (#4172)
- css tweaks: use correct CSS "hyphens:" instead of "hyphenate:"
- screenshoter: more logical order of lines (no change in what it does)
- textviewer: make diagonal swipe really trigger a full refresh
- textwidget: more adequate text length to help with centering
- toggleswitch: fix sizing & centering with correct calculations
  (this reduces a bit the size of switches, and may cause a new
  truncation in some translations)
2018-08-19 20:21:03 +02:00
poire-z
6f2368e3bc
cre: configurable kerning method (off/freetype/harfbuzz) (#4167)
Bump base & crengine for HarfBuzz support.
2018-08-17 23:08:21 +02:00
Robert
4428ecb422 Plugin manager (#4159)
Also adds descriptions to all plugins.
2018-08-17 20:54:11 +02:00
Robert
225b5d417d Adds ReaderDeviceStatus: low battery alarm (#4144) 2018-08-11 22:47:33 +02:00
Robert
55dab14c71 Change title and button text in OPDS (#4155) 2018-08-11 22:30:10 +02:00
Frans de Jonge
8333754c13 Greek keyboard update (#4152)
By @embryo10, see https://www.mobileread.com/forums/showpost.php?p=3733400&postcount=2952
2018-08-11 22:19:49 +02:00
Robert
7e6802737e Sorting: adds Sort by name - mixed files and folders (#4140)
Also moves the 2 Sort by percent in a sub-menu
2018-08-10 22:26:07 +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
NiLuJe
d222fe25b6
Fix OTAManager tar invocations (#4150)
* Bump base

* Fix tar flag ordering in OTAManager

So that no-recursion actually gets honored, preventing us from creating
extra-large archives with unrelated content...
(Tar started being pickier about flag ordering in a recent version bump).

Fix #4147
Closes #4148 (by superceding it)
2018-08-10 17:19:50 +02:00
alethiophile
637abfdf84 Various changes to sorting (#4067)
Don't consider sidecar file when sorting by access time.
Rename 'sort by title' to 'sort by filename':
This is in accordance with the actual function of the code, which
uses filename rather than title as specified in file metadata.
2018-08-07 21:23:19 +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
1d18b01cf7
PathChooser: clearer usage and behaviour (#4133)
Explicit new options: select_directory, select_file, show_files.
With select_directory, show an entry to select current directory
(so, removed undocumented hack "hold on .. to select current
directory").
2018-08-06 20:59:01 +02:00
Robert
0732379130 Remove Storage statistics from menu (#4127) 2018-08-06 20:37:47 +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
poire-z
620542b055
Text input related fixes & enhancements (#4124)
InputText: checks whether provided content can be given
back unaltered, which may not be the case after it is
splitted to UTF8 chars if the text is binary content.
Prevent editing text if that is the case.
Adds InputText and InputDialog :isEditable() and :isEdited()
methods.
Also accounts for the scrollbar width when measuring text
to prevent it from being displayed when not needed.
Also ensure a minimal size of the scrollbar thumb so it is
rendered when huge text with many lines is displayed.

Virtual keyboard: Hold on Backspace: delete from cursor
to start of line instead of clearing all text content.
2018-08-01 18:33:52 +02:00
Robert
19b1c919d6 FileChooser, PathChooser: show current path in header (#4125) 2018-08-01 17:02:34 +02:00
Robert
c17864999e [fix] Show hidden dirs and files in Choose screensaver image (#4121)
Fixes #4117.
2018-07-29 20:49:50 +02:00
Robert
00a71a84ad Screenshoter: propose to set as screensaver image (#4113) 2018-07-28 20:18:31 +02:00
Robert
00cfc469f1 Allow selecting a single image as screensaver (#4095) 2018-07-23 10:37:24 +02:00
NiLuJe
fea0d8dbaf
Another set of fixes (#4083)
* Make findcalibre actually useful

By setting SEARCH_LIBRARY_PATH when a Calibre tree is found, so that
book paths can properly be constructed.

Users should still very much set it themselves, but at least everything
works as intended when not, instead of mysteriously half-breaking later.

Drop the SetDefaults bits, it appeared to have been added to fix no-ops
detected by Luacheck, and it's actually non-functional, because
SetDefaults doesn't handle saving variables it did not itself assign.
So this was just causing the "Do you want to save new defaults" popup to
show up on exit, but it couldn't actually do anything useful (like, say,
save the new SEARCH_LIBRARY_PATH value).

fix #4082

* Better comments about the state of NaturalLight on the Clara, and how this might translate to the H2O²r2.

re #4015

* Make ScrolltextWidget refresh as "partial" only on actual Scroll events

Moving the cursor should stay "ui", or things gets annoying really fast
;).

re #4084

* Bump base to pickup ZMQ fixes (fix #4086)
2018-07-21 21:51:25 +02:00
poire-z
0d66ea7555
Text input fixes and enhancements (#4084)
InputText, ScrollTextWidget, TextBoxWidget:
- proper line scrolling when moving cursor or inserting/deleting text
  to behave like most text editors do
- fix cursor navigation, optimize refreshes when moving only the cursor,
  don't recreate the textwidget when moving cursor up/down
- optimize refresh areas, stick to "ui" to avoid a "partial" black
  flash every 6 appended or deleted chars

InputText:
- fix issue when toggling Show password multiple times
- new option: InputText.cursor_at_end (default: true)
- if no InputText.height provided, measure the text widget height
  that we would start with, and use a ScrollTextWidget with that
  fixed height, so widget does not overflow container if we extend
  the text and increase the number of lines
- as we are using "ui" refreshes while text editing, allows refreshing
  the InputText with a diagonal swipe on it (actually, refresh the
  whole screen, which allows refreshing the keyboard too if needed)

ScrollTextWidget:
- properly align scrollbar with its TextBoxWidget

TextBoxWidget:
- some cleanup (added new properties to avoid many method calls), added
  proxy methods for upper widgets to get them
- reordered/renamed/refactored the *CharPos* methods for easier reading
  (sorry for the diff that won't help reviewing, but that was needed)

InputDialog:
- new options:
   allow_newline = false, -- allow entering new lines
   cursor_at_end = true, -- starts with cursor at end of text, ready to append
   fullscreen = false, -- adjust to full screen minus keyboard
   condensed = false, -- true will prevent adding air and balance between elements
   add_scroll_buttons = false, -- add scroll Up/Down buttons to first row of buttons
   add_nav_bar = false, -- append a row of page navigation buttons
- find the most adequate text height, when none provided or fullscreen, to
  not overflow screen (and not be stuck with Cancel/Save buttons hidden)
- had to disable the use of a MovableContainer (many issues like becoming
  transparent when a PathChooser comes in front, Hold to paste from
  clipboard, moving the InputDialog under the keyboard and getting stuck...)

GestureRange: fix possible crash (when event processed after widget
destruction ?)

LoginDialog: fix some ui stack increase and possible crash when switching
focus many times.
2018-07-19 08:30:40 +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
Robert
5caabfb174 OpenWithDialog widget: improved display (#4078)
- add refresh after tap Cancel button,
- radiobutton and checkbutton with the same font size,
- truncates text outside window,
- better control font face and size in OpenWithDialog
  and RadioButtonTable widgets
2018-07-15 22:48:19 +02:00
poire-z
665cb37308
VirtualKeyboard: scale icons to fit font height (#4069)
The 4 keys that use images could be too big or too small
depending on screen size and DPI. They are now scaled in
all cases to fit font height.
2018-07-11 17:24:37 +02:00
Robert
6220d05a34 Fix focus/unfocus in MultiInputDialog (#4060)
Also fix size of window DCREREADER_CONFIG_FONT_SIZE
in Advanced settings
2018-07-08 00:45:27 +02:00
NiLuJe
75df3fcea3
Dismiss Wi-Fi scan popup after connection (#4055)
* Add a config switch to automatically dismiss the WiFi scan popup on connect
2018-07-07 17:06:58 +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
Robert
1510e5d7ed Buttons: properly truncate text when too long (#4057) 2018-07-06 21:05:12 +02:00
poire-z
9e4db559ab
TouchMenu: properly truncate item text when too long (#4052) 2018-07-05 07:20:15 +02:00
NiLuJe
4ffd959df4
Handle OTA updates during the restart loop on Kobo/Kindle (#4049)
* Handle OTA updates during the restart loop on Kobo/Kindle

So we can actually process OTA updates without ever truly exiting
KOReader (i.e., via the "Restart KOReader" menu entry) ;).
2018-07-04 19:25:55 +02:00
poire-z
7d8ccda852
Style tweaks: re-order Allow hyphenation on all text (#4050)
Should be just below with the other Ignore publisher stuff
(as we allow hyphenation by default).
2018-07-04 12:43:10 +02:00
Robert
2484f0f3bc Style tweaks: adds Allow hyphenation on all text (#4047)
Also fix vertical-align for sub in 'Smaller sub- and superscript'
2018-07-04 12:10:38 +02:00
poire-z
a08416d2f8
Add some help texts to long press popup on bottom config titles (#4048) 2018-07-04 12:08:55 +02:00
NiLuJe
8089d916a5
Visual feedback around tar/zsync on Kobo during OTA updates (#4043)
* With a bonus version normalizer fix.
  * And a zsync bump/fix to avoid softlocks with OpenStack HTTP frontends (also, pull those from the OTA mirror list).
2018-07-03 23:16:45 +02:00
sebastien
71ff69ec4f cre word gap: use values from defaults.lua (#4045) 2018-07-03 15:29:04 +02:00
poire-z
d8e58a08fd
bump crengine: adds support for dpi-based css units (#4040)
Adds a new toggle to the bottom menu: Zoom (dpi), which
allows for scaling CSS absolute units and image sizes.
2018-07-03 07:05:57 +02:00
NiLuJe
ecd7b5b413
Minor font sanity checking (#4039)
* Discard dotfiles when looking for fonts
    So as not to pickup, among other things:
      * macOS resource forks
      * *nix hidden files (which may be stale fuse ghosts on Kindle)
* Update Kindle font blacklist
    Up to FW 5.9.6
    Basically blacklist anything non-LGC, requiring lab126's FT build, or FC tweaks.
    One day we'll fix CRe instead, maybe.
2018-07-02 15:58:27 +02:00
Robert
d29a65b96e cre: add Word Gap setting to bottom config panel (#4026)
Maps to crengine's Space Condensing feature (named Word Gap
as a similar feature is named for PDF)
2018-06-30 16:55:43 +02:00
NiLuJe
18db509325 Assorted bag of fixes (#4014)
* Link to the WiKi, it's a bit more explainy ;).

* More WiFi trickery for some HW revs

* Fix Rev2 detection under KSM

That's to future-proof it, the other end of this hasn't made it into
current KSM build yet.

* Resync nickel.sh w/ current rcS

We don't have CPU, but we have PLATFORM, which is based on CPU, so,
that'll do :).

* Go back to using rmmod instead of modprobe -r

Functionally identical on current FW, will potentially avoid getting
outsmarted by modprobe if Kobo ever deigns shipping an actually usable
Linux system one day...

* Don't crash if screensavers directory doesn't exist

c.f., https://www.mobileread.com/forums/showpost.php?p=3706979&postcount=2919
2018-06-16 23:05:20 +02:00
poire-z
6e8cb23d33
bump crengine: fix drawing position of bottom and right borders (#4013)
Also let tap propagate when a Notification is displayed.
2018-06-14 21:53:43 +02:00
poire-z
c3a938aad6
bump crengine: alternative TOC, no page break on borders (#4011)
Includes:
- Avoid page break between a node and its borders
- Allow building an alternative TOC from document headings

On CRE documents, allows toggling between original TOC and an
alternative TOC with long-press on the "Table of content" menu
item.

Also update the Wikipedia stylesheet to further avoid
page-breaks between images and their caption, so a full
bordered wikipedia thumbnail is always full on a single page.
2018-06-14 00:46:52 +02:00