[gtksourceview] GtkSourceFile: be sure that the properties are correctly initialized



commit 7885260c3be0d9af594edfaf17e8c6f8fa9bf0e5
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun May 3 18:07:42 2015 +0200

    GtkSourceFile: be sure that the properties are correctly initialized
    
    Add the construct flag for the "location" property. And initialize in
    init() the non-writable properties.

 gtksourceview/gtksourcefile.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourcefile.c b/gtksourceview/gtksourcefile.c
index b232d8d..8926660 100644
--- a/gtksourceview/gtksourcefile.c
+++ b/gtksourceview/gtksourcefile.c
@@ -168,6 +168,7 @@ gtk_source_file_class_init (GtkSourceFileClass *klass)
                                                              "",
                                                              G_TYPE_FILE,
                                                              G_PARAM_READWRITE |
+                                                             G_PARAM_CONSTRUCT |
                                                              G_PARAM_STATIC_STRINGS));
 
        /**
@@ -228,6 +229,8 @@ gtk_source_file_init (GtkSourceFile *file)
        file->priv = gtk_source_file_get_instance_private (file);
 
        file->priv->encoding = NULL;
+       file->priv->newline_type = GTK_SOURCE_NEWLINE_TYPE_LF;
+       file->priv->compression_type = GTK_SOURCE_COMPRESSION_TYPE_NONE;
 }
 
 /**


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