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
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.
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.
Holding on a word for more than 3s should bring the highlight menu.
It crashed on readerpaging documents because self.hold_pos is no more
a Geom object with them.
Also inverted selected_word/selected_text logic, as with PDF, selected_word
stays set when selected_text is available.
drawXPointerSavedHighlight() and onTapXPointerSavedHighlight were
looping thru all credocuments highlights, which was expensive.
Now, we first check with cheaper getPageFromXPointer() the highlights
are on the current page before doing more expensive stuff.
Closes#3503.
Also fix a few crash possibilities when unhighlighting.
Also fix bug with binary search that could not be able to remove bookmark
when there are multiple bookmarks/highlights on the same page.
This makes button heights similar in all uses of ButtonTable.
It depended on how the ButtonTable was used in each widget
(previously, first and last row may have different sizes than
the others).
buttontable.lua: more even buttons height whether zero_sep or not
framecontainer.lua: added padding_top/bottom/left/right (similar to
what was done for iconbutton)
The following widgets have been adapted for this, with some
additional fixes:
buttondialog.lua
buttondialogtitle.lua: wider title with adequate padding
confirmbox.lua + multiconfirmbox.lua: dismissable via tap outside
inputdialog.lua + multiinputdialog.lua: more even vertical padding between elements
imageviewer.lua
textviewer.lua
datewidget.lua
timewidget.lua
Additionaly: frontlightwidget.lua: fixed width of progress bar that
was exceeding window width since the Size scaling adjustements
* [fix] stop propagation of tap events
when triggering reader menu
And also get rid of unnecessary screen refreshes on Kindle Voyage.
The "progress" window for dict lookup is also eliminated as most of the time dict lookup is an instant process, and the "progress" window is preserved for wikipedia lookup as it may take longer time to show the result window.
* [up] add an option to disable dictionary fuzzy search
* [fix] tidy up require
* [fix] fix read settings
* ReaderHighlight: underscore to underline. Although underscore means to
emphasize by underlining, the emphasis lies on the, ahem, emphasis. Besides
which, it's mostly AmE and less well understood worldwide (although in this
particular context it should probably cause no trouble).
* Statistics plugin: menu item text to "reading statistics" to make it clear
which statistics we're talking about. Fixes#2744.
Also fix touch zone dependency graph generation code.
ReaderHighlight has now been migrated to use touch zone
Inputcontainer's touch event handling logic changed to only stop
propagation when handler returns `true`. Previously, it stops
propagation when a handler is found. This is needed to support
both readerhighlight_tap and tap_forward touch zones.
Also for the current text-only wikipedia full page: replace
the ==s in section titles with some unicode symbols for a better
visual feeling of hierarchy. These same symbols are also used
in the .epub.
Both can be disabled by adding ["wikipedia_prettify"] = false
to settings.reader.lua
readerhighlight: close ButtonTable (like other buttons do) when looking
up wikipedia, otherwise if we save as epub, and swtich to new document,
this ButtonTable will never be closed and stays in UI.
Simple image viewer with Best Fit/Original size and Rotate
(for landscape images) buttons.
readerhighlight: check if hold is on an image to show it
fullscrren
Stardict:
- remove duplicate results
- better cleaning of selection
- append results from a 2nd query of a 2nd set of dictionaries
in data/dict_ext/
Wikipedia:
- use the search API for better results
- allow viewing the full page content of a result in a bigger window
- allow queries for multiple languages
- available languages can be set in settings.reader.lua :
["wikipedia_languages"] = {"en", "fr", "it"}
- "Wikipedia lookup" added to Tools menu
For both:
- allow selection of multiple words for a new lookup (so one can
actually browse wikipedia)
- allow continuous reading with Tap
- display "current result / total number of results"
Details in #2393
Full refresh when highlighting text is quite annoying, I fixed it by
using 'ui' refresh type.
And this patch also fixed a bug that after cleaning temporary highlights
the screen is not refreshed.
This is a larger clean-up of the refresh situation.
The general shift is that refreshes are now mainly triggered by
the (top-level) widgets when they get shown or closed via UIManager.
All refreshes for the widgets when they are in use were handled by
themselves before. This adds the case of showing/closing.
It is the desired result of not having UIManager:show()/:close()
do (full screen) refreshes on its own.