From: Carlos Garcia Campos Date: Mon, 21 Dec 2009 12:02:28 +0000 (+0100) Subject: [libview] Initialize view from model when a new model is set X-Git-Tag: EVINCE_2_29_4~2 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=b58b339283a57ae9a44939a353dc659cb9946621;p=evince.git [libview] Initialize view from model when a new model is set --- diff --git a/libview/ev-view.c b/libview/ev-view.c index 7a3a6dc2..79a7c1cb 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);