]> www.fi.muni.cz Git - evince.git/commitdiff
[libview] Initialize view from model when a new model is set
authorCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 21 Dec 2009 12:02:28 +0000 (13:02 +0100)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 21 Dec 2009 12:02:28 +0000 (13:02 +0100)
libview/ev-view.c

index 7a3a6dc276f116ce3e466f28617c7b1422ba164f..79a7c1cb0e105129cda6414dce303fbfae1b8c56 100644 (file)
@@ -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);