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

26 Commits

Author SHA1 Message Date
Tigran Aivazian
7d52e65828 Don't slow down :inform() when modifying bbox.
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 :)
2012-11-13 11:46:57 +00:00
kai771
9c6ad7387a info_timeout2 - fixes issues reported by tigran123 in #560 2012-11-11 23:33:26 +01:00
Tigran Aivazian
772dda7e57 Make file info more resilient
We shouldn't crash the whole KPV application just because for some
reason we can't obtain the valid unpacked size of the zip archive.
2012-10-24 10:42:08 +01:00
chrox
2fd933abc9 remove extension.lua and implement getReaderByType in readerchooser.lua 2012-10-22 22:04:09 +08:00
Tigran Aivazian
c115127e1c Bugfix: count books like BOOK.PDF and BOOK.DJVU
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.
2012-10-08 12:04:52 +01: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
Tigran Aivazian
f3306d5512 Kill getDiskSizeInfo() function.
Instead of making an extra function call, packing return values in key'd
values of a table and then use two table indexing operations, just call
util.df(".") directly from FileInfo:formatDiskSizeInfo() and use its two
return values appropriately.
2012-10-03 19:56:36 +01:00
Tigran Aivazian
1a3371c5bf Two fixes from NuPogodi
1. ATM, the footers in selectmenu.lua & helppage.lua are left-adjusted,
these also contain the prompt for users how to call help
(selectmenu.lua) and how to go back (helppage.lua). By minor correction
to function DrawFooter() in filechooser.lua, one may readily make the
rest footers to look in a similar way.
2. When writing the code of inputbox.lua, I (NuPogodi) left the wrong
command to delete the 1st entry in the math function list
(called in calculator mode by pressing Alt-M).
2012-09-29 19:03:29 +01:00
Tigran Aivazian
ba1e739543 Guard against trying to see "Unpacked size" for corrupt zip files.
Print "Invalid" in the "Unpacked" field for corrupt zip files.
More generally, the FormatSize() function returns the string "Invalid"
if whatever passed to it is not a number.
2012-09-25 12:31:11 +01:00
Tigran Aivazian
2fdecb7b40 Don't assert() around io.popen() and use generic FileExists(). 2012-09-25 12:19:34 +01:00
Tigran Aivazian
47b056861b Slightly shorter and more Lua-idiomatic way of reading lines. 2012-09-24 20:38:18 +01:00
Tigran Aivazian
6e0f0aef26 Fix a crash in getDiskSizeInfo() and use util.df function
1. When executed in the emulator the viewer will crash if you press
Right on any zip file in the filechooser. This is because the assertion
on "df /mnt/us | tail -1" will fail as "/mnt/us" is normally
non-existent.
2. The proper (faster, reliable, portable) way of obtaining the number
of total and free bytes on a filesystem is by using the statvfs(2)
system call via util.df Lua interface, see util.c.
3. Removed the "used" field in the function's return as unused and
unneeded.
2012-09-24 19:48:12 +01:00
NuPogodi
59c212971f fixed crash in function getUnpackedZipSize()...
applied to zips which filenames contain spaces; added support for showing information about folders (size, subfolders, files, books)
2012-09-24 18:12:07 +03:00
Tigran Aivazian
b3f8ddf67d Be consistent with the case: "Last Read" -> "Last read". 2012-09-20 00:08:59 +01:00
Tigran Aivazian
b8e29b77bc File Info tidy up:
1. Fix the "Created" field in file info to say "Status changed" as the ctime has nothing to do with creation of a file but with the time of the last modification to its inode (e.g. owner, group, link count, mode, etc.)
2. Added the field "Accessed" which shows the atime.
2012-09-20 00:06:08 +01:00
Tigran Aivazian
8496ccb073 Disk free space reporting:
1. Enhance FileInfo:FileSize() to handle gigabytes and rename it to FileInfo:FormatSize() as it is not just for file sizes.
2. Add "Free space" field to file info because it is useful to see it when deciding whether to remove this file or not.
2012-09-19 21:46:31 +01:00
Tigran Aivazian
456136ef71 Fix the calculation of the total unpacked size of the content of a zip file when it contains multiple entries.
Also, don't write to temporary files in the physical filesystem --- use pipes instead.
2012-09-18 23:40:18 +01:00
Dobrica Pavlinusic
d3aa98abb9 fileinfo doesn't reset results
This affects multiple entry into fileinfo which just accumulate
information, eventually scrolling off screen
2012-09-09 13:13:12 +02:00
Qingping Hou
6a1de042f4 initialize fileinfo.commands to nil 2012-09-09 08:08:48 +08:00
NuPogodi
5e6a93191a Clear the code from not used parameters
1. Remove a lot of unused self parameters & commands (including 'make screenshot') 
2. Make sure adding commands only once
3. Add function to change font faces for any items enumerated in Fonts.fontmap and modify the code to recalculate the width of left column that depends on the selected font face => lface
4. Remove most of outdated comments
2012-09-06 20:35:25 +03:00
HW
0d12ff70cd rename debug() to Debug() to stop clashing with the debug submodule from Lua 2012-06-04 00:49:23 +02:00
HW
e35339a398 fixed wrong escape sequences in strings
again, LuaJIT will choke on these, Lua-5.1.n did just ignore them
2012-06-03 01:52:16 +02:00
NuPogodi
944a3b5b05 NuPogodi code drop from 2012-05-27
- zip files don't require double extensions any more
- filechooser has 'H' shortcut to display keys
- new function for files and folders (^ == shift)
	^N - new folder
	Del - delete document/folder
	^C - copy file into clipboard
	^X - cut (move) file to clipboard
	^V - paste files from clipboard
	^R - rename file
- configurable keyboard for input box
2012-05-28 19:19:21 +02:00
Dobrica Pavlinusic
d678510d9a return to file list with fiveway left
It's nice and symetrical to show info (fiveway right) so you don't have
to move hands from fiveway while having long names lookup
2012-05-19 23:15:47 +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