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.
The FileChooser:choose() method returns only a single argument,
so we can get rid of the second return value in reader.lua and
simplify the code a bit.
1. Usually the error messages from the :open() method are too
long (except for crereader files) and won't be shown.
So, I extract the first 30 bytes from the error message (if there is
one) and show that. But if there is no error message then just display
the generic "Error opening document ". Otherwise, as was currently the
case, the error message is present but is too long and so we get
absolutely nothing, not even a generic one. But in the Debug output we
can show the entire error message as there is no restriction on the
length.
2. Use showInfoMsgWithDelay() instead of InfoMessage:show() followed by
util.sleep().
3. Remove the dependency on keys.lua. This was needed when we were
detecting emulation by comparing the physical value of some KEY_ but now
we use util.isEmulated() so there is no need for it anymore.
1. Make "-d" switch passed to reader.lua enable all debugging
2. Enable debugging for now (development stage) to preserve the current
behaviour. But for the production release I advise to: a) disable it by
not passing "-d" and b) redirect standard output (not just standard
error) of reader.lua to crash.log in kpdf.sh
3. Comment out debug printf()s in pdf.c
Since we are adding and renaming fonts, we need to make sure that
all fonts which reader uses are defined. This allows us to add fonts
and not break when users load old configuration files
close#252
In order to switch between safe and advanced way for filechooser to manage files, I've introduced special parameter 'filemanager_expert_mode':
i) 'safe' means that filemanager shows only files with the reader-related extentions; make safe renaming (i.e. the extention remains the same)
ii) 'advanced': all files are available (no filtering); any renaming is allowed;
TODO: to add also 'expert' mode & use it for unstable or dangerous functions
when in CREngine mode, the current font can be made the default
document font by pressing Shift-F
in order to store this setting, the reader_settings variable was
promoted to the declared global G_reader_settings
close#184
- long lines (filenames in 'Document Info') are now splitted in more
human-readable way (by spaces, dots, slashes or some other characters
- see screenshot)
- the selection of fonts in filemanager (key 'F' or 'Aa') looks now more
user-friendly
- fixed too long strings in most menues (TOC, Bookmarks, Fonts...) and
in the popup with the reading progress (called by key 'Menu')
- the position inside the cr-documents (epub, mobi...) now remain nearly
the same after rescaling the document (i.e. changing the font face,
size, boldface and interline distance)
- when you open TOC-menu or Fonts Menu, it highlights the current item
(i.e. current chapter and current fontface).
- i've a bit changed the way to read the battery level values, it might
now work even without Amazon Kindle framework.
If we call addAllCommands in initGlobalSettings, all
the readers will share the same commands and we cannot
adjust commands for a specific reader. I thus moved this
method call to Unireader:init() method.
* hwhw/master:
make muPDF cache size configurable from Lua
add XPS and CBZ support (muPDF provides this)
fixed bug for odd rendering widths
refactored muPDF integration to use strictly the fitz.h API
forgot Makefile change when factoring out drawcontext