aboutsummaryrefslogtreecommitdiff
path: root/tests/backend-mock-users.c
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2020-08-31 16:41:56 +0200
committerRobert Tari <robert@tari.in>2020-08-31 16:41:56 +0200
commitcacf569a9a95ea39c78b124987bf4dae72557f27 (patch)
tree6e58ce183724b17b1e89550dac80e51a4865b361 /tests/backend-mock-users.c
parenta8b9159200845d9ec6547e511379d8275cc11b2a (diff)
downloadayatana-indicator-session-cacf569a9a95ea39c78b124987bf4dae72557f27.tar.gz
ayatana-indicator-session-cacf569a9a95ea39c78b124987bf4dae72557f27.tar.bz2
ayatana-indicator-session-cacf569a9a95ea39c78b124987bf4dae72557f27.zip
Fix deprecated symbols and build warnings
Diffstat (limited to 'tests/backend-mock-users.c')
-rw-r--r--tests/backend-mock-users.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/backend-mock-users.c b/tests/backend-mock-users.c
index f2291cd..a891c69 100644
--- a/tests/backend-mock-users.c
+++ b/tests/backend-mock-users.c
@@ -20,16 +20,14 @@
#include "backend-mock.h"
#include "backend-mock-users.h"
-struct _IndicatorSessionUsersMockPriv
+struct _IndicatorSessionUsersMockPrivate
{
GHashTable * users;
};
-typedef IndicatorSessionUsersMockPriv priv_t;
+typedef IndicatorSessionUsersMockPrivate priv_t;
-G_DEFINE_TYPE (IndicatorSessionUsersMock,
- indicator_session_users_mock,
- INDICATOR_TYPE_SESSION_USERS)
+G_DEFINE_TYPE_WITH_PRIVATE(IndicatorSessionUsersMock, indicator_session_users_mock, INDICATOR_TYPE_SESSION_USERS)
/***
**** IndicatorSessionUsers virtual functions
@@ -120,8 +118,6 @@ indicator_session_users_mock_class_init (IndicatorSessionUsersMockClass * klass)
users_class->get_uids = my_get_uids;
users_class->get_user = my_get_user;
users_class->activate_user = my_activate_user;
-
- g_type_class_add_private (klass, sizeof (IndicatorSessionUsersMockPriv));
}
static void
@@ -130,9 +126,7 @@ indicator_session_users_mock_init (IndicatorSessionUsersMock * self)
{
priv_t * p;
- p = G_TYPE_INSTANCE_GET_PRIVATE (self,
- INDICATOR_TYPE_SESSION_USERS_MOCK,
- IndicatorSessionUsersMockPriv);
+ p = indicator_session_users_mock_get_instance_private(self);
self->priv = p;
p->users = g_hash_table_new_full (g_direct_hash,