]> www.fi.muni.cz Git - evince.git/commitdiff
Fix sensitivity of the Find action
authorDave Malcolm <dmalcolm@redhat.com>
Fri, 14 Jan 2005 00:10:12 +0000 (00:10 +0000)
committerDavid Malcolm <dave_malcolm@src.gnome.org>
Fri, 14 Jan 2005 00:10:12 +0000 (00:10 +0000)
2005-01-13  Dave Malcolm  <dmalcolm@redhat.com>

* shell/ev-window.c (Module): Fix sensitivity of the Find action

ChangeLog
shell/ev-window.c

index 9dc19bcd7b0269eceb490e3bcd938272108327ac..6aca2db29bc5dd91cb5eae49b7d02a6512cd5c4d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-01-13  Dave Malcolm  <dmalcolm@redhat.com>
+
+       * shell/ev-window.c (Module): Fix sensitivity of the Find action
+
 2005-01-13  Marco Pesenti Gritti  <marco@gnome.org>
 
        * pixbuf/pixbuf-document.c: (pixbuf_document_get_link),
index e901704429677be63c89d3f5d3e40c87761e62aa..a1bb4db28fc1689dd49eefffd24a4ade5f6f3bcf 100644 (file)
@@ -177,11 +177,14 @@ set_action_sensitive (EvWindow   *ev_window,
 static void
 update_action_sensitivity (EvWindow *ev_window)
 {
+       EvDocument *document;
        int n_pages;
        int page;
 
-       if (ev_window->priv->document)
-               n_pages = ev_document_get_n_pages (ev_window->priv->document);
+       document = ev_window->priv->document;
+
+       if (document)
+               n_pages = ev_document_get_n_pages (document);
        else
                n_pages = 1;
 
@@ -191,6 +194,13 @@ update_action_sensitivity (EvWindow *ev_window)
        set_action_sensitive (ev_window, "GoPageDown", page > 1);
        set_action_sensitive (ev_window, "GoPageUp", page < n_pages);
        set_action_sensitive (ev_window, "GoLastPage", page < n_pages);
+
+       if (document)
+               set_action_sensitive (ev_window, "EditFind", EV_IS_DOCUMENT_FIND (document));
+       else
+               set_action_sensitive (ev_window, "EditFind", FALSE);
+
+       
 }
 
 void