summaryrefslogtreecommitdiff
path: root/src/gs-listener-dbus.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-09-15 12:58:16 +0200
committerVictor Kareh <[email protected]>2019-10-02 06:48:58 -0400
commite04084dc2787ca240f10bd73005044faa4682d1e (patch)
tree645fb802e5abe607b48480089d18c8ebfe87c8fc /src/gs-listener-dbus.c
parente7ad7ca4d96b8aaf36b8993c8b6f9616969f13c7 (diff)
downloadmate-screensaver-e04084dc2787ca240f10bd73005044faa4682d1e.tar.bz2
mate-screensaver-e04084dc2787ca240f10bd73005044faa4682d1e.tar.xz
gs-listener-dbus: avoid 'g_type_class_add_private'
Diffstat (limited to 'src/gs-listener-dbus.c')
-rw-r--r--src/gs-listener-dbus.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c
index fa8d9e9..1a83a38 100644
--- a/src/gs-listener-dbus.c
+++ b/src/gs-listener-dbus.c
@@ -76,8 +76,6 @@ static DBusHandlerResult gs_listener_message_handler (DBusConnection *connec
#define TYPE_MISMATCH_ERROR GS_LISTENER_INTERFACE ".TypeMismatch"
-#define GS_LISTENER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GS_TYPE_LISTENER, GSListenerPrivate))
-
struct GSListenerPrivate
{
DBusConnection *connection;
@@ -150,7 +148,7 @@ gs_listener_vtable = { &gs_listener_unregister_handler,
static guint signals [LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (GSListener, gs_listener, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GSListener, gs_listener, G_TYPE_OBJECT)
GQuark
gs_listener_error_quark (void)
@@ -2209,8 +2207,6 @@ gs_listener_class_init (GSListenerClass *klass)
NULL,
TRUE,
G_PARAM_READWRITE));
-
- g_type_class_add_private (klass, sizeof (GSListenerPrivate));
}
@@ -2482,7 +2478,7 @@ init_session_id (GSListener *listener)
static void
gs_listener_init (GSListener *listener)
{
- listener->priv = GS_LISTENER_GET_PRIVATE (listener);
+ listener->priv = gs_listener_get_instance_private (listener);
#ifdef WITH_SYSTEMD
/* check if logind is running */