From: Carlos Garcia Campos Date: Wed, 31 Jan 2007 17:30:25 +0000 (+0000) Subject: Disable all zoom related actions during presentation mode. X-Git-Tag: EVINCE_0_7_2~39 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=82f0c287b85ccb54a8761718c1ba95f32168d89f;p=evince.git Disable all zoom related actions during presentation mode. 2007-01-31 Carlos Garcia Campos * shell/ev-window.c: (ev_window_update_actions): Disable all zoom related actions during presentation mode. svn path=/trunk/; revision=2282 --- diff --git a/ChangeLog b/ChangeLog index e82714a7..155c56c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-01-31 Carlos Garcia Campos + + * shell/ev-window.c: (ev_window_update_actions): + + Disable all zoom related actions during presentation mode. + 2007-01-31 Esteban Sanchez * shell/ev-view.c: (ev_view_zoom_in), (ev_view_zoom_out): diff --git a/shell/ev-window.c b/shell/ev-window.c index 341907b7..2556b62f 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -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);