[latexila] DocumentTab: make document_view property construct-only



commit 3763d876f4dffda4d75a80e55578d43856c3e77e
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]