]> www.fi.muni.cz Git - evince.git/commitdiff
[dualhead] notwsview > needs work with document model
authorLukáš Bezdička <255993@mail.muni.cz>
Wed, 6 Apr 2011 21:42:12 +0000 (23:42 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Wed, 1 Jun 2011 11:09:21 +0000 (13:09 +0200)
shell/ev-dualscreen.c

index 7f60546556e797cb8d7af1695654529064ab4b02..740cb8e1241f6da4e6d4c906d22a1dcb1dddc501 100644 (file)
@@ -283,28 +283,21 @@ ev_dscwindow_init (EvDSCWindow *ev_dscwindow)
        gtk_box_pack_end (GTK_BOX (v), e, FALSE, TRUE, 0);
        gtk_paned_add1 (GTK_PANED (h), v);
 
-/*
-       priv->notesview_scrolled_window = GTK_WIDGET (g_object_new (
+       ev_dscwindow->priv->notesview_scrolled_window = GTK_WIDGET (g_object_new (
                GTK_TYPE_SCROLLED_WINDOW, "shadow-type", GTK_SHADOW_IN, NULL));
-       gtk_paned_add2 (GTK_PANED (h), priv->notesview_scrolled_window);
-
-       priv->notesview = ev_view_new ();
-       g_object_ref (priv->notesview);
-       ev_view_set_screen_dpi (EV_VIEW (priv->notesview),
-                               get_screen_dpi (GTK_WINDOW (self)));
-+              gtk_container_add (GTK_CONTAINER (priv->notesview_scrolled_window),
-+                                 priv->notesview);
-+
-+              ev_view_set_continuous (EV_VIEW (priv->notesview), FALSE);
-+              ev_view_set_dual_page (EV_VIEW (priv->notesview), FALSE);
-+              ev_view_set_sizing_mode (EV_VIEW (priv->notesview), EV_SIZING_BEST_FIT);
-+      }
-+
-+      gtk_paned_set_position (GTK_PANED (h), 400);
+       gtk_paned_add2 (GTK_PANED (h), ev_dscwindow->priv->notesview_scrolled_window);
+
+       ev_dscwindow->priv->notesview = ev_view_new ();
+       g_object_ref (ev_dscwindow->priv->notesview);
+       gtk_container_add (GTK_CONTAINER (ev_dscwindow->priv->notesview_scrolled_window),
+               ev_dscwindow->priv->notesview);
+       ev_view_set_model (EV_VIEW (ev_dscwindow->priv->notesview), ev_dscwindow->priv->model);
+
+       gtk_paned_set_position (GTK_PANED (h), 400);
        gtk_widget_show_all (h);
-+      gtk_container_add (GTK_CONTAINER (self), h);
-+
-+      /* fallback if we have >2 monitors (see window placement) */
+       gtk_container_add (GTK_CONTAINER (ev_dscwindow), h);
+
+/* fallback if we have >2 monitors (see window placement) */
 /*+    gtk_window_set_default_size (GTK_WINDOW (self), 800, 600);
 +
 +      g_signal_connect (h, "notify::position",