aboutsummaryrefslogtreecommitdiff
path: root/src/backend-dbus/guest.c
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2020-08-24 18:51:10 +0200
committerRobert Tari <robert@tari.in>2020-08-24 18:51:10 +0200
commitcd78667f5baa22ff64eec87dcef6bafd868c070c (patch)
treeb5a17179679b73838ebebee627da446bfdbfe98f /src/backend-dbus/guest.c
parentb3cd9e10b377a3b176034edfdf46eb2ececb381b (diff)
downloadayatana-indicator-session-cd78667f5baa22ff64eec87dcef6bafd868c070c.tar.gz
ayatana-indicator-session-cd78667f5baa22ff64eec87dcef6bafd868c070c.tar.bz2
ayatana-indicator-session-cd78667f5baa22ff64eec87dcef6bafd868c070c.zip
Fix deprecations and build warnings
Diffstat (limited to 'src/backend-dbus/guest.c')
-rw-r--r--src/backend-dbus/guest.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/backend-dbus/guest.c b/src/backend-dbus/guest.c
index 3269097..a1358c5 100644
--- a/src/backend-dbus/guest.c
+++ b/src/backend-dbus/guest.c
@@ -21,7 +21,7 @@
#include "guest.h"
-struct _IndicatorSessionGuestDbusPriv
+struct _IndicatorSessionGuestDbusPrivate
{
GCancellable * cancellable;
@@ -34,11 +34,9 @@ struct _IndicatorSessionGuestDbusPriv
gboolean guest_is_allowed;
};
-typedef IndicatorSessionGuestDbusPriv priv_t;
+typedef IndicatorSessionGuestDbusPrivate priv_t;
-G_DEFINE_TYPE (IndicatorSessionGuestDbus,
- indicator_session_guest_dbus,
- INDICATOR_TYPE_SESSION_GUEST)
+G_DEFINE_TYPE_WITH_PRIVATE (IndicatorSessionGuestDbus, indicator_session_guest_dbus, INDICATOR_TYPE_SESSION_GUEST)
/***
****
@@ -352,8 +350,6 @@ indicator_session_guest_dbus_class_init (IndicatorSessionGuestDbusClass * klass)
guest_class->is_logged_in = my_is_logged_in;
guest_class->is_active = my_is_active;
guest_class->switch_to_guest = my_switch_to_guest;
-
- g_type_class_add_private (klass, sizeof (IndicatorSessionGuestDbusPriv));
}
static void
@@ -361,9 +357,7 @@ indicator_session_guest_dbus_init (IndicatorSessionGuestDbus * self)
{
priv_t * p;
- p = G_TYPE_INSTANCE_GET_PRIVATE (self,
- INDICATOR_TYPE_SESSION_GUEST_DBUS,
- IndicatorSessionGuestDbusPriv);
+ p = indicator_session_guest_dbus_get_instance_private (self);
p->cancellable = g_cancellable_new ();
self->priv = p;
}