From 5557d61c189dffac514f88ea900c5f3731434253 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 19 Apr 2005 17:14:20 +0000 Subject: 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 --- diff --git a/ChangeLog b/ChangeLog index bf00f2c..a2acf4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 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), (ev_document_get_info), (ev_document_render_pixbuf): * backend/ev-document.h: diff --git a/shell/ev-window.c b/shell/ev-window.c index 2670878..749242d 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) @@ -462,8 +463,17 @@ page_changed_cb (EvPageCache *page_cache, } 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 -- cgit v0.9.1