On request of users (dracodoc, kai771 et al.) I have added a new command
`O` which toggles the display (via dimmed box) of the page overlap
areas. This setting is saved on a per-book basis, i.e. is specific to
the book, which is the desired behaviour as one wants dimming on some
books (math, physics, etc) but not others (fiction).
In the function FileInfo:getFolderContent() we need to lowercase the
extension before deciding if it is a book or not --- otherwise files
like BOOK.PDF and BOOK.DJVU are not counted as books.
Overloading the function "set full screen refresh count" (Shift-R) with
forcing screen refresh is rather counter-intuitive and inconvenient in
practice, because the InputBox dialog obscures the large part of the
page and when it disappears it is not obvious whether the full page
redraw occurred or not.
Therefore, it is more convenient to have a separate function (bound to
KEY_SPACE as in KPV's filemanager, K3Chess and in most other readers)
that does the full screen refresh.
The call to self:redrawCurrentPage() in UniReader:addBookmark() comes
from the days when this function was causing a "Retrieving TOC..."
message via getTocTitleByPage()->fillToc() codepath. Now that message is
gone so we should kill the redraw as well.
1. On startup read the file git-rev if exists and initialize a new global
G_program_version.
2. In filechooser's help page's header show the version.
This helps to easily identify what version the user is running without
asking him to cat git-rev file manually.
1. Fix the functions sizeUtf8Text(), renderUtf8Text() and
renderUtf8TextWidth() to have a meaningful test whether to kern or not
(the current code is meaningless as it contains the `else` clause that is never
executed).
2. Whitespace changes to filechooser.lua
If you happened to have a word like "HISTORY" in the book's TOC you will know
how ugly it looks when kerning is enabled. Since we use monospaced font
(by default) for selectmenu, it makes sense to disable kerning for the
actual items (but leave it on for shortcuts and "..." etc).
Although the current rendering mode can also be ascertained by pressing
"R" and noting the current position in the menu, it is convenient to
show it alongside the page type in the Menu status info.
It is a bad idea to use too many keys for the same function and also do
this non-uniformly (i.e. not in all contexts). The info at the bottom of
Help screen says "Back to close this page", so only KEY_BACK (but not
KEY_HOME) should serve this purpose. And if the user pressed Home twice
then the whole application would exit, so using Home here is a bad idea.
1. Initialize self.commands only once
2. Corrections to hotkeys: added fast jumps to item at position 0%,
10%, ... 100% by Alt+Q, W, ... P
3. Added fast jump to page entered via inputbox (by G)
4. Cleanup of function descriptions and to hotkeys.
5. Added a function deleteFoundFile(full_filename) used by KEY_DEL
handler.