summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-05-16 11:54:59 -0400
committerMatthias Clasen <mclasen@redhat.com>2023-05-16 12:00:08 -0400
commit5f70b00beac2ea64c5becee9a8a6206ca348e994 (patch)
tree969787d687cc3ab38439192b1f0d8b13ce81801a
parent3377460fb8ef54e02b75e6acdb9c05532c408d54 (diff)
downloadgtk+-5f70b00beac2ea64c5becee9a8a6206ca348e994.tar.gz
Fix a few bugs in GtkPropertyLookupListModel
Fix bugs in property types.
-rw-r--r--gtk/gtkpropertylookuplistmodel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtkpropertylookuplistmodel.c b/gtk/gtkpropertylookuplistmodel.c
index 5fc8af57fa..bf8f12b251 100644
--- a/gtk/gtkpropertylookuplistmodel.c
+++ b/gtk/gtkpropertylookuplistmodel.c
@@ -329,7 +329,7 @@ gtk_property_lookup_list_model_get_property (GObject *object,
break;
case PROP_PROPERTY:
- g_value_set_object (value, self->property);
+ g_value_set_string (value, self->property);
break;
default:
@@ -408,7 +408,7 @@ gtk_property_lookup_list_model_class_init (GtkPropertyLookupListModelClass *klas
*/
properties[PROP_OBJECT] =
g_param_spec_object ("object", NULL, NULL,
- G_TYPE_LIST_MODEL,
+ G_TYPE_OBJECT,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_properties (object_class, NUM_PROPERTIES, properties);
@@ -417,6 +417,7 @@ gtk_property_lookup_list_model_class_init (GtkPropertyLookupListModelClass *klas
static void
gtk_property_lookup_list_model_init (GtkPropertyLookupListModel *self)
{
+ self->item_type = G_TYPE_OBJECT;
self->items = g_ptr_array_new ();
/* add sentinel */
g_ptr_array_add (self->items, NULL);