Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-view.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2006-12-24 15:19:13 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2006-12-24 15:19:13 (GMT)
commit69e9b806bc1420056bcd4d21d81aba0e74f3afdf (patch)
treed67b7357d5d435a1ff4001b178d7ea939e1f8c4f /shell/ev-view.c
parent468078222d0731715c875f52304bfb942f5b2942 (diff)
Restore zoom settings when back from presentation mode.
2006-12-24 Carlos Garcia Campos <carlosgc@gnome.org> * shell/ev-window.c: (ev_window_run_presentation): * shell/ev-view-private.h: * shell/ev-view.c: (ev_view_set_presentation): Restore zoom settings when back from presentation mode.
Diffstat (limited to 'shell/ev-view.c')
-rw-r--r--shell/ev-view.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/shell/ev-view.c b/shell/ev-view.c
index 0db0536..8d65fb4 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -3409,6 +3409,16 @@ ev_view_set_presentation (EvView *view,
view->presentation = presentation;
view->pending_scroll = SCROLL_TO_PAGE_POSITION;
+
+ if (presentation) {
+ view->sizing_mode_saved = view->sizing_mode;
+ view->scale_saved = view->scale;
+ ev_view_set_sizing_mode (view, EV_SIZING_BEST_FIT);
+ } else {
+ ev_view_set_sizing_mode (view, view->sizing_mode_saved);
+ ev_view_set_zoom (view, view->scale_saved, FALSE);
+ }
+
gtk_widget_queue_resize (GTK_WIDGET (view));
if (GTK_WIDGET_REALIZED (view)) {