From ccc2f7e134558bd88409ecf1a982dbd2d94eedba Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 29 Feb 2012 16:17:43 +0100 Subject: [PATCH 1/4] cleanup old files before fetching new versions --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5f9de89ee..141af1b03 100644 --- a/Makefile +++ b/Makefile @@ -90,9 +90,11 @@ lfs.o: $(LFSDIR)/src/lfs.c $(CC) -c $(CFLAGS) -I$(LUADIR)/src -I$(LFSDIR)/src $(LFSDIR)/src/lfs.c -o $@ fetchthirdparty: - -rmdir mupdf - -rmdir lua - -rm lua + -rm -Rf mupdf + -rm -Rf lua lua-5.1.4* + -rm -Rf lsqlite3_svn08* + -rm -Rf sqlite-amalgamation-3070900* + -rm -Rf luafilesystem* git clone git://git.ghostscript.com/mupdf.git ( cd mupdf ; wget http://www.mupdf.com/download/mupdf-thirdparty.zip && unzip mupdf-thirdparty.zip ) wget http://www.lua.org/ftp/lua-5.1.4.tar.gz && tar xvzf lua-5.1.4.tar.gz && ln -s lua-5.1.4 lua From 9a90b4d599a578d9137f4408770f261227edcea1 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 29 Feb 2012 16:53:40 +0100 Subject: [PATCH 2/4] move FW_PRESS to End in emulation --- keys.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keys.lua b/keys.lua index 7e3f5aec7..adac1aa32 100644 --- a/keys.lua +++ b/keys.lua @@ -115,7 +115,7 @@ function set_emu_keycodes() KEY_FW_DOWN = 116 KEY_FW_LEFT = 113 KEY_FW_RIGHT = 114 - KEY_FW_PRESS = 36 -- enter for now + KEY_FW_PRESS = 115 -- end for now (above arrows) KEY_SPACE = 65 KEY_ENTER = 36 From ffc411096ed8941ca415621580126903dc2e1ca6 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 29 Feb 2012 16:54:06 +0100 Subject: [PATCH 3/4] fix pan by one screen in manual zoom mode --- pdfreader.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdfreader.lua b/pdfreader.lua index bc8b0b37d..49ed164bf 100644 --- a/pdfreader.lua +++ b/pdfreader.lua @@ -437,8 +437,8 @@ function PDFReader:inputloop() x = self.shift_x / 5 y = self.shift_y / 5 elseif self.pan_by_page then - x = self.width - 5; -- small overlap when moving by page - y = self.height - 5; + x = width - 5; -- small overlap when moving by page + y = height - 5; else x = self.shift_x y = self.shift_y From 12fee4f7c5c98f1579edb6b9093c2bb74521098b Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 29 Feb 2012 18:55:58 +0100 Subject: [PATCH 4/4] reset y panning when moving left or right This makes this pan mode really useful, because you don't need to go all the way to top of page when you get to bottom of first column. --- pdfreader.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pdfreader.lua b/pdfreader.lua index 49ed164bf..5b700fdaa 100644 --- a/pdfreader.lua +++ b/pdfreader.lua @@ -453,11 +453,17 @@ function PDFReader:inputloop() if self.offset_x > 0 then self.offset_x = 0 end + if self.pan_by_page then + self.offset_y = 0 + end elseif ev.code == KEY_FW_RIGHT then self.offset_x = self.offset_x - x if self.offset_x < self.min_offset_x then self.offset_x = self.min_offset_x end + if self.pan_by_page then + self.offset_y = 0 + end elseif ev.code == KEY_FW_UP then self.offset_y = self.offset_y + y if self.offset_y > 0 then