diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2005-09-19 13:15:20 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2005-09-19 13:15:20 (GMT) |
commit | e044f1f34f994c99ed4cd7744ef3d8af877ca103 (patch) | |
tree | 80f6cb6d03bab6c9a67ec43cf1fc904618bcc798 | |
parent | 00a3581bfaaf0d5f825820c68b515415fe510b66 (diff) |
Take all pages in consideration, not just current one
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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | shell/ev-view.c | 12 |
2 files changed, 14 insertions, 4 deletions
@@ -1,5 +1,11 @@ 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: * shell/ev-page-cache.h: * shell/ev-view.c: (ev_view_binding_activated), diff --git a/shell/ev-view.c b/shell/ev-view.c index bc21966..7826694 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 |