From e044f1f34f994c99ed4cd7744ef3d8af877ca103 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 19 Sep 2005 13:15:20 +0000 Subject: [PATCH] Take all pages in consideration, not just current one 2005-09-19 Marco Pesenti Gritti * shell/ev-view.c: (ev_view_can_find_next): Take all pages in consideration, not just current one --- ChangeLog | 6 ++++++ shell/ev-view.c | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ba3b363b..8208ec9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-09-19 Marco Pesenti Gritti + + * shell/ev-view.c: (ev_view_can_find_next): + + Take all pages in consideration, not just current one + 2005-09-19 Marco Pesenti Gritti * shell/ev-page-cache.c: diff --git a/shell/ev-view.c b/shell/ev-view.c index bc219669..78266944 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -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 -- 2.43.5