2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

16 Commits

Author SHA1 Message Date
Tigran Aivazian
27817d66d8 Cleanup: ReturnKey and InQuotes are not methods
The functions ReturnKey() and InQuotes() are generic utility functions
and there is no reason whatsoever for them to be object methods of
FileChooser object (and in fact they are used elsewhere). We should
clearly delineate the common utility functions from object's methods
so that eventually the former could be moved to other source modules
while the latter stay close to their object's definitions.
2012-11-05 20:10:52 +00:00
NuPogodi
55f4c278b7 Switch to new InfoMessage API from NuPogodi.
Convert the three files crereader.lua filehistory.lua fileinfo.lua to
use the new InfoMessage:inform() API.
2012-10-05 10:59:37 +01:00
NuPogodi
10592c68b0 Fixed search with empty pattern (from NuPogodi). 2012-10-04 23:22:08 +01:00
Tigran Aivazian
723be220ac Tidy up the previous commit.
I didn't realize that the voice message is optional, so the last
argument can be deleted, i.e. in this case the voice message can be the
same as the text one.
2012-10-04 18:37:46 +01:00
Tigran Aivazian
c13a1553f4 Prevent crash when opening stale history entry.
This fixes the issue #370 raised by dracodoc.
When the user removes or renames the book which was previously opened
and tries to open it again via (now stale) history entry we are passing
the filename of a non-existent file to the format-specific
:openDocument() method and the behaviour depends on the format. For PDF
and DjVu files it is okay --- they just return an error, but for the
crengine files (ebooks) we get a coredump.
Anyway, the proper solution is to not attempt to open a non-existent
file but give a more meaningful message (than, for example:
"ddjvu: **Unrecognized DjVu Me" for DjVu case) which informs the user
that the history entry is stale. If he has valuable data in it (such as
highlights, etc) he can save them, otherwise he can delete the history
entry there and then.
2012-10-04 18:21:40 +01:00
Tigran Aivazian
37099d81f1 Fixes to "Last Documents" dialog.
1. Remove ".." entry as unnecessary waste of (rather limited) space.
Pressing KEY_BACK returns the user from this dialog, so there is no need
for the ".." entry.
2. Simplify FileHistory:init() function as it does not really need the
argument --- our history location is fixed and hardcoded.
3. Remove KEY_HOME quit key from history command handlers. Pressing Home
key too many times would cause the application to exit, which is
very annoying.
4. Show the number of items in the header next to "Last Documents".
2012-10-03 16:17:45 +01:00
NuPogodi
00c1f2ec9c New InfoMessage Concept
Part I (still no unireader, crereader, filesearcher & fileinfo)
2012-10-03 00:45:45 +02:00
Tigran Aivazian
0987c2826e Don't crash on pressing Del in History
After deleting all the entries from History we should guard against
pressing Del to try to delete a non-existent entry.
2012-09-26 15:58:51 +01:00
Tigran Aivazian
d338eff00d Don't write to temporary file on the flash device.
Instead of writing to (and reading from) the temporary file
"history/.history.txt" create a pipe to the appropriate process
and read from it.
2012-09-24 09:04:57 +01:00
Tigran Aivazian
eb002540a2 Don't crash on user pressing ENTER in empty history --- just display an appropriate message. 2012-09-19 17:49:20 +01:00
Tigran Aivazian
4b9cf4eaf5 Use os.remove() instead of os.execute("rm...") because it is less expensive
as it uses remove(3) C library function rather than fork/exec-ing a new process.
2012-09-18 23:52:11 +01:00
NuPogodi
8a792d2f31 Replaced: font selection menu (new version), etc
1. New menu Font:chooseFonts() to change font faces
2. Removed duplicate of 'make screenshot'
3. Hotkeys (Back & Home) to exit are moved down, to the end of hotkey list
4. Removed outdated comments & not informative comments
2012-09-06 21:04:20 +03:00
Tigran Aivazian
c4833b7557 Make sure the function that deletes history entry does NOT delete the physical file.
This is normal/expected behaviour, as in CoolReader and all other viewers I looked at.
2012-08-27 15:14:15 +01:00
HW
0d12ff70cd rename debug() to Debug() to stop clashing with the debug submodule from Lua 2012-06-04 00:49:23 +02:00
Dobrica Pavlinusic
a08c35a52c added Screen:screenshot() 2012-05-19 23:04:40 +02:00
NuPogodi
3a76ec91fd 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.
2012-05-19 13:04:49 +02:00