summaryrefslogtreecommitdiff
path: root/backends/pulse/pulse-connection.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-06-30 17:33:00 +0800
committerraveit65 <[email protected]>2019-07-02 13:51:06 +0200
commit498b37841f36c86a27b75b97a4fc22053da94ffa (patch)
treef532a529031101a189b9668794bf23929d77f699 /backends/pulse/pulse-connection.c
parentceedb3408e9f12f1b36ad98218fee69960eb47e8 (diff)
downloadlibmatemixer-498b37841f36c86a27b75b97a4fc22053da94ffa.tar.bz2
libmatemixer-498b37841f36c86a27b75b97a4fc22053da94ffa.tar.xz
pulse: avoid deprecated g_type_class_add_private
Diffstat (limited to 'backends/pulse/pulse-connection.c')
-rw-r--r--backends/pulse/pulse-connection.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/backends/pulse/pulse-connection.c b/backends/pulse/pulse-connection.c
index 62156c1..c6fc7b0 100644
--- a/backends/pulse/pulse-connection.c
+++ b/backends/pulse/pulse-connection.c
@@ -84,7 +84,7 @@ static void pulse_connection_set_property (GObject *object,
static void pulse_connection_init (PulseConnection *connection);
static void pulse_connection_finalize (GObject *object);
-G_DEFINE_TYPE (PulseConnection, pulse_connection, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (PulseConnection, pulse_connection, G_TYPE_OBJECT);
static gchar *create_app_name (void);
@@ -331,8 +331,6 @@ pulse_connection_class_init (PulseConnectionClass *klass)
G_TYPE_NONE,
1,
G_TYPE_POINTER);
-
- g_type_class_add_private (object_class, sizeof (PulseConnectionPrivate));
}
static void
@@ -382,9 +380,7 @@ pulse_connection_set_property (GObject *object,
static void
pulse_connection_init (PulseConnection *connection)
{
- connection->priv = G_TYPE_INSTANCE_GET_PRIVATE (connection,
- PULSE_TYPE_CONNECTION,
- PulseConnectionPrivate);
+ connection->priv = pulse_connection_get_instance_private (connection);
}
static void