summaryrefslogtreecommitdiff
path: root/backends/pulse/pulse-monitor.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-monitor.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-monitor.c')
-rw-r--r--backends/pulse/pulse-monitor.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/backends/pulse/pulse-monitor.c b/backends/pulse/pulse-monitor.c
index 915b71b..585e5e8 100644
--- a/backends/pulse/pulse-monitor.c
+++ b/backends/pulse/pulse-monitor.c
@@ -64,7 +64,7 @@ static void pulse_monitor_set_property (GObject *object,
static void pulse_monitor_init (PulseMonitor *monitor);
static void pulse_monitor_finalize (GObject *object);
-G_DEFINE_TYPE (PulseMonitor, pulse_monitor, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (PulseMonitor, pulse_monitor, G_TYPE_OBJECT);
static gboolean stream_connect (PulseMonitor *monitor);
@@ -125,8 +125,6 @@ pulse_monitor_class_init (PulseMonitorClass *klass)
G_TYPE_NONE,
1,
G_TYPE_DOUBLE);
-
- g_type_class_add_private (object_class, sizeof (PulseMonitorPrivate));
}
static void
@@ -181,9 +179,7 @@ pulse_monitor_set_property (GObject *object,
static void
pulse_monitor_init (PulseMonitor *monitor)
{
- monitor->priv = G_TYPE_INSTANCE_GET_PRIVATE (monitor,
- PULSE_TYPE_MONITOR,
- PulseMonitorPrivate);
+ monitor->priv = pulse_monitor_get_instance_private (monitor);
}
static void