[evince] [libview] Initialize view from model when a new model is set



commit b58b339283a57ae9a44939a353dc659cb9946621
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Mon Dec 21 13:02:28 2009 +0100

    [libview] Initialize view from model when a new model is set

 libview/ev-view.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 7a3a6dc..79a7c1c 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -5294,6 +5294,16 @@ ev_view_set_model (EvView          *view,
 		g_object_unref (view->model);
 	}
 	view->model = g_object_ref (model);
+
+	/* Initialize view from model */
+	view->rotation = ev_document_model_get_rotation (view->model);
+	view->sizing_mode = ev_document_model_get_sizing_mode (view->model);
+	view->scale = ev_document_model_get_scale (view->model);
+	view->continuous = ev_document_model_get_continuous (view->model);
+	view->dual_page = ev_document_model_get_dual_page (view->model);
+	view->fullscreen = ev_document_model_get_fullscreen (view->model);
+	ev_view_document_changed_cb (view->model, NULL, view);
+
 	g_signal_connect (view->model, "notify::document",
 			  G_CALLBACK (ev_view_document_changed_cb),
 			  view);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]