mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-31 21:03:10 +02:00
liststore: Use g_object_class_install_properties()
Not very useful yet, but future commits add more properties.
This commit is contained in:
parent
b23f9372a1
commit
9b55841d78
@ -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_DEFINE_TYPE_WITH_CODE (GListStore, g_list_store, G_TYPE_OBJECT,
|
||||||
G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, g_list_store_iface_init));
|
G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, g_list_store_iface_init));
|
||||||
|
|
||||||
|
static GParamSpec *properties[N_PROPERTIES] = { NULL, };
|
||||||
|
|
||||||
static void
|
static void
|
||||||
g_list_store_items_changed (GListStore *store,
|
g_list_store_items_changed (GListStore *store,
|
||||||
guint position,
|
guint position,
|
||||||
@ -155,9 +157,11 @@ g_list_store_class_init (GListStoreClass *klass)
|
|||||||
*
|
*
|
||||||
* Since: 2.44
|
* 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_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
|
static GType
|
||||||
|
Loading…
x
Reference in New Issue
Block a user