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
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.
- 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)
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).
* 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#4147Closes#4148 (by superceding it)
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.
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.
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").
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.
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.
* 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)
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.
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.
* 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).
- 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
* 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
* 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) ;).
* 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).
* 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.
* 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
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.