Turning off overlap was instantly visible, but turning it back on was visible only on the next view. This makes both turning on/off overlap instantly visible. Since the result of a keypress is immediately visible, I commented out the inform message, since it's not needed anymore.
This patch changes the second argument of InfoMessage:inform() function
to be either DINFO_DELAY or DINFO_NODELAY with the following
semantics:
DINFO_DELAY - display the message and delay DINFO_DELAY ms before
returning. Save and restore the screen content.
DINFO_NODELAY - display the message and return immediately without
saving/restoring the screen content.
Also, tidy up the call to modBBox() from Shift-X command handler, it
should be unireader:modBBox() and not self:modBBox(unireader) --- there
is no need to pass the reader object to the :modBBox() method.
Thanks to kai771's idea of setting the value of DINFO_TIMEOUT_FAST=1
(in defaults.lua) we can still have the same behaviour of calls to
InfoMessage:inform(..DINFO_TIMEOUT_FAST..) on both the emulator and the
Kindle without the need to manually refresh the page after the call.
Also, now we don't need to set pagedirty=true in filechooser when
displaying a popup window with DINFO_TIMEOUT_FAST flag.
Also, add space to the end of the text messages passed to :inform() for
symmetry.
I have removed the calls to self:redrawPage() recently after the calls
to InfoMessage:inform() with DINFO_TIMEOUT_FAST because on the emulator
the screen was refreshed automatically. But not so on the real Kindle
hardware --- we have to refresh the page explicitly, otherwise the popup
window stays until one forces manual refresh via Space or turns the page
(or causes a refresh by some other way, e.g. pressing Menu twice).
This patch restores those calls to self:redrawCurrentPage().
Also, it adds space to the end of some messages for symmetry and
switches Alt-Z toggle to DINFO_TIMEOUT_FAST mode as well.
1. There is no need to call the :goto() method which does the extra work
of adding to jump history and (most importantly) pre-caching, which is
not relevant for the simple task of redrawing the current page.
2. The page goto "G" function can now be optimized to avoid pre-caching if
the page has not actually changed.
Previously, if you follow a local link in the PDF file which points to a
place only one page away from the current page and then press Back it
will bring you to some random location (depending on the previous jump
history). But normally you would expect to be returned to the link's
location, regardless of its distance from the target page. This commit
fixes this problem, also raised as an issue 575.
1. We shouldn't delay the calls to :inform() when modifying bbox
(Shift-X) on the emulator. Otherwise, the popup window will disappear
after a very short delay.
2. Document the 'msec' parameter of :inform() method in the comments
above it in dialog.lua.
3. Get rid of some of the "polite" alternative voice messages in cases
where the default one will do perfectly.
4. Get rid of the useless "Scanning folder..." message as this operation
is fast enough to not deserve any such message.
5. Explain the reason why a directory cannot be deleted instead of just
stating this as a fact. (and get rid of those exclamation marks, no need
for shouting, the world is a noisy enough place as it is :)
When there are reader preferences table but preference for the file type
of which the file is to be opened is not available, reader chooser
should show up.
I changed `last_reader` and `default_reader` to `reader_association` and
`reader_preferences` respectively for clearness.
Users can still use default reader for specific type. The "Remember
this file" option will add exception to the predefined reader
preference. And exception for a document can be made with the "Alt+C"
command after opening the doc. This patch fixed the bug reported on
issue #480 by @dracodoc.
1. Choosing the level of event notifications shouldn't be restricted.
2. It should sit on key E standing for "configure Event notifications"
rather than the very lengthy "change the way to Inform about events".
1. There is no need to inform the user about the rotation being in
progress because it never takes long enough to cause concerns.
2. Shorten the calls to InfoMessage:inform() in ON/OFF toggle
situations.
This is due to a very strange quirk in Lua. If we use io.lines(filename)
API like this:
for line in io.lines(filename) do
....
if something then break end
end
Then the file descriptor table is growing infinitely because the
descriptor is not closed on breaking out of io.lines() loop. So we have
to use the ordinary file api like this:
local file = io.open(filename, "r")
for line in file:lines() do
....
if something then break end
end
file:close()
This way there is no file descriptor leak.
The function memUsage() parses the file "/proc/self/status" and extracts
the sizes (in KB) of RSS, Data, Stack, Lib and TotalVM.
These are displayed when Menu button is pressed inside readers.