]> www.fi.muni.cz Git - evince.git/commitdiff
Don't enable Splash on documents which don't support find. Fixes bug
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>
Sun, 1 Oct 2006 09:13:59 +0000 (09:13 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Sun, 1 Oct 2006 09:13:59 +0000 (09:13 +0000)
2006-10-01  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>

* shell/ev-window.c: (ev_window_setup_action_sensitivity),
(ev_window_set_view_accels_sensitivity):

Don't enable Splash on documents which don't support
find. Fixes bug #358648.

ChangeLog
shell/ev-window.c

index e3095681164dcb5c8ef3fd198feeb8999d4c6221..cd8ca393c0b0f0ffe5a3fadfb1c5b06e70882d0b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-10-01  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
+
+       * shell/ev-window.c: (ev_window_setup_action_sensitivity),
+       (ev_window_set_view_accels_sensitivity):
+       
+       Don't enable Splash on documents which don't support
+       find. Fixes bug #358648.
+
 2006-10-01  Wouter Bolsterlee  <wbolster@gnome.org>
 
        * shell/ev-window.c: (ev_window_cmd_file_open): Make the
index 3593f40a1af56ba302eef08a53ad39a5760ca490..2612ac18e5563d2e4dcc341719eef01124c23728 100644 (file)
@@ -299,7 +299,7 @@ ev_window_setup_action_sensitivity (EvWindow *ev_window)
                can_get_text = TRUE;
        }
        
-       if (has_document && EV_IS_DOCUMENT_FIND (document)) {
+       if (has_pages && EV_IS_DOCUMENT_FIND (document)) {
                can_find = TRUE;
        }
 
@@ -336,10 +336,8 @@ ev_window_setup_action_sensitivity (EvWindow *ev_window)
 
         /* Edit menu */
        ev_window_set_action_sensitive (ev_window, "EditSelectAll", has_pages && can_get_text);
-       ev_window_set_action_sensitive (ev_window, "EditFind",
-                             has_pages && EV_IS_DOCUMENT_FIND (document));
-       ev_window_set_action_sensitive (ev_window, "Slash",
-                             has_pages && EV_IS_DOCUMENT_FIND (document));
+       ev_window_set_action_sensitive (ev_window, "EditFind", can_find);
+       ev_window_set_action_sensitive (ev_window, "Slash", can_find);
        ev_window_set_action_sensitive (ev_window, "EditRotateLeft", has_pages);
        ev_window_set_action_sensitive (ev_window, "EditRotateRight", has_pages);
 
@@ -414,6 +412,11 @@ ev_window_update_actions (EvWindow *ev_window)
 static void
 ev_window_set_view_accels_sensitivity (EvWindow *window, gboolean sensitive)
 {
+       gboolean can_find;
+       
+       can_find = window->priv->document && 
+           EV_IS_DOCUMENT_FIND (window->priv->document);
+
        if (window->priv->action_group) {
                ev_window_set_action_sensitive (window, "PageDown", sensitive);
                ev_window_set_action_sensitive (window, "PageUp", sensitive);
@@ -423,12 +426,13 @@ ev_window_set_view_accels_sensitivity (EvWindow *window, gboolean sensitive)
                ev_window_set_action_sensitive (window, "ShiftBackSpace", sensitive);
                ev_window_set_action_sensitive (window, "Return", sensitive);
                ev_window_set_action_sensitive (window, "ShiftReturn", sensitive);
-               ev_window_set_action_sensitive (window, "Slash", sensitive);
                ev_window_set_action_sensitive (window, "Plus", sensitive);
                ev_window_set_action_sensitive (window, "Minus", sensitive);
                ev_window_set_action_sensitive (window, "KpPlus", sensitive);
                ev_window_set_action_sensitive (window, "KpMinus", sensitive);
                ev_window_set_action_sensitive (window, "Equal", sensitive);
+
+               ev_window_set_action_sensitive (window, "Slash", sensitive && can_find);
        }
 }