summaryrefslogtreecommitdiff
path: root/gio/gliststore.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2022-06-08 15:45:27 +0200
committerBenjamin Otte <otte@redhat.com>2022-06-08 15:45:27 +0200
commit9b55841d78fbfebf0efd335cfa49927ce1646a97 (patch)
treeef24120f003df8be10e7681afa714f42062edd5b /gio/gliststore.c
parentb23f9372a1d4ea9e482c7928e72bec9c270ff333 (diff)
downloadglib-9b55841d78fbfebf0efd335cfa49927ce1646a97.tar.gz
liststore: Use g_object_class_install_properties()
Not very useful yet, but future commits add more properties.
Diffstat (limited to 'gio/gliststore.c')
-rw-r--r--gio/gliststore.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gio/gliststore.c b/gio/gliststore.c
index bab3c8e15..555b4f310 100644
--- a/gio/gliststore.c
+++ b/gio/gliststore.c
@@ -72,6 +72,8 @@ static void g_list_store_iface_init (GListModelInterface *iface);
G_DEFINE_TYPE_WITH_CODE (GListStore, g_list_store, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, g_list_store_iface_init));
+static GParamSpec *properties[N_PROPERTIES] = { NULL, };
+
static void
g_list_store_items_changed (GListStore *store,
guint position,
@@ -155,9 +157,11 @@ g_list_store_class_init (GListStoreClass *klass)
*
* Since: 2.44
**/
- g_object_class_install_property (object_class, PROP_ITEM_TYPE,
+ properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", "", "", G_TYPE_OBJECT,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
+ g_object_class_install_properties (object_class, N_PROPERTIES, properties);
}
static GType