summaryrefslogtreecommitdiff
path: root/backends/alsa/alsa-device.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-06-25 10:39:49 +0800
committerraveit65 <[email protected]>2019-06-29 09:16:12 +0200
commitead1fde223a89a5157e936d23b3bbc5d77260167 (patch)
tree88492f6de032b5256551846e9873769fba999b7b /backends/alsa/alsa-device.c
parent6c214952d2567143a53ab6273f00fac3a66b3c18 (diff)
downloadlibmatemixer-ead1fde223a89a5157e936d23b3bbc5d77260167.tar.bz2
libmatemixer-ead1fde223a89a5157e936d23b3bbc5d77260167.tar.xz
backend-alsa: avoid deprecated g_type_class_add_private
Diffstat (limited to 'backends/alsa/alsa-device.c')
-rw-r--r--backends/alsa/alsa-device.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/backends/alsa/alsa-device.c b/backends/alsa/alsa-device.c
index fb12447..7cb140a 100644
--- a/backends/alsa/alsa-device.c
+++ b/backends/alsa/alsa-device.c
@@ -74,7 +74,7 @@ static void alsa_device_init (AlsaDevice *device);
static void alsa_device_dispose (GObject *object);
static void alsa_device_finalize (GObject *object);
-G_DEFINE_TYPE (AlsaDevice, alsa_device, MATE_MIXER_TYPE_DEVICE)
+G_DEFINE_TYPE_WITH_PRIVATE (AlsaDevice, alsa_device, MATE_MIXER_TYPE_DEVICE)
static const GList * alsa_device_list_streams (MateMixerDevice *mmd);
@@ -181,16 +181,12 @@ alsa_device_class_init (AlsaDeviceClass *klass)
G_TYPE_NONE,
0,
G_TYPE_NONE);
-
- g_type_class_add_private (object_class, sizeof (AlsaDevicePrivate));
}
static void
alsa_device_init (AlsaDevice *device)
{
- device->priv = G_TYPE_INSTANCE_GET_PRIVATE (device,
- ALSA_TYPE_DEVICE,
- AlsaDevicePrivate);
+ device->priv = alsa_device_get_instance_private (device);
device->priv->context = g_main_context_ref_thread_default ();