summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2012-01-28 21:14:47 +0000
committerMichael Weber <xmw@gentoo.org>2012-01-28 21:14:47 +0000
commit7a7bd5b73f6603a9c4a7567a23bfcb581d9423fd (patch)
tree9627a2de19392009d86d0301d517a14936fb97b4 /app-text/mupdf/files
parentVersion bump to 0.3.0 Bug #383411 (diff)
downloadgentoo-2-7a7bd5b73f6603a9c4a7567a23bfcb581d9423fd.tar.gz
gentoo-2-7a7bd5b73f6603a9c4a7567a23bfcb581d9423fd.tar.bz2
gentoo-2-7a7bd5b73f6603a9c4a7567a23bfcb581d9423fd.zip
Updated -9999.build (thanks Shark, bug 401205), remove old version
(Portage version: 2.1.10.44/cvs/Linux x86_64)
Diffstat (limited to 'app-text/mupdf/files')
-rw-r--r--app-text/mupdf/files/mupdf-9999-scroll.patch59
-rw-r--r--app-text/mupdf/files/mupdf-9999-zoom.patch57
2 files changed, 116 insertions, 0 deletions
diff --git a/app-text/mupdf/files/mupdf-9999-scroll.patch b/app-text/mupdf/files/mupdf-9999-scroll.patch
new file mode 100644
index 000000000000..d74839185606
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-9999-scroll.patch
@@ -0,0 +1,59 @@
+From http://aur.archlinux.org/packages.php?ID=52333
+
+--- mupdf-0.9/apps/pdfapp.c
++++ mupdf-0.9/apps/pdfapp.c
+@@ -817,11 +817,15 @@
+ break;
+
+ case 'j':
++ if (app->pany + app->image->h <= app->winh)
++ goto pagedown;
+ app->pany -= app->image->h / 10;
+ pdfapp_showpage(app, 0, 0, 1);
+ break;
+
+ case 'k':
++ if (app->pany >= 0)
++ goto pageup;
+ app->pany += app->image->h / 10;
+ pdfapp_showpage(app, 0, 0, 1);
+ break;
+@@ -885,6 +889,7 @@
+ */
+
+ case ',':
++ pageup:
+ panto = PAN_TO_BOTTOM;
+ if (app->numberlen > 0)
+ app->pageno -= atoi(app->number);
+@@ -893,6 +898,7 @@
+ break;
+
+ case '.':
++ pagedown:
+ panto = PAN_TO_TOP;
+ if (app->numberlen > 0)
+ app->pageno += atoi(app->number);
+@@ -902,7 +908,7 @@
+ case 'b':
+ case '\b': //backspace
+- panto = DONT_PAN;
++ panto = PAN_TO_TOP;
+ if (app->numberlen > 0)
+ app->pageno -= atoi(app->number);
+ else
+
+@ -1067,7 +1073,12 @@
+ int isx = (modifiers & (1<<0));
+ int xstep = isx ? 20 * dir : 0;
+ int ystep = !isx ? 20 * dir : 0;
+- pdfapp_panview(app, app->panx + xstep, app->pany + ystep);
++ if (!isx && dir < 0 && app->pany + app->image->h <= app->winh)
++ pdfapp_onkey(app, 'j');
++ else if (!isx && dir > 0 && app->pany >= 0)
++ pdfapp_onkey(app, 'k');
++ else
++ pdfapp_panview(app, app->panx + xstep, app->pany + ystep);
+ }
+ }
+ }
diff --git a/app-text/mupdf/files/mupdf-9999-zoom.patch b/app-text/mupdf/files/mupdf-9999-zoom.patch
new file mode 100644
index 000000000000..9db6aa3dffd4
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-9999-zoom.patch
@@ -0,0 +1,57 @@
+--- mupdf-0.8.165/apps/man/mupdf.1
++++ mupdf-0.8.165/apps/man/mupdf.1
+@@ -37,6 +37,15 @@
+ .B \+, \-
+ Zoom in or out.
+ .TP
++.B _
++Reset zoom to default (72dpi).
++.TP
++.B z
++Zoom page size to fit into the window frame.
++.TP
++.B Z
++Zoom page size to fill the window frame.
++.TP
+ .B w
+ Shrinkwrap window to fit the page.
+ .TP
+--- mupdf-0.8.165/apps/pdfapp.c
++++ mupdf-0.8.165/apps/pdfapp.c
+@@ -736,6 +736,20 @@
+ pdfapp_showpage(app, 0, 1, 1);
+ break;
+
++ case '_': // zoom to default resolution
++ app->resolution = 72;
++ pdfapp_showpage(app, 0, 1, 1);
++ break;
++
++ case 'z': // zoom to fit window
++ case 'Z': // zoom to fill window
++ if ( ( c == 'Z' ) ^ ( app->image->w * app->winh > app->winw * app->image->h ) )
++ app->resolution = ( app->resolution * app->winw ) / app->image->w;
++ else
++ app->resolution = ( app->resolution * app->winh ) / app->image->h;
++ pdfapp_showpage(app, 0, 1, 1);
++ break;
++
+ case 'L':
+ app->rotate -= 90;
+ pdfapp_showpage(app, 0, 1, 1);
+@@ -859,6 +873,7 @@
+ break;
+
+ case 'b':
++ case '\b': //backspace
+ panto = DONT_PAN;
+ if (app->numberlen > 0)
+ app->pageno -= atoi(app->number);
+@@ -867,6 +882,7 @@
+ break;
+
+ case ' ':
++ case 'F':
+ panto = DONT_PAN;
+ if (app->numberlen > 0)
+ app->pageno += atoi(app->number);