summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-05-16 16:31:35 +0000
committerMatthias Clasen <mclasen@redhat.com>2023-05-16 16:31:35 +0000
commit4a1598dc2a316eb27046467a33c68ff1babb55fa (patch)
tree969787d687cc3ab38439192b1f0d8b13ce81801a
parent3377460fb8ef54e02b75e6acdb9c05532c408d54 (diff)
parent5f70b00beac2ea64c5becee9a8a6206ca348e994 (diff)
downloadgtk+-4a1598dc2a316eb27046467a33c68ff1babb55fa.tar.gz
Merge branch 'fix-property-lookup-model' into 'main'
Fix a few bugs in GtkPropertyLookupListModel See merge request GNOME/gtk!5974
-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);