summaryrefslogtreecommitdiff
path: root/backends/pulse/pulse-device.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-device.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-device.c')
-rw-r--r--backends/pulse/pulse-device.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/backends/pulse/pulse-device.c b/backends/pulse/pulse-device.c
index 454e80a..940d3e9 100644
--- a/backends/pulse/pulse-device.c
+++ b/backends/pulse/pulse-device.c
@@ -67,7 +67,7 @@ static void pulse_device_init (PulseDevice *device);
static void pulse_device_dispose (GObject *object);
static void pulse_device_finalize (GObject *object);
-G_DEFINE_TYPE (PulseDevice, pulse_device, MATE_MIXER_TYPE_DEVICE)
+G_DEFINE_TYPE_WITH_PRIVATE (PulseDevice, pulse_device, MATE_MIXER_TYPE_DEVICE)
static MateMixerStream *pulse_device_get_stream (MateMixerDevice *mmd,
const gchar *name);
@@ -118,8 +118,6 @@ pulse_device_class_init (PulseDeviceClass *klass)
G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, N_PROPERTIES, properties);
-
- g_type_class_add_private (object_class, sizeof (PulseDevicePrivate));
}
static void
@@ -171,9 +169,7 @@ pulse_device_set_property (GObject *object,
static void
pulse_device_init (PulseDevice *device)
{
- device->priv = G_TYPE_INSTANCE_GET_PRIVATE (device,
- PULSE_TYPE_DEVICE,
- PulseDevicePrivate);
+ device->priv = pulse_device_get_instance_private (device);
device->priv->ports = g_hash_table_new_full (g_str_hash,
g_str_equal,