Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2005-04-08 10:37:32 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-04-08 10:37:32 (GMT)
commitfafa1cef81fe708fa734a004bfa1ed0e5dfecd56 (patch)
tree7ca826d6726f05512a66f2a367a3ffb84ba6b227
parentf9df2040ea8d3d5814257a45c23461eda0532f4e (diff)
Check that the document supports find
2005-04-08 Marco Pesenti Gritti <mpg@redhat.com> * shell/ev-view.c: (ev_view_can_find_next): * shell/ev-window.c: (ev_window_setup_document): Check that the document supports find
-rw-r--r--ChangeLog7
-rw-r--r--shell/ev-view.c2
-rw-r--r--shell/ev-window.c10
3 files changed, 14 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index de542fb..c91b6f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2005-04-08 Marco Pesenti Gritti <mpg@redhat.com>
+ * 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 <mpg@redhat.com>
+
* data/evince-ui.xml:
* shell/ev-view.c: (ev_view_can_find_next):
* shell/ev-view.h:
diff --git a/shell/ev-view.c b/shell/ev-view.c
index b94a317..636e0f5 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 3185e66..d5d876b 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);