]> www.fi.muni.cz Git - evince.git/commitdiff
Take all pages in consideration, not just current one
authorMarco Pesenti Gritti <mpg@redhat.com>
Mon, 19 Sep 2005 13:15:20 +0000 (13:15 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Mon, 19 Sep 2005 13:15:20 +0000 (13:15 +0000)
2005-09-19  Marco Pesenti Gritti  <mpg@redhat.com>

        * shell/ev-view.c: (ev_view_can_find_next):

        Take all pages in consideration, not just current one

ChangeLog
shell/ev-view.c

index ba3b363b618736b4f9105579afaf027083c75cc0..8208ec9e7908185dc58745b07e32dbf669354274 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-09-19  Marco Pesenti Gritti  <mpg@redhat.com>
+
+       * shell/ev-view.c: (ev_view_can_find_next):
+
+       Take all pages in consideration, not just current one
+
 2005-09-19  Marco Pesenti Gritti  <mpg@redhat.com>
 
        * shell/ev-page-cache.c:
index bc2196692ba468d9084a1ebd9ed890a020a7a994..78266944ac9ad6d47292a989e6d3ffa7203ea704 100644 (file)
@@ -3007,15 +3007,19 @@ jump_to_find_page (EvView *view, EvViewFindDirection direction)
 gboolean
 ev_view_can_find_next (EvView *view)
 {
-       int n_results = 0;
-
        if (EV_IS_DOCUMENT_FIND (view->document)) {
                EvDocumentFind *find = EV_DOCUMENT_FIND (view->document);
+               int i, n_pages;
 
-               n_results = ev_document_find_get_n_results (find, view->current_page);
+               n_pages = ev_page_cache_get_n_pages (view->page_cache);
+               for (i = 0; i < n_pages; i++) {
+                       if (ev_document_find_get_n_results (find, i) > 0) {
+                               return TRUE;
+                       }
+               }
        }
 
-       return n_results > 0;
+       return FALSE;
 }
 
 void