diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2005-04-19 17:14:20 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2005-04-19 17:14:20 (GMT) |
commit | 5557d61c189dffac514f88ea900c5f3731434253 (patch) | |
tree | 9dc3d1c89d4d93dfd1a3aef7f6fedf368fc9e29f | |
parent | 6b05feae2e57d126f57a1f40527ff387070e9a73 (diff) |
Show the window in fullscreen when specified by the document
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
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | shell/ev-window.c | 14 |
2 files changed, 22 insertions, 0 deletions
@@ -1,5 +1,13 @@ 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), (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 |