From 5557d61c189dffac514f88ea900c5f3731434253 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 19 Apr 2005 17:14:20 +0000 Subject: [PATCH] Show the window in fullscreen when specified by the document 2005-04-19 Marco Pesenti Gritti * shell/ev-window.c: (update_document_mode), (ev_window_setup_document): Show the window in fullscreen when specified by the document --- ChangeLog | 8 ++++++++ shell/ev-window.c | 14 ++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/ChangeLog b/ChangeLog index bf00f2c4..a2acf4f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-04-19 Marco Pesenti Gritti + + * shell/ev-window.c: (update_document_mode), + (ev_window_setup_document): + + Show the window in fullscreen when specified by + the document + 2005-04-19 Marco Pesenti Gritti * backend/ev-document.c: (ev_document_class_init), diff --git a/shell/ev-window.c b/shell/ev-window.c index 26708788..749242d8 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -156,6 +156,7 @@ static void ev_window_set_sizing_mode (EvWindow *ev_window, EvSizingMode sizing_mode); static void ev_window_add_recent (EvWindow *window, const char *filename); +static void ev_window_fullscreen (EvWindow *window); G_DEFINE_TYPE (EvWindow, ev_window, GTK_TYPE_WINDOW) @@ -461,9 +462,18 @@ page_changed_cb (EvPageCache *page_cache, update_action_sensitivity (ev_window); } +static void +update_document_mode (EvWindow *window, EvDocumentMode mode) +{ + if (mode == EV_DOCUMENT_MODE_FULL_SCREEN) { + gtk_window_fullscreen (GTK_WINDOW (window)); + } +} + static void ev_window_setup_document (EvWindow *ev_window) { + EvDocumentInfo *info; EvDocument *document; EvView *view = EV_VIEW (ev_window->priv->view); EvSidebar *sidebar = EV_SIDEBAR (ev_window->priv->sidebar); @@ -496,6 +506,10 @@ ev_window_setup_document (EvWindow *ev_window) action = gtk_action_group_get_action (ev_window->priv->action_group, PAGE_SELECTOR_ACTION); ev_page_action_set_document (EV_PAGE_ACTION (action), document); update_action_sensitivity (ev_window); + + info = ev_document_get_info (document); + update_document_mode (ev_window, info->mode); + g_free (info); } static void -- 2.43.5