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

1089 Commits

Author SHA1 Message Date
Tigran Aivazian
f3b52f269c Tidy up "git status" output a bit.
Added settings.reader.lua, cr3cache, history, crash.log, .vimrc, data,
fonts to .gitignore.
2012-09-28 12:49:36 +01:00
Tigran Aivazian
90971a7bf7 Fix from NuPogodi --- initialize scfont face properly.
This fixes the bug of non-persistency of user's setting of scfont.
2012-09-28 12:09:02 +01:00
{Qingping,Dave} Hou
33bb760576 Merge pull request #332 from tigran123/master
Jump history in crereader loses the last position.
2012-09-27 13:35:03 -07:00
Tigran Aivazian
496fcc089f Merge remote-tracking branch 'upstream/master'
Conflicts:
	unireader.lua
2012-09-27 21:20:32 +01:00
Tigran Aivazian
58d19ea7fd Merge pull request #327 from dpavlin/two-column-recalculate-pan
recalculate pan offsets on page change #275
2012-09-27 13:15:45 -07:00
Dobrica Pavlinusic
7b983ee7e6 fix fiveway pan to right-bottom of previous page 2012-09-27 21:29:25 +02:00
Dobrica Pavlinusic
01a57b2fb9 recalculate pan offsets on page change
Store last globalzoom_mode in self.pan_by_page so we can restore it
to force offsets recalculation on page change

This wasn't quite enough to trigger correct re-panning for page
changes when using fiveway to move in two-column mode, issue #275

I considered adding callback to goto method and than transfering
it through function calls, but this approach (allthough very
questionable) seemed to provide simplier code.
2012-09-27 19:21:51 +02:00
Tigran Aivazian
850a777760 On pressing Back crereader loses last position
This fix makes the behaviour of Back command handler in crereader
identical with that in unireader, i.e. the last position is saved in
Jump History when pressing Back, so you can return to it by pressing
Shift-Back enough times.
Also, with this change we would need to handle the need for redrawing
the current page because the :addJump() method can force the call to
fillToc() (if TOC is not already present) and this will display
"Retrieving TOC..." message which will need clearing away.
2012-09-27 13:10:28 +01:00
Tigran Aivazian
68c95e4bb2 Merge remote-tracking branch 'dpavlin/two-column-recalculate-pan' into dpavlin-twocolumn 2012-09-27 11:41:21 +01:00
{Qingping,Dave} Hou
cc1ab45b1c Merge pull request #329 from dpavlin/fit-content-pan
remember last zoom mode when panning #236
2012-09-26 21:40:23 -07:00
{Qingping,Dave} Hou
8588b08761 Merge pull request #326 from dpavlin/invertRect-negative
invertRect should handle negative x or y values
2012-09-26 21:32:38 -07:00
Dobrica Pavlinušić
d4ee7f2c53 Merge pull request #328 from tigran123/master
Mixed up unireader.toc with self.toc in the command handler.
2012-09-26 15:44:34 -07:00
Dobrica Pavlinusic
7ba8d6f877 remember last zoom mode when panning #236
This tries to address issue #236 so that previous and next keys don't
change meaning when user go into panning mode by pressing fiveway.
2012-09-27 00:37:32 +02:00
Tigran Aivazian
a7b22ba0d4 Mixed up unireader.toc with self.toc, sorry. 2012-09-26 19:56:07 +01:00
Dobrica Pavlinusic
fe2517ecd2 recalculate pan offsets on page change
Store last globalzoom_mode in self.pan_by_page so we can restore it
to force offsets recalculation on page change

This wasn't quite enough to trigger correct re-panning for page
changes when using fiveway to move in two-column mode, issue #275

