[latexila/wip/use-tepl-tab] DocumentTab: make document_view property construct-only



commit ee96386f3467b5e9381ab1da83452f5fcb790153
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Jun 23 18:13:04 2017 +0200

    DocumentTab: make document_view property construct-only
    
    To reduce the delta between DocumentTab and TeplTab.

 src/document_tab.vala |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/document_tab.vala b/src/document_tab.vala
index 4f4b7d0..c76fe16 100644
--- a/src/document_tab.vala
+++ b/src/document_tab.vala
@@ -21,7 +21,7 @@ using Gtk;
 
 public class DocumentTab : Grid
 {
-    public DocumentView document_view { get; private set; }
+    public DocumentView document_view { get; construct; }
 
     public Document document
     {
@@ -114,7 +114,8 @@ public class DocumentTab : Grid
 
     public DocumentTab ()
     {
-        document_view = new DocumentView (new Document ());
+        DocumentView document_view = new DocumentView (new Document ());
+        Object (document_view: document_view);
         initialize ();
     }
 
@@ -124,9 +125,9 @@ public class DocumentTab : Grid
         document.load (location);
     }
 
-    public DocumentTab.with_view (DocumentView view)
+    public DocumentTab.with_view (DocumentView document_view)
     {
-        document_view = view;
+        Object (document_view: document_view);
         initialize ();
     }
 


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