]> www.fi.muni.cz Git - evince.git/commitdiff
Check that the document supports find
authorMarco Pesenti Gritti <mpg@redhat.com>
Fri, 8 Apr 2005 10:37:32 +0000 (10:37 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Fri, 8 Apr 2005 10:37:32 +0000 (10:37 +0000)
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

ChangeLog
shell/ev-view.c
shell/ev-window.c

index de542fb82a3506ef8dd694349c7f85c5bda29466..c91b6f6436a6dad32fafa5e2c8b6189525f116df 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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:
index b94a317fca6b25e3baaa23d3ffdb680b4f196f06..636e0f566b4dfe04b163fc666d6efccfa35a7176 100644 (file)
@@ -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);
index 3185e66e39dc17f943dadfd428cf54d46eb7769c..d5d876b2aba984e55b29178926cf1db153414339 100644 (file)
@@ -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);