I considered adding callback to goto method and than transfering
it through function calls, but this approach (allthough very
questionable) seemed to provide simplier code.
2012-09-26 20:24:23 +02:00
Dobrica Pavlinusic
c8b3a0d486 invertRect should handle negative x or y values
two-column mode combined with showing links in pdf files triggers this bug
2012-09-26 19:40:18 +02:00
Dobrica Pavlinušić
44bb4d18f2 Merge pull request #325 from tigran123/master
Various fixes.
2012-09-26 08:25:49 -07:00
Tigran Aivazian
5d82ffe984 Redraw current page if necessary on pressing Back
For PDF and DjVu files (but not for crereader) the command handler for
"Back" key can call addJump() in order to avoid losing the top of the
jump history on return. This (addJump()) can cause the TOC to be
retrieved and the message "Retrieving TOC..." to be displayed.
If this happens then we need to redraw the current page after displaying
our own "Already first jump!" message.
2012-09-26 16:05:07 +01: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
819efb55aa Tidy up Screen:fb2bmp() function
1. Remove unused assert() around io.open of the input device. The failure
to open input device is already guarded by the "if inputf" code.
2. Remove unneeded assert() around io.open of the output device. This is
unneeded because we should not crash the whole application just because
we cannot write screen dump (e.g. because filesystem is full, etc) ---
rather we should exit gracefully.
2012-09-26 14:08:33 +01:00
Tigran Aivazian
6710aa132f Merge pull request #318 from tigran123/master
Show real time, not cpu time when making screenshots.
2012-09-26 03:20:18 -07:00
Tigran Aivazian
9e134ce976 Merge remote-tracking branch 'upstream/master' 2012-09-26 11:04:24 +01:00
Tigran Aivazian
3cdb57ccc7 Merge pull request #309 from dpavlin/pdf-links
show pdf links using L key
2012-09-26 03:03:22 -07:00
Dobrica Pavlinusic
929334c00c shortcut_offset should be added directly to shortcut_map 2012-09-26 11:42:15 +02:00
Dobrica Pavlinusic
51e2a0c13b use shortcut_map to track page links 2012-09-26 10:55:03 +02:00
Dobrica Pavlinusic
771901d56e use all shortcuts, skipping uri links 2012-09-26 10:48:07 +02:00
Tigran Aivazian
a0cfcba266 Merge remote-tracking branch 'upstream/master' 2012-09-25 22:04:50 +01:00
{Qingping,Dave} Hou
3fd3ff3680 Merge pull request #319 from dpavlin/crengine-upstream
bump crengine version to cr3.0.57-15
2012-09-25 13:41:54 -07:00
Dobrica Pavlinusic
a9bff12d8e version: cr3.0.57-15
This might help fix #316 since upstream has cache changes
2012-09-25 21:54:04 +02:00
Dobrica Pavlinusic
d936f86f04 fix shortcuts beyond last one 2012-09-25 21:16:03 +02:00
Dobrica Pavlinusic
88828fd478 check if there is at least one page link before drawing shortcuts 2012-09-25 19:28:16 +02:00
Dobrica Pavlinusic
ee7b0ca41e ignore all non-page links 2012-09-25 19:04:46 +02:00
Dobrica Pavlinusic
fc22f5ed93 check if getPageLinks returned links before use 2012-09-25 18:31:42 +02:00
Tigran Aivazian
df65245e70 Bug in CREReader:ZipContentExt().
Even after restoring to the previous version, this function had a slight
bug that would cause a crash on valid .zip files (e.g.
mupdf-thirdparty.zip in kindlepdfviewer make tree). The reason is
because the value of s may be not nil, but the string.match() would
return nil and so string.lower() would get nil as an argument and crash.
So, we have to guard against this carefully.
2012-09-25 17:06:49 +01:00
Tigran Aivazian
bc3c3f6a38 Oops, left the pointer to emulator binary, sorry. 2012-09-25 16:56:42 +01:00
Tigran Aivazian
96ac2bef8d Simplify the calling of filechooser.
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.
2012-09-25 16:54:37 +01:00
Tigran Aivazian
67efe2d4ca Use util.isEmulated for screenshot. 2012-09-25 15:01:35 +01:00
Tigran Aivazian
9e3ebe9496 Show the real time, not the cpu usage spent on making screenshot. 2012-09-25 14:51:43 +01:00
Tigran Aivazian
37dc2d9530 Get rid of the compilation warning. 2012-09-25 14:46:47 +01:00
Dobrica Pavlinusic
16c5171432 removed refresh which will be called after anyway 2012-09-25 15:39:20 +02:00
Dobrica Pavlinusic
01b1f5ba66 move 30 link shortcuts around using fireway 2012-09-25 15:36:13 +02:00
Dobrica Pavlinušić
4d09763224 Merge pull request #315 from tigran123/master
Pulling bits from kpdfdjview branch (plus other fixes)
2012-09-25 06:11:02 -07:00
Dobrica Pavlinusic
cc222c6525 fix DOT and SYM bindings, added ENTER 2012-09-25 15:00:58 +02:00
Tigran Aivazian
1a119660ea Display better messages on failing to open a file.
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.
2012-09-25 13:48:21 +01:00
Tigran Aivazian
416c62ca61 Tidy up debug support.
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
2012-09-25 13:11:21 +01:00
Tigran Aivazian
385f74222a Create static directories at build, not runtime.
Instead of calling lfs.mkdir() to create "./history" and "./screenshots"
at runtime it is easier to create them at package build time.
I hesitated whether to add "./clipboard" to this list but decided
against it as we can perhaps change current directory and then
all the code manipulating clipboard would break, so I left it as is.
2012-09-25 13:00:34 +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
b297ee2c71 Use generic FileExists()
This change should have been in the previous commit, sorry.
2012-09-25 12:24:48 +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
ac46f7237f Fix a typo "Q to E" -> "Q to P" in Active Keys helppage. 2012-09-25 12:11:11 +01:00