integrate rest of @NuPogodi changes #166

- 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.
This commit is contained in:
NuPogodi
2012-05-19 12:59:38 +02:00
committed by Dobrica Pavlinusic
parent f595d42431
commit 3a76ec91fd
27 changed files with 1179 additions and 165 deletions

View File

@@ -27,6 +27,7 @@ require "screen"
require "keys"
require "commands"
require "dialog"
require "extentions"
-- option parsing:
longopts = {
@@ -40,13 +41,8 @@ longopts = {
function openFile(filename)
local file_type = string.lower(string.match(filename, ".+%.([^.]+)"))
local reader = nil
if file_type == "djvu" then
reader = DJVUReader
elseif file_type == "pdf" or file_type == "xps" or file_type == "cbz" then
reader = PDFReader
elseif file_type == "epub" or file_type == "txt" or file_type == "rtf" or file_type == "htm" or file_type == "html" or file_type == "fb2" or file_type == "chm" or file_type == "mobi" or file_type == "prc" or file_type == "doc" or file_type == "zip" then
reader = CREReader
end
reader = ext:getReader(file_type)
if reader then
InfoMessage:show("Opening document, please wait... ", 0)
reader:preLoadSettings(filename)