summaryrefslogtreecommitdiff
path: root/libupower-glib/up-client.c
diff options
context:
space:
mode:
authorChristian Kellner <christian@kellner.me>2019-02-20 17:47:45 +0100
committerChristian Kellner <christian@kellner.me>2019-02-21 12:07:59 +0100
commit8da188b30351a252de2405b09698dd61d53eb606 (patch)
tree770c8d56386e406aa69bb1cf4b3cb83f1b7db773 /libupower-glib/up-client.c
parent2a9598372c57429e07b91c4a1a05e29cca2aee94 (diff)
downloadupower-8da188b30351a252de2405b09698dd61d53eb606.tar.gz
Replace use of deprecated g_type_class_add_private
Use G_DEFINE_TYPE_WITH_CODE (..., G_PRIVATE_ADD (...)) instead of the (deprecated since glib 2.58) function g_type_class_add_private to add a private structure for a type. Bump the minimal required version of glib to 2.38.0, the version where G_PRIVATE_ADD was added.
Diffstat (limited to 'libupower-glib/up-client.c')
-rw-r--r--libupower-glib/up-client.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libupower-glib/up-client.c b/libupower-glib/up-client.c
index 1491a98..2309bd3 100644
--- a/libupower-glib/up-client.c
+++ b/libupower-glib/up-client.c
@@ -73,6 +73,7 @@ enum {
static guint signals [UP_CLIENT_LAST_SIGNAL] = { 0 };
G_DEFINE_TYPE_WITH_CODE (UpClient, up_client, G_TYPE_OBJECT,
+ G_ADD_PRIVATE(UpClient)
G_IMPLEMENT_INTERFACE(G_TYPE_INITABLE, up_client_initable_iface_init))
/**
@@ -451,8 +452,6 @@ up_client_class_init (UpClientClass *klass)
G_STRUCT_OFFSET (UpClientClass, device_removed),
NULL, NULL, g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1, G_TYPE_STRING);
-
- g_type_class_add_private (klass, sizeof (UpClientPrivate));
}
/*