]> www.fi.muni.cz Git - evince.git/commitdiff
Disable all zoom related actions during presentation mode.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Wed, 31 Jan 2007 17:30:25 +0000 (17:30 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Wed, 31 Jan 2007 17:30:25 +0000 (17:30 +0000)
2007-01-31  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-window.c: (ev_window_update_actions):
Disable all zoom related actions during presentation mode.

svn path=/trunk/; revision=2282

ChangeLog
shell/ev-window.c

index e82714a70f90f34c7b2145385b909e69b0cfc6af..155c56c067ff4b440d506440fccad19295d09235 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-31  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-window.c: (ev_window_update_actions): 
+
+       Disable all zoom related actions during presentation mode. 
+
 2007-01-31  Esteban Sanchez  <esteban@steve-0.com>
 
        * shell/ev-view.c: (ev_view_zoom_in), (ev_view_zoom_out):
index 341907b7b57597bdb643562881ffdacab1c322fd..2556b62fcb2efd92564e0c792aabc3a5ab0c6a8b 100644 (file)
@@ -401,6 +401,7 @@ ev_window_update_actions (EvWindow *ev_window)
        EvView *view = EV_VIEW (ev_window->priv->view);
        int n_pages = 0, page = -1;
        gboolean has_pages = FALSE;
+       gboolean presentation_mode;
 
        if (ev_window->priv->document && ev_window->priv->page_cache) {
                page = ev_page_cache_get_current_page (ev_window->priv->page_cache);
@@ -408,16 +409,31 @@ ev_window_update_actions (EvWindow *ev_window)
                has_pages = n_pages > 0;
        }
 
-       ev_window_set_action_sensitive (ev_window, "EditCopy", has_pages && ev_view_get_has_selection (view));
+       ev_window_set_action_sensitive (ev_window, "EditCopy",
+                                       has_pages &&
+                                       ev_view_get_has_selection (view));
        ev_window_set_action_sensitive (ev_window, "EditFindNext",
-                             ev_view_can_find_next (view));
+                                       ev_view_can_find_next (view));
        ev_window_set_action_sensitive (ev_window, "EditFindPrevious",
-                             ev_view_can_find_previous (view));
+                                       ev_view_can_find_previous (view));
 
+       presentation_mode = ev_view_get_presentation (view);
+       
        ev_window_set_action_sensitive (ev_window, "ViewZoomIn",
-                             has_pages && ev_view_can_zoom_in (view));
+                                       has_pages &&
+                                       ev_view_can_zoom_in (view) &&
+                                       !presentation_mode);
        ev_window_set_action_sensitive (ev_window, "ViewZoomOut",
-                             has_pages && ev_view_can_zoom_out (view));
+                                       has_pages &&
+                                       ev_view_can_zoom_out (view) &&
+                                       !presentation_mode);
+       
+       ev_window_set_action_sensitive (ev_window, "Plus", !presentation_mode);
+       ev_window_set_action_sensitive (ev_window, "Minus", !presentation_mode);
+       ev_window_set_action_sensitive (ev_window, "KpPlus", !presentation_mode);
+       ev_window_set_action_sensitive (ev_window, "KpMinus", !presentation_mode);
+       ev_window_set_action_sensitive (ev_window, "CtrlKpPlus", !presentation_mode);
+       ev_window_set_action_sensitive (ev_window, "CtrlKpMinus", !presentation_mode);
 
         /* Go menu */
        if (has_pages) {
@@ -454,7 +470,7 @@ 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);