summaryrefslogtreecommitdiff
path: root/liblightdm-gobject/user.c
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2018-08-30 10:42:48 +1200
committerRobert Ancell <robert.ancell@canonical.com>2018-08-30 10:42:48 +1200
commit2ffa63aa307a4fe37b829a0b2d664933c49fc9b9 (patch)
treee82b1d59bc542fe5019da1e20933204714d1701e /liblightdm-gobject/user.c
parent1382de7fe2a59265feca3ade6391230fc059524d (diff)
downloadlightdm-git-2ffa63aa307a4fe37b829a0b2d664933c49fc9b9.tar.gz
Remove use of deprecated g_type_class_add_private
Diffstat (limited to 'liblightdm-gobject/user.c')
-rw-r--r--liblightdm-gobject/user.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/liblightdm-gobject/user.c b/liblightdm-gobject/user.c
index 7fd2ff7a..56dc93b3 100644
--- a/liblightdm-gobject/user.c
+++ b/liblightdm-gobject/user.c
@@ -112,8 +112,8 @@ typedef struct
CommonUser *common_user;
} LightDMUserPrivate;
-G_DEFINE_TYPE (LightDMUserList, lightdm_user_list, G_TYPE_OBJECT)
-G_DEFINE_TYPE (LightDMUser, lightdm_user, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (LightDMUserList, lightdm_user_list, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (LightDMUser, lightdm_user, G_TYPE_OBJECT)
#define GET_LIST_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE ((obj), LIGHTDM_TYPE_USER_LIST, LightDMUserListPrivate)
#define GET_USER_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE ((obj), LIGHTDM_TYPE_USER, LightDMUserPrivate)
@@ -320,8 +320,6 @@ lightdm_user_list_class_init (LightDMUserListClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (LightDMUserListPrivate));
-
object_class->set_property = lightdm_user_list_set_property;
object_class->get_property = lightdm_user_list_get_property;
object_class->finalize = lightdm_user_list_finalize;
@@ -689,8 +687,6 @@ lightdm_user_class_init (LightDMUserClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (LightDMUserPrivate));
-
object_class->set_property = lightdm_user_set_property;
object_class->get_property = lightdm_user_get_property;
object_class->finalize = lightdm_user_finalize;