]> www.fi.muni.cz Git - evince.git/commitdiff
Show the window in fullscreen when specified by the document
authorMarco Pesenti Gritti <mpg@redhat.com>
Tue, 19 Apr 2005 17:14:20 +0000 (17:14 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Tue, 19 Apr 2005 17:14:20 +0000 (17:14 +0000)
2005-04-19  Marco Pesenti Gritti <mpg@redhat.com>

        * shell/ev-window.c: (update_document_mode),
        (ev_window_setup_document):

        Show the window in fullscreen when specified by
        the document

ChangeLog
shell/ev-window.c

index bf00f2c46f2c69588626e9d7396a29c89863308b..a2acf4f4b8a1fe4b071b88502cf5437e5114460b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-04-19  Marco Pesenti Gritti <mpg@redhat.com>
+
+       * 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 <mpg@redhat.com>
 
        * backend/ev-document.c: (ev_document_class_init),
index 26708788d897f816e516b29631678545ad583042..749242d89a4abca2007c728c1e20315d570fe1bc 100644 (file)
@@ -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