diff options
author | Robert Tari <robert@tari.in> | 2020-08-24 18:51:10 +0200 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2020-08-24 18:51:10 +0200 |
commit | cd78667f5baa22ff64eec87dcef6bafd868c070c (patch) | |
tree | b5a17179679b73838ebebee627da446bfdbfe98f /src/backend-dbus | |
parent | b3cd9e10b377a3b176034edfdf46eb2ececb381b (diff) | |
download | ayatana-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')
-rw-r--r-- | src/backend-dbus/actions.c | 14 | ||||
-rw-r--r-- | src/backend-dbus/actions.h | 4 | ||||
-rw-r--r-- | src/backend-dbus/guest.c | 14 | ||||
-rw-r--r-- | src/backend-dbus/guest.h | 4 | ||||
-rw-r--r-- | src/backend-dbus/users.c | 14 | ||||
-rw-r--r-- | src/backend-dbus/users.h | 4 |
6 files changed, 18 insertions, 36 deletions
diff --git a/src/backend-dbus/actions.c b/src/backend-dbus/actions.c index 8ca05bf..f1c2498 100644 --- a/src/backend-dbus/actions.c +++ b/src/backend-dbus/actions.c @@ -47,7 +47,7 @@ enum END_SESSION_TYPE_REBOOT }; -struct _IndicatorSessionActionsDbusPriv +struct _IndicatorSessionActionsDbusPrivate { GCancellable * cancellable; @@ -70,11 +70,9 @@ struct _IndicatorSessionActionsDbusPriv gboolean seat_allows_activation; }; -typedef IndicatorSessionActionsDbusPriv priv_t; +typedef IndicatorSessionActionsDbusPrivate priv_t; -G_DEFINE_TYPE (IndicatorSessionActionsDbus, - indicator_session_actions_dbus, - INDICATOR_TYPE_SESSION_ACTIONS) +G_DEFINE_TYPE_WITH_PRIVATE(IndicatorSessionActionsDbus, indicator_session_actions_dbus, INDICATOR_TYPE_SESSION_ACTIONS) /*** **** @@ -1334,8 +1332,6 @@ indicator_session_actions_dbus_class_init (IndicatorSessionActionsDbusClass * kl actions_class->switch_to_greeter = my_switch_to_greeter; actions_class->switch_to_guest = my_switch_to_guest; actions_class->switch_to_username = my_switch_to_username; - - g_type_class_add_private (klass, sizeof (IndicatorSessionActionsDbusPriv)); } static void @@ -1345,9 +1341,7 @@ indicator_session_actions_dbus_init (IndicatorSessionActionsDbus * self) priv_t * p; GSettings * s; - p = G_TYPE_INSTANCE_GET_PRIVATE (self, - INDICATOR_TYPE_SESSION_ACTIONS_DBUS, - IndicatorSessionActionsDbusPriv); + p = indicator_session_actions_dbus_get_instance_private (self); p->cancellable = g_cancellable_new (); p->seat_allows_activation = TRUE; self->priv = p; diff --git a/src/backend-dbus/actions.h b/src/backend-dbus/actions.h index 97d816a..dac392c 100644 --- a/src/backend-dbus/actions.h +++ b/src/backend-dbus/actions.h @@ -37,7 +37,7 @@ G_BEGIN_DECLS #define INDICATOR_IS_SESSION_ACTIONS_DBUS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), INDICATOR_TYPE_SESSION_ACTIONS_DBUS)) typedef struct _IndicatorSessionActionsDbus IndicatorSessionActionsDbus; -typedef struct _IndicatorSessionActionsDbusPriv IndicatorSessionActionsDbusPriv; +typedef struct _IndicatorSessionActionsDbusPrivate IndicatorSessionActionsDbusPrivate; typedef struct _IndicatorSessionActionsDbusClass IndicatorSessionActionsDbusClass; /** @@ -48,7 +48,7 @@ struct _IndicatorSessionActionsDbus { /*< private >*/ IndicatorSessionActions parent; - IndicatorSessionActionsDbusPriv * priv; + IndicatorSessionActionsDbusPrivate * priv; }; struct _IndicatorSessionActionsDbusClass 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; } diff --git a/src/backend-dbus/guest.h b/src/backend-dbus/guest.h index 73bb3ca..8f27433 100644 --- a/src/backend-dbus/guest.h +++ b/src/backend-dbus/guest.h @@ -37,7 +37,7 @@ G_BEGIN_DECLS #define INDICATOR_IS_SESSION_GUEST_DBUS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), INDICATOR_TYPE_SESSION_GUEST_DBUS)) typedef struct _IndicatorSessionGuestDbus IndicatorSessionGuestDbus; -typedef struct _IndicatorSessionGuestDbusPriv IndicatorSessionGuestDbusPriv; +typedef struct _IndicatorSessionGuestDbusPrivate IndicatorSessionGuestDbusPrivate; typedef struct _IndicatorSessionGuestDbusClass IndicatorSessionGuestDbusClass; /** @@ -48,7 +48,7 @@ struct _IndicatorSessionGuestDbus { /*< private >*/ IndicatorSessionGuest parent; - IndicatorSessionGuestDbusPriv * priv; + IndicatorSessionGuestDbusPrivate * priv; }; struct _IndicatorSessionGuestDbusClass diff --git a/src/backend-dbus/users.c b/src/backend-dbus/users.c index 29cc29c..e6910c6 100644 --- a/src/backend-dbus/users.c +++ b/src/backend-dbus/users.c @@ -21,7 +21,7 @@ #include "users.h" -struct _IndicatorSessionUsersDbusPriv +struct _IndicatorSessionUsersDbusPrivate { Login1Manager * login1_manager; Login1Seat * login1_seat; @@ -45,11 +45,9 @@ struct _IndicatorSessionUsersDbusPriv guint update_list_tag; }; -typedef IndicatorSessionUsersDbusPriv priv_t; +typedef IndicatorSessionUsersDbusPrivate priv_t; -G_DEFINE_TYPE (IndicatorSessionUsersDbus, - indicator_session_users_dbus, - INDICATOR_TYPE_SESSION_USERS) +G_DEFINE_TYPE_WITH_PRIVATE(IndicatorSessionUsersDbus, indicator_session_users_dbus, INDICATOR_TYPE_SESSION_USERS) /*** **** @@ -655,8 +653,6 @@ indicator_session_users_dbus_class_init (IndicatorSessionUsersDbusClass * 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 (IndicatorSessionUsersDbusPriv)); } static void @@ -664,9 +660,7 @@ indicator_session_users_dbus_init (IndicatorSessionUsersDbus * self) { priv_t * p; - p = G_TYPE_INSTANCE_GET_PRIVATE (self, - INDICATOR_TYPE_SESSION_USERS_DBUS, - IndicatorSessionUsersDbusPriv); + p = indicator_session_users_dbus_get_instance_private (self); self->priv = p; p->cancellable = g_cancellable_new (); diff --git a/src/backend-dbus/users.h b/src/backend-dbus/users.h index d6c17df..ed8c686 100644 --- a/src/backend-dbus/users.h +++ b/src/backend-dbus/users.h @@ -37,7 +37,7 @@ G_BEGIN_DECLS #define INDICATOR_IS_SESSION_USERS_DBUS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), INDICATOR_TYPE_SESSION_USERS_DBUS)) typedef struct _IndicatorSessionUsersDbus IndicatorSessionUsersDbus; -typedef struct _IndicatorSessionUsersDbusPriv IndicatorSessionUsersDbusPriv; +typedef struct _IndicatorSessionUsersDbusPrivate IndicatorSessionUsersDbusPrivate; typedef struct _IndicatorSessionUsersDbusClass IndicatorSessionUsersDbusClass; /** @@ -48,7 +48,7 @@ struct _IndicatorSessionUsersDbus { /*< private >*/ IndicatorSessionUsers parent; - IndicatorSessionUsersDbusPriv * priv; + IndicatorSessionUsersDbusPrivate * priv; }; struct _IndicatorSessionUsersDbusClass |