From 4d67007ded4eea4362878c78248ccb3d5ba3f5ee Mon Sep 17 00:00:00 2001 From: "Nickolay V. Shmyrev" Date: Sun, 3 Jul 2005 09:59:32 +0000 Subject: [PATCH] Exit from fullscreen mode when switch to presentation. Fix for bug 309365 * shell/ev-window.c: (update_document_mode), (ev_window_run_fullscreen), (ev_window_stop_fullscreen), (ev_window_cmd_view_fullscreen), (ev_window_stop_presentation), (ev_window_cmd_view_presentation), (ev_window_cmd_escape): Exit from fullscreen mode when switch to presentation. Fix for bug 309365 --- ChangeLog | 10 ++++++++++ shell/ev-window.c | 22 +++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6f538331..0239ec8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-07-03 Nickolay V. Shmyrev + + * shell/ev-window.c: (update_document_mode), + (ev_window_run_fullscreen), (ev_window_stop_fullscreen), + (ev_window_cmd_view_fullscreen), (ev_window_stop_presentation), + (ev_window_cmd_view_presentation), (ev_window_cmd_escape): + + Exit from fullscreen mode when switch to presentation. Fix for + bug 309365 + 2005-07-02 Matthew S. Wilson * shell/ev-pixbuf-cache.c (ev_pixbuf_cache_get_selection_pixbuf): diff --git a/shell/ev-window.c b/shell/ev-window.c index b61926dc..72b7a38c 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -180,8 +180,8 @@ static void ev_window_zoom_changed_cb (EvView *view, EvWindow *ev_window); static void ev_window_add_recent (EvWindow *window, const char *filename); -static void ev_window_fullscreen (EvWindow *window); -static void ev_window_unfullscreen (EvWindow *window); +static void ev_window_run_fullscreen (EvWindow *window); +static void ev_window_stop_fullscreen (EvWindow *window); static void ev_window_cmd_view_fullscreen (GtkAction *action, EvWindow *window); static void ev_window_run_presentation (EvWindow *window); @@ -623,7 +623,7 @@ update_document_mode (EvWindow *window, EvDocumentMode mode) ev_window_run_presentation (window); } else if (mode == EV_DOCUMENT_MODE_FULL_SCREEN) { - ev_window_fullscreen (window); + ev_window_run_fullscreen (window); } } @@ -1634,7 +1634,7 @@ ev_window_update_fullscreen_action (EvWindow *window) } static void -ev_window_fullscreen (EvWindow *window) +ev_window_run_fullscreen (EvWindow *window) { ev_view_set_fullscreen (EV_VIEW (window->priv->view), TRUE); if (window->priv->fullscreen_popup == NULL) @@ -1663,10 +1663,13 @@ ev_window_fullscreen (EvWindow *window) } static void -ev_window_unfullscreen (EvWindow *window) +ev_window_stop_fullscreen (EvWindow *window) { EvView *view = EV_VIEW (window->priv->view); + if (!ev_view_get_fullscreen (EV_VIEW (view))) + return; + ev_view_set_fullscreen (view, FALSE); g_object_set (G_OBJECT (window->priv->scrolled_window), "shadow-type", GTK_SHADOW_IN, @@ -1695,9 +1698,9 @@ ev_window_cmd_view_fullscreen (GtkAction *action, EvWindow *window) fullscreen = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); if (fullscreen) { - ev_window_fullscreen (window); + ev_window_run_fullscreen (window); } else { - ev_window_unfullscreen (window); + ev_window_stop_fullscreen (window); } } @@ -1732,7 +1735,7 @@ ev_window_run_presentation (EvWindow *window) static void ev_window_stop_presentation (EvWindow *window) { - if (! ev_view_get_presentation (EV_VIEW (window->priv->view))) + if (!ev_view_get_presentation (EV_VIEW (window->priv->view))) return; g_object_set (G_OBJECT (window->priv->scrolled_window), @@ -1750,6 +1753,7 @@ ev_window_cmd_view_presentation (GtkAction *action, EvWindow *window) gboolean presentation; g_return_if_fail (EV_IS_WINDOW (window)); + ev_window_stop_fullscreen (window); presentation = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); if (presentation) { @@ -2042,7 +2046,7 @@ ev_window_cmd_escape (GtkAction *action, EvWindow *window) NULL); if (fullscreen) - ev_window_unfullscreen (window); + ev_window_stop_fullscreen (window); if (presentation) ev_window_stop_presentation (window); -- 2.43.5