From fafa1cef81fe708fa734a004bfa1ed0e5dfecd56 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 8 Apr 2005 10:37:32 +0000 Subject: [PATCH] Check that the document supports find 2005-04-08 Marco Pesenti Gritti * shell/ev-view.c: (ev_view_can_find_next): * shell/ev-window.c: (ev_window_setup_document): Check that the document supports find --- ChangeLog | 7 +++++++ shell/ev-view.c | 2 +- shell/ev-window.c | 10 ++++++---- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index de542fb8..c91b6f64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-04-08 Marco Pesenti Gritti + + * shell/ev-view.c: (ev_view_can_find_next): + * shell/ev-window.c: (ev_window_setup_document): + + Check that the document supports find + 2005-04-08 Marco Pesenti Gritti * data/evince-ui.xml: diff --git a/shell/ev-view.c b/shell/ev-view.c index b94a317f..636e0f56 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -1595,7 +1595,7 @@ ev_view_can_find_next (EvView *view) { int n_results = 0; - if (view->document) { + if (EV_IS_DOCUMENT_FIND (view->document)) { EvDocumentFind *find = EV_DOCUMENT_FIND (view->document); g_mutex_lock (EV_DOC_MUTEX); diff --git a/shell/ev-window.c b/shell/ev-window.c index 3185e66e..d5d876b2 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -551,10 +551,12 @@ ev_window_setup_document (EvWindow *ev_window) "notify::title", G_CALLBACK (update_window_title), ev_window, 0); - g_signal_connect_object (G_OBJECT (document), - "find_changed", - G_CALLBACK (find_changed_cb), - ev_window, 0); + if (EV_IS_DOCUMENT_FIND (document)) { + g_signal_connect_object (G_OBJECT (document), + "find_changed", + G_CALLBACK (find_changed_cb), + ev_window, 0); + } ev_window_set_page_mode (ev_window, PAGE_MODE_SINGLE_PAGE); -- 2.43.5