Fix scrolling when search is used (#532878 by Johan Hovold), apply some more fixes...
authorPacho Ramos <pacho@gentoo.org>
Fri, 19 Dec 2014 14:42:21 +0000 (14:42 +0000)
committerPacho Ramos <pacho@gentoo.org>
Fri, 19 Dec 2014 14:42:21 +0000 (14:42 +0000)
Package-Manager: portage-2.2.15/cvs/Linux x86_64
Manifest-Sign-Key: 0xA188FBD4

app-text/evince/ChangeLog
app-text/evince/Manifest
app-text/evince/evince-3.12.2-r1.ebuild [moved from app-text/evince/evince-3.12.1.ebuild with 78% similarity]
app-text/evince/files/evince-3.12.2-memory-leak.patch [new file with mode: 0644]
app-text/evince/files/evince-3.12.2-print-center.patch [new file with mode: 0644]
app-text/evince/files/evince-3.12.2-scroll-search-1.patch [new file with mode: 0644]
app-text/evince/files/evince-3.12.2-scroll-search-2.patch [new file with mode: 0644]

index e2a1e805202aefe05475cd549e577a4bc797bda6..b0602cf52fe655300ba795d3e4995037e50d3561 100644 (file)
@@ -1,6 +1,16 @@
 # ChangeLog for app-text/evince
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/evince/ChangeLog,v 1.277 2014/12/19 13:34:40 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/evince/ChangeLog,v 1.278 2014/12/19 14:42:20 pacho Exp $
+
+*evince-3.12.2-r1 (19 Dec 2014)
+
+  19 Dec 2014; Pacho Ramos <pacho@gentoo.org> +evince-3.12.2-r1.ebuild,
+  +files/evince-3.12.2-memory-leak.patch,
+  +files/evince-3.12.2-print-center.patch,
+  +files/evince-3.12.2-scroll-search-1.patch,
+  +files/evince-3.12.2-scroll-search-2.patch, -evince-3.12.1.ebuild:
+  Fix scrolling when search is used (#532878 by Johan Hovold), apply some more
+  fixes from 3.12 branch. Drop old.
 
   19 Dec 2014; Pacho Ramos <pacho@gentoo.org> evince-3.12.2.ebuild:
   amd64 stable, bug 529964
index ca021223401d06f9c0784f94cdf3e2729aebbd6a..ba23166300d1625e384f9e8c087e234916519c32 100644 (file)
@@ -1,16 +1,19 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA256
 
-DIST evince-3.12.1.tar.xz 2910936 SHA256 ef22cc29a7cbe70d2e7ce8c0b5b7ee774187ea69f3ae49a64c6d4a91559ef137 SHA512 f95c6f0db920870d45ed63666dd09f0d3c96362fb02e3dcb38658e279b00a204841d967fd10dd4a0ee403740ae9fcef203bfd042bdf87ac83b7fad821cfc91de WHIRLPOOL 23c33181d40f17e26d1f9b7d025f6288771df5b6227f48e758125bac5f63a9952f429c839eb9e7b20d5d987415933eb16b8a252741b37979e2c5517a834fd8f1
+AUX evince-3.12.2-memory-leak.patch 2806 SHA256 460ddeb1381b9a0619a0921c2e7dd6e652d0227d1379f34fa5d6ed88045c13d4 SHA512 4e354d30ef49edcde9c2f2e8315dcf3f51a5a08bd3515ceb08416b0b2d2e5631a4c71d6c35aea4ac0bfd0823424719bc4991cf1c6a2a7b92b2a964dc6c988626 WHIRLPOOL 55b69bbaa1f5a1df5eca961e070e2167b79d4a710b1cfa53ac66c85aa339bd0743a7470dde29790218c9b8afcbe7acb582accd9517ed24e402657e4be2a03449
+AUX evince-3.12.2-print-center.patch 4859 SHA256 eb14027664f9f84ab0366968e5d7917d58c634913c0559ef5d44f2e18f104daf SHA512 c9efd75b334007972c918ec5cf5d5bcc14c0fe1f084a9ea8a40e01ebff0dcd3f93c9e32e0845d55fecdf520aba87e94f8741790fb07312f998f80198de58e1ff WHIRLPOOL c8198cf6d3da399c7f7a0afb0d291445586021dce707a1d1f7c8b0d093de1bbf511579476a27a72bdef3fd1c8468b6c121dec60191adf6c421571974687ff5ca
+AUX evince-3.12.2-scroll-search-1.patch 1069 SHA256 e7a31aa5b69467ef0ab3aa9f1f063114acd1a00a0c81dead5d9cdf162306b1ba SHA512 bd43b783faaf2effc8148b48493a0d69f745dd4967a1595688f9e610e0a4a4e84be76e22e97b1bc8d56112ed7b49128f9722e12362efb80b1dab9cea49ae5bf4 WHIRLPOOL e67b8ff98d555b076d2c0be41a51ebb0c6c73a8065e70e88300952792493291b6f6bbe230eafc9a23fbda890dbba66cf2adef28e905d81761e003278c530d0ea
+AUX evince-3.12.2-scroll-search-2.patch 1442 SHA256 9533f36ac95c9d5e82b58d4fb3134c9897784fb842c949a8afe176f689f36b2e SHA512 f17dea2d71abd5840e3f7fe6eeef8b35037525ec466812b3665d2aa149109e605ae4faf0d7b0d91202325afe0b8847049d7afea190ca824c1673664a3548d83a WHIRLPOOL 086c91e9399850ef2f6743f5f8504c277d1218ede5d12206e8a3ea9ac95b18617563c06484c27b981d3e68c247752640c50888754fe8d4fdf956d524b3326dfd
 DIST evince-3.12.2.tar.xz 2913988 SHA256 30c243bbfde56338c25a39003b4848143be42157177e2163a368f14139909f7d SHA512 e3f14ba75f504fd65a5ef00f732796424302514064f503c4e20371cc862e2a75e12909656dca78e0d9689abdb9c198a4fd098bd81ae203aa897750673be465ad WHIRLPOOL f310e4940ec6ae652ee35ddaae98ee446681552e1e1d641b785ca54a679da236dc3c3ce9679d347a723474f0943265869963774d50965f408094d384fe72b73b
-EBUILD evince-3.12.1.ebuild 2751 SHA256 b2aea0abfdf37648f00e9639a8a1cb65ee0ab6408bd39b5da0d478c3dc6b34cc SHA512 33ffbdf757149c8e9ed5ad527a0e410b6ce63747ea1f57f96d813f916c87a6843e70c5dbf2b796309f02b55a5c34444d523d59a608979486cf4389e55e633ba3 WHIRLPOOL 22e4d185fb750e0d8f4d4b1c683fa08b4433c5a4000e223dd21cf723d46418f3ec629b518f8007ce477e25335bdf9829e86de31728be759bf1e2d22681cfd728
+EBUILD evince-3.12.2-r1.ebuild 3079 SHA256 eddee9e7f9b38d446d45ea8787b195b440193c0b63804ff2743f5cd8b2f2b842 SHA512 97c30cd18809a709aa03ec72fd30cce1c56841948d19e38fbd2a62bc67bc197cb6f59fe6f8ddf8c19cb8ac32388d5f6bd8d649f67e22e854735a01bacf9d8fa5 WHIRLPOOL 95abe41468ebf09d7dec931326266a83a8ef7204b2c37f75f835a18ef717a0c459ec8c2666b83c5c94ebe60a5356cb77661674f0568c2f765d02939a12b510ed
 EBUILD evince-3.12.2.ebuild 2721 SHA256 3d006e1dee77402054fbe99956455c6d453971ef86593ace3d22f59bfc837809 SHA512 3e7e7f36856ce2a4a7fedb7344857aba1b1ea16946be2fd5076bdea2b42c092f1cdd26b1860ca0b8828dc8cac6b442dcc156eddff64c7b08eb4853dc4395b817 WHIRLPOOL fc352d151c630d229da75e0a3ac37c3dff2ac0d1a0b9d1ba087c847608ed438d53f7d959d252bb46b49cef9d4af888404f7becf078463a9fc8a5f7df8b862980
-MISC ChangeLog 42115 SHA256 a9c839b40db26e3984648b504ce313d2e7b41130d66cf95b43f5575e6dd14b4d SHA512 4f56509dd3fde8f1368c53d1046e87fcc78f5f5944977ad62b7809338255f80dcb8abd847ede6b9aa92e079f45cc51c80a04aafe56551b87d14dea840a593cc7 WHIRLPOOL 0ba7f1d4cad31af9c607904a1294bc78048ab9b1cd8043e124e31922b219a92209d5b06600031587c533a7f0e62418da84106f8acd2cb25352020f048252f0f7
+MISC ChangeLog 42536 SHA256 9ffd048b3a7362fad49aeda3e76bdb5b3388e4e87bf53f0058043a4886ae873a SHA512 7f66a0b2a0599bc418fce1f231b5367b63c7383a09ee8097139a85a702b3499966c9670119c9ff3ddcb76c8381a9b952257b1c45e8bd081c86f4e57d12260606 WHIRLPOOL c7107c0ca779a5cde6a9baa1373c11863d0bbf6e659a909eefe4df63900d6de951c60d5bbcdd4ab5079eef1c574518244d9f41a48379dfca53393ca3c6da5b26
 MISC metadata.xml 587 SHA256 6977b9daf0c11361cb1a1e8f44990a728c1420da4daeb5b8aacb0c4aa315ba34 SHA512 234effcc88c91018a986c4513dc7e1436123f0a4b25725bed5c704ae18143bd2827c3d97e39015d0f6b7b0218d32adfbc4f483899493cfbc47de6648bad21020 WHIRLPOOL 52deb1b8aa08dfcb8e4b655a10b00a83221b1a9918e0e26128718e50e89fe0fb3dc2b45dbf362534d41d31134ae5620e449704a7342eef74c9f3be30d8480056
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
-iEYEAREIAAYFAlSUKXEACgkQCaWpQKGI+9QUAQCfU9GfspiRhQTLNdNabQt2Pkj1
-JysAnjFOSaOhpUf6qnEc8CVeJiiT79JH
-=B9CN
+iEYEAREIAAYFAlSUOU0ACgkQCaWpQKGI+9RBngCfTaWS4E8IU3VjmSfUaIsO3/eS
+RGIAn1ZsuOMHA8covyA2BoxDOLaYrtmg
+=VMm7
 -----END PGP SIGNATURE-----
similarity index 78%
rename from app-text/evince/evince-3.12.1.ebuild
rename to app-text/evince/evince-3.12.2-r1.ebuild
index 3ba468579d668dad01699c2ddaba0b1d68429434..bc5f96fd110e2c6aa86454c39250a043ba0d8829 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/evince/evince-3.12.1.ebuild,v 1.4 2014/07/23 15:13:41 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/evince/evince-3.12.2-r1.ebuild,v 1.1 2014/12/19 14:42:20 pacho Exp $
 
 EAPI="5"
 GCONF_DEBUG="yes"
@@ -9,13 +9,13 @@ GNOME2_LA_PUNT="yes"
 inherit eutils gnome2
 
 DESCRIPTION="Simple document viewer for GNOME"
-HOMEPAGE="http://www.gnome.org/projects/evince/"
+HOMEPAGE="https://wiki.gnome.org/Apps/Evince"
 
 LICENSE="GPL-2+ CC-BY-SA-3.0"
 # subslot = evd3.(suffix of libevdocument3)-evv3.(suffix of libevview3)
 SLOT="0/evd3.4-evv3.3"
 IUSE="debug djvu dvi +introspection libsecret nautilus +postscript t1lib tiff xps"
-KEYWORDS="~alpha amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~x64-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~x64-solaris"
 
 # Since 2.26.2, can handle poppler without cairo support. Make it optional ?
 # not mature enough
@@ -65,8 +65,14 @@ DEPEND="${COMMON_DEPEND}
 RESTRICT="test"
 
 src_prepare() {
-       # ???
-       ELTCONF="--portage"
+       # Fix scrolling when searching, bug #532878 (from 'master')
+       epatch "${FILESDIR}"/${PN}-3.12.2-scroll-search-{1,2}.patch
+
+       # Fix centering of documents when printing with a manual scale (from '3.12' branch)
+       epatch "${FILESDIR}"/${P}-print-center.patch
+
+       # libview: fixing memory leak (from '3.12' branch)
+       epatch "${FILESDIR}"/${P}-memory-leak.patch
 
        gnome2_src_prepare
 
diff --git a/app-text/evince/files/evince-3.12.2-memory-leak.patch b/app-text/evince/files/evince-3.12.2-memory-leak.patch
new file mode 100644 (file)
index 0000000..37b1f6d
--- /dev/null
@@ -0,0 +1,96 @@
+From 86cfddae23cacfbb24469f1926cb965522bec6ca Mon Sep 17 00:00:00 2001
+From: Giselle Reis <gisellemnr@src.gnome.org>
+Date: Sat, 30 Aug 2014 00:23:04 +0200
+Subject: libview: fixing memory leak
+
+The memory leak was caused by a g_signal_connect
+which was never disconnected. This patch makes
+sure the signal is disconnected and the job is
+cancelled before creating another rendering job.
+It additionally introduces a helper function to
+cleanly finalize the job.
+
+diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c
+index 897d3de..22170f9 100644
+--- a/libview/ev-pixbuf-cache.c
++++ b/libview/ev-pixbuf-cache.c
+@@ -161,20 +161,27 @@ ev_pixbuf_cache_finalize (GObject *object)
+ }
+ 
+ static void
++end_job (CacheJobInfo *job_info,
++       gpointer      data)
++{
++      g_signal_handlers_disconnect_by_func (job_info->job,
++                                            G_CALLBACK (job_finished_cb),
++                                            data);
++      ev_job_cancel (job_info->job);
++      g_object_unref (job_info->job);
++      job_info->job = NULL;
++}
++
++static void
+ dispose_cache_job_info (CacheJobInfo *job_info,
+                       gpointer      data)
+ {
+       if (job_info == NULL)
+               return;
+ 
+-      if (job_info->job) {
+-              g_signal_handlers_disconnect_by_func (job_info->job,
+-                                                    G_CALLBACK (job_finished_cb),
+-                                                    data);
+-              ev_job_cancel (job_info->job);
+-              g_object_unref (job_info->job);
+-              job_info->job = NULL;
+-      }
++      if (job_info->job)
++              end_job (job_info, data);
++
+       if (job_info->surface) {
+               cairo_surface_destroy (job_info->surface);
+               job_info->surface = NULL;
+@@ -281,14 +288,8 @@ copy_job_to_job_info (EvJobRender   *job_render,
+               job_info->points_set = TRUE;
+       }
+ 
+-      if (job_info->job) {
+-              g_signal_handlers_disconnect_by_func (job_info->job,
+-                                                    G_CALLBACK (job_finished_cb),
+-                                                    pixbuf_cache);
+-              ev_job_cancel (job_info->job);
+-              g_object_unref (job_info->job);
+-              job_info->job = NULL;
+-      }
++      if (job_info->job)
++              end_job (job_info, pixbuf_cache);
+ 
+       job_info->page_ready = TRUE;
+ }
+@@ -337,12 +338,7 @@ check_job_size_and_unref (EvPixbufCache *pixbuf_cache,
+           height == EV_JOB_RENDER (job_info->job)->target_height)
+               return;
+ 
+-      g_signal_handlers_disconnect_by_func (job_info->job,
+-                                            G_CALLBACK (job_finished_cb),
+-                                            pixbuf_cache);
+-      ev_job_cancel (job_info->job);
+-      g_object_unref (job_info->job);
+-      job_info->job = NULL;
++      end_job (job_info, pixbuf_cache);
+ }
+ 
+ /* Do all function that copies a job from an older cache to it's position in the
+@@ -651,6 +647,9 @@ add_job (EvPixbufCache  *pixbuf_cache,
+               cairo_region_destroy (job_info->region);
+       job_info->region = region ? cairo_region_reference (region) : NULL;
+ 
++      if (job_info->job)
++              end_job (job_info, pixbuf_cache);
++
+       job_info->job = ev_job_render_new (pixbuf_cache->document,
+                                          page, rotation, scale,
+                                          width, height);
+-- 
+cgit v0.10.1
+
diff --git a/app-text/evince/files/evince-3.12.2-print-center.patch b/app-text/evince/files/evince-3.12.2-print-center.patch
new file mode 100644 (file)
index 0000000..96e9ae8
--- /dev/null
@@ -0,0 +1,119 @@
+From 1057dc0dd6dee5dc1992fc88b76e4c928d2ff0e7 Mon Sep 17 00:00:00 2001
+From: Carlos Garcia Campos <cgarcia@igalia.com>
+Date: Thu, 14 Aug 2014 14:07:05 +0200
+Subject: print-operation: Fix centering of documents when printing with a
+ manual scale
+
+When a manual scale is used for printing, the document is not correctly
+centered because the cairo context has a scale already applied. We need
+to consider the current scale when centering the page and also convert
+the coordinates before the cairo_translate().
+
+https://bugzilla.gnome.org/show_bug.cgi?id=734788
+
+diff --git a/libview/ev-print-operation.c b/libview/ev-print-operation.c
+index b348038..df41c60 100644
+--- a/libview/ev-print-operation.c
++++ b/libview/ev-print-operation.c
+@@ -1825,6 +1825,27 @@ _print_context_get_hard_margins (GtkPrintContext *context,
+ }
+ 
+ static void
++ev_print_operation_print_get_scaled_page_size (EvPrintOperationPrint *print,
++                                               gint                   page,
++                                               gdouble               *width,
++                                               gdouble               *height)
++{
++        GtkPrintSettings *settings;
++        gdouble           manual_scale;
++
++        ev_document_get_page_size (EV_PRINT_OPERATION (print)->document,
++                                   page, width, height);
++
++        settings = gtk_print_operation_get_print_settings (print->op);
++        manual_scale = gtk_print_settings_get_scale (settings) / 100.0;
++        if (manual_scale == 1.0)
++                return;
++
++        *width *= manual_scale;
++        *height *= manual_scale;
++}
++
++static void
+ ev_print_operation_print_draw_page (EvPrintOperationPrint *print,
+                                   GtkPrintContext       *context,
+                                   gint                   page)
+@@ -1834,6 +1855,7 @@ ev_print_operation_print_draw_page (EvPrintOperationPrint *print,
+       gdouble           cr_width, cr_height;
+       gdouble           width, height, scale;
+       gdouble           x_scale, y_scale;
++        gdouble           x_offset, y_offset;
+       gdouble           top, bottom, left, right;
+ 
+       gtk_print_operation_set_defer_drawing (print->op);
+@@ -1857,12 +1879,16 @@ ev_print_operation_print_draw_page (EvPrintOperationPrint *print,
+       cr = gtk_print_context_get_cairo_context (context);
+       cr_width = gtk_print_context_get_width (context);
+       cr_height = gtk_print_context_get_height (context);
+-      ev_document_get_page_size (op->document, page, &width, &height);
++        ev_print_operation_print_get_scaled_page_size (print, page, &width, &height);
+ 
+       if (print->page_scale == EV_SCALE_NONE) {
+               /* Center document page on the printed page */
+-              if (print->autorotate)
+-                      cairo_translate (cr, (cr_width - width) / 2, (cr_height - height) / 2);
++              if (print->autorotate) {
++                        x_offset = (cr_width - width) / 2;
++                        y_offset = (cr_height - height) / 2;
++                        cairo_device_to_user (cr, &x_offset, &y_offset);
++                        cairo_translate (cr, x_offset, y_offset);
++                }
+       } else {
+               _print_context_get_hard_margins (context, &top, &bottom, &left, &right);
+ 
+@@ -1875,29 +1901,27 @@ ev_print_operation_print_draw_page (EvPrintOperationPrint *print,
+                         scale = 1.0;
+ 
+               if (print->autorotate) {
+-                      double left_right_sides, top_bottom_sides;
+-
+-                      cairo_translate (cr, (cr_width - scale * width) / 2,
+-                                       (cr_height - scale * height) / 2);
++                        x_offset = (cr_width - scale * width) / 2;
++                        y_offset = (cr_height - scale * height) / 2;
++                        cairo_device_to_user (cr, &x_offset, &y_offset);
++                        cairo_translate (cr, x_offset, y_offset);
+ 
+                       /* Ensure document page is within the margins. The
+                        * scale guarantees the document will fit in the
+                        * margins so we just need to check each side and
+                        * if it overhangs the margin, translate it to the
+-                       * margin. */
+-                      left_right_sides = (cr_width - width*scale)/2;
+-                      top_bottom_sides = (cr_height - height*scale)/2;
+-                      if (left_right_sides < left)
+-                              cairo_translate (cr, left - left_right_sides, 0);
++                         * margin. */
++                      if (x_offset < left)
++                              cairo_translate (cr, left - x_offset, 0);
+ 
+-                      if (left_right_sides < right)
+-                              cairo_translate (cr, -(right - left_right_sides), 0);
++                      if (x_offset < right)
++                              cairo_translate (cr, -(right - x_offset), 0);
+ 
+-                      if (top_bottom_sides < top)
+-                              cairo_translate (cr, 0, top - top_bottom_sides);
++                      if (y_offset < top)
++                              cairo_translate (cr, 0, top - y_offset);
+ 
+-                      if (top_bottom_sides < bottom)
+-                              cairo_translate (cr, 0, -(bottom - top_bottom_sides));
++                      if (y_offset < bottom)
++                              cairo_translate (cr, 0, -(bottom - y_offset));
+               } else {
+                       cairo_translate (cr, left, top);
+               }
+-- 
+cgit v0.10.1
+
diff --git a/app-text/evince/files/evince-3.12.2-scroll-search-1.patch b/app-text/evince/files/evince-3.12.2-scroll-search-1.patch
new file mode 100644 (file)
index 0000000..af985ba
--- /dev/null
@@ -0,0 +1,38 @@
+From 2cb9d88d7b396b6ac4bb01c035a40b48da419b65 Mon Sep 17 00:00:00 2001
+From: Marek Kasik <mkasik@redhat.com>
+Date: Mon, 19 May 2014 14:32:19 +0200
+Subject: [PATCH 1/2] [libview] Scroll to the search result selected by user
+
+Scroll to page on which is the search result selected by user
+when not in continuous mode.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=730252
+---
+ libview/ev-view.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/libview/ev-view.c b/libview/ev-view.c
+index 7618bbd..393bf77 100644
+--- a/libview/ev-view.c
++++ b/libview/ev-view.c
+@@ -7684,6 +7684,9 @@ jump_to_find_page (EvView *view, EvViewFindDirection direction, gint shift)
+                       break;
+               }
+       }
++
++      if (!view->continuous)
++              ev_document_model_set_page (view->model, view->find_page);
+ }
+ 
+ static void
+@@ -7808,6 +7811,7 @@ ev_view_find_set_result (EvView *view, gint page, gint result)
+ {
+       view->find_page = page;
+       view->find_result = result;
++      jump_to_find_page (view, EV_VIEW_FIND_NEXT, 0);
+       jump_to_find_result (view);
+       gtk_widget_queue_draw (GTK_WIDGET (view));
+ }
+-- 
+1.9.0
+
diff --git a/app-text/evince/files/evince-3.12.2-scroll-search-2.patch b/app-text/evince/files/evince-3.12.2-scroll-search-2.patch
new file mode 100644 (file)
index 0000000..f7dfaef
--- /dev/null
@@ -0,0 +1,41 @@
+From dd3df79ea999850c737b049081d81afa59af22d3 Mon Sep 17 00:00:00 2001
+From: Marek Kasik <mkasik@redhat.com>
+Date: Tue, 18 Nov 2014 12:53:40 +0100
+Subject: [PATCH] [libview] Show correct page when next search result requested
+
+If there are more than 1 results on a page then requesting
+next search result from the same page will not return you
+to the page with the search results if you moved from the
+page in the meantime (when you are not in continuous mode).
+This applies also to previous results.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=730252
+---
+ libview/ev-view.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/libview/ev-view.c b/libview/ev-view.c
+index f3aa033..a9159cd 100644
+--- a/libview/ev-view.c
++++ b/libview/ev-view.c
+@@ -8250,6 +8250,8 @@ ev_view_find_next (EvView *view)
+       if (view->find_result >= n_results) {
+               view->find_result = 0;
+               jump_to_find_page (view, EV_VIEW_FIND_NEXT, 1);
++      } else if (view->find_page != view->current_page) {
++              jump_to_find_page (view, EV_VIEW_FIND_NEXT, 0);
+       }
+ 
+       jump_to_find_result (view);
+@@ -8264,6 +8266,8 @@ ev_view_find_previous (EvView *view)
+       if (view->find_result < 0) {
+               jump_to_find_page (view, EV_VIEW_FIND_PREV, -1);
+               view->find_result = MAX (0, ev_view_find_get_n_results (view, view->find_page) - 1);
++      } else if (view->find_page != view->current_page) {
++              jump_to_find_page (view, EV_VIEW_FIND_PREV, 0);
+       }
+ 
+       jump_to_find_result (view);
+-- 
+2.1.0
+