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

1313 Commits

Author SHA1 Message Date
{Qingping,Dave} Hou
b6218b30a3 Merge pull request #424 from tigran123/wrong-dotdot
Two bugfixes: issues #419 and #420
2012-10-11 22:17:56 -07:00
{Qingping,Dave} Hou
0c4f94dd19 Merge pull request #426 from tigran123/colour-jpeg
Free raw_image if it is unsupported.
2012-10-11 22:17:32 -07:00
Tigran Aivazian
2ca5c028c1 Initialize doc->image in openDocument
This is needed to protect against double free() in closeDocument().
2012-10-11 22:54:04 +01:00
Tigran Aivazian
b63edfca1f Free raw_image if it is unsupported.
If the number of colour components is neither 1 nor 3 we should remember
to free the buffer holding the raw decoded image before returning the
error to Lua.
2012-10-11 22:34:18 +01:00
{Qingping,Dave} Hou
127a20146b Merge pull request #425 from tigran123/colour-jpeg
Add support for colour JPEG images.
2012-10-11 14:31:57 -07:00
Tigran Aivazian
669d84df18 Show the number of colour components via Menu. 2012-10-11 22:22:45 +01:00
Tigran Aivazian
f0511ff22c Make closeDocument() re-entrant. 2012-10-11 22:19:33 +01:00
Tigran Aivazian
5823ab0c44 Slight tidy-up of the code. 2012-10-11 22:10:02 +01:00
Tigran Aivazian
2d2e2b6216 Add support for colour JPEG images.
I used the luminance match algorithm for converting RGB colour images to
grayscale as it gives the best visual results (but at the cost of speed).
2012-10-11 22:01:26 +01:00
Tigran Aivazian
4f16f1d97e Tidy up a comment to be consistent. 2012-10-11 20:58:10 +01:00
Tigran Aivazian
51b3d70165 Two bugfixes: issues #419 and #420
1. Rewritten the function FileChooser:setPath() to handle returning to
the parent directory via ".." entry correctly. Issue #419

2. Fixed the crash when moving the last file from a directory to the
clipboard via Shift-X and then pressing Shift-X on the phantom entry
that is left. Issue #420
2012-10-11 20:42:52 +01:00
{Qingping,Dave} Hou
5f1ce0e82d Merge pull request #421 from tigran123/pdf-cleanup
Commented out debug-only function readable_fs().
2012-10-11 06:36:20 -07:00
Tigran Aivazian
d86944cce0 Commented out debug-only function readable_fs(). 2012-10-11 11:49:38 +01:00
{Qingping,Dave} Hou
b74347afae Merge pull request #418 from tigran123/shell
Force the use of bash in the Makefile.
2012-10-10 16:46:17 -07:00
{Qingping,Dave} Hou
6bb497cfae Merge pull request #415 from tigran123/git-ignore
Add git-rev file to .gitignore
2012-10-10 16:38:30 -07:00
{Qingping,Dave} Hou
fe62c577b0 Merge pull request #412 from tigran123/djvu-gwidth
Use the local copy of the global G_width variable.
2012-10-10 16:34:54 -07:00
Tigran Aivazian
8ab0e7fcb8 Force the use of bash.
On some distributions (e.g. Ubuntu) the shell used for scripts is dash,
not bash and we explicitly rely on bash's features in the Makefile, so
we must guarantee that we are running with bash (not dash or anything
else).
2012-10-10 21:04:47 +01:00
Tigran Aivazian
f2c17ed435 Merge pull request #416 from kai771/show_links_enable
Implements a toggle that allows enabling/disabling links underlining
2012-10-10 12:20:44 -07:00
kai771
286f7caf2d "page links" -> "page links shortcut keys" 2012-10-10 21:14:02 +02:00
Tigran Aivazian
a5cd590e39 Add git-rev file. 2012-10-10 19:49:50 +01:00
kai771
bb899cfad2 Implements a toggle that allows enabling/disabling links underlining 2012-10-10 20:36:51 +02:00
Dobrica Pavlinušić
cdbacebd06 Merge pull request #411 from tigran123/picviewer
Picture viewer (currently supports only grayscale JPEG files)
2012-10-10 11:14:48 -07:00
Tigran Aivazian
148d92037e Revert "Undo some of my changes to rendertext.lua"
This reverts commit edd347eb55.
2012-10-10 17:32:23 +01:00
Tigran Aivazian
98898dabda Merge branch 'master' into picviewer 2012-10-10 17:31:39 +01:00
Tigran Aivazian
2b04e5ee86 Merge pull request #414 from hwhw/hwhw-master
Fix for blitbuffer.c / boundary checking
2012-10-10 09:23:29 -07:00
HW
b5bc152c3d Merge remote-tracking branch 'origin/master' into hwhw-master 2012-10-10 18:02:17 +02:00
HW
10806074b8 factored out blitting constraints check in a seperate function
the checking of the boundaries when blitting was incomplete
for the addblitToBuffer() function when compared with the
blitToBuffer() function. Factored out the redundant checking
procedure into a new function.

Should fix another bug leading to issue #401 and probably
more cases for specifying boundary boxes.
2012-10-10 17:58:31 +02:00
Dobrica Pavlinušić
31c10f09e7 Merge pull request #413 from hwhw/hwhw-master
added framework to check the involved pointers in blitbuffer operations
2012-10-10 08:33:52 -07:00
HW
4810eded5c added framework to check the involved pointers in blitbuffer operations
blitbuffer operations in 4bpp can be a nasty experience, easy to
get the pointers wrong. so a macro can check them now.
2012-10-10 16:59:07 +02:00
Tigran Aivazian
4705ec60ad Use the local copy of the global G_width variable. 2012-10-10 13:57:28 +01:00
Tigran Aivazian
ba84bb56d3 Use the local copy of the global G_width variable. 2012-10-10 13:55:38 +01:00
Tigran Aivazian
a68407a770 Add image info to the Menu status top bar. 2012-10-10 13:22:28 +01:00
Tigran Aivazian
13646a3d51 Support only grayscale images for now. 2012-10-10 13:15:16 +01:00
Tigran Aivazian
aa3bfb8439 Add simple scaling support. 2012-10-10 13:09:25 +01:00
Tigran Aivazian
afc89beb80 Merge branch 'djvu-crash' into picviewer 2012-10-10 11:48:17 +01:00
Tigran Aivazian
edd347eb55 Undo some of my changes to rendertext.lua
My fixes to kerning logic check in sizeUtf8Text(), renderUtf8Text() and
renderUtf8TextWidth() functions either caused or triggered a memory
corruption easily observable with DjVu files.
Undoing these changes fixes the corruption... or does it just make it
unnoticeable? Please review these changes to find out the answer.
2012-10-10 11:02:07 +01:00
Tigran Aivazian
c64da132c5 Merge pull request #387 from dpavlin/variable_link_font_size
recalculate font size for each link
2012-10-09 16:06:27 -07:00
{Qingping,Dave} Hou
f4f29bb12b Merge pull request #410 from tigran123/mode-refresh
Fix for the issue #404 no page redraw after setting mode from readers.
2012-10-09 15:29:22 -07:00
{Qingping,Dave} Hou
fd27ba693b Merge pull request #409 from tigran123/long-msg
Allow two decimal digits point for gamma/zoom
2012-10-09 15:29:01 -07:00
{Qingping,Dave} Hou
78301d98ff Merge pull request #408 from tigran123/crash-fix
Possible fix for the memory corruption issue #401
2012-10-09 15:28:15 -07:00
Tigran Aivazian
82831f4312 Get rid of comments showing bad practice. 2012-10-09 23:20:42 +01:00
Tigran Aivazian
832a36c624 Allow two decimal digits point for gamma/zoom
Allowing only one digit seems insufficient, especially for zoom.
2012-10-09 23:17:56 +01:00
Tigran Aivazian
1dec3def12 Fix for the memory corruption issue #401
In the function renderUtf8Text() I added a variable buffer_width which
was intended to be local but I forgot the keyword "local" in front of
it. This overwrote whatever global "buffer_width" there might be and
caused a serious memory corruption described in issue #401. Although
grepping our *.lua sources did not reveal any "buffer_width" variable I
assume that there is one elsewhere (i.e. Lua's own internal namespace is
"pollutable" by user's code) because this little change definitely does
make an awful amount of difference...
2012-10-09 23:10:28 +01:00
{Qingping,Dave} Hou
83874931f5 Merge pull request #406 from tigran123/long-msg
Restrict the value of gamma in the window message.
2012-10-09 14:52:40 -07:00
{Qingping,Dave} Hou
80bdcd6cf6 Merge pull request #397 from tigran123/djvu-validate
Validate DjVu magic string before opening.
2012-10-09 13:17:54 -07:00
Tigran Aivazian
ef4d0a2ae4 Merge branch 'master' into picviewer 2012-10-09 21:02:03 +01:00
Tigran Aivazian
339bda372a Restrict the value gamma in the window message.
In order to make sure that the message is always visible we should not
show all the decimal places --- one is more than enough. Otherwise the
whole thing is invisible, often enough to be irritating...
2012-10-09 18:42:49 +01:00
Tigran Aivazian
4d1945d0de Merge pull request #405 from hwhw/hwhw-master
changed page number reading
2012-10-09 09:12:32 -07:00
HW
723362e469 changed page number reading
this is far from complete since in fact, we read page references
which follow a more complex syntax. while specifying page numbers
is one option for them, they might also specify page names. we
currently do not yet have code for this case and we will return
"-1" for all page references we can not parse.
2012-10-09 18:00:19 +02:00
Tigran Aivazian
da3e336de5 Page redraw when pressing Alt-M and I in readers 2012-10-09 15:27:25 +01:00