[gtk/prop-list: 4/96] columnviewcolumn: Fix a type mismatch



commit bdaa41184f6b7bfc465701fef4ad783a1a55223d
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Dec 20 18:24:07 2019 -0500

    columnviewcolumn: Fix a type mismatch
    
    The column-view property was declared with the wrong
    type. This was causing criticals in the inspector.

 gtk/gtkcolumnviewcolumn.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkcolumnviewcolumn.c b/gtk/gtkcolumnviewcolumn.c
index a62ea4b963..0672d86435 100644
--- a/gtk/gtkcolumnviewcolumn.c
+++ b/gtk/gtkcolumnviewcolumn.c
@@ -178,7 +178,7 @@ gtk_column_view_column_class_init (GtkColumnViewColumnClass *klass)
     g_param_spec_object ("column-view",
                          P_("Column view"),
                          P_("Column view this column is a part of"),
-                         G_TYPE_LIST_MODEL,
+                         GTK_TYPE_COLUMN_VIEW,
                          G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
 
   /**
@@ -481,6 +481,9 @@ void
 gtk_column_view_column_set_column_view (GtkColumnViewColumn *self,
                                         GtkColumnView       *view)
 {
+  g_return_if_fail (GTK_IS_COLUMN_VIEW_COLUMN (self));
+  g_return_if_fail (view == NULL || GTK_IS_COLUMN_VIEW (view));
+
   if (self->view == view)
     return;
 


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