summaryrefslogtreecommitdiff
path: root/backends/alsa/alsa-stream.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-stream.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-stream.c')
-rw-r--r--backends/alsa/alsa-stream.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/backends/alsa/alsa-stream.c b/backends/alsa/alsa-stream.c
index fc72f65..2cc61a8 100644
--- a/backends/alsa/alsa-stream.c
+++ b/backends/alsa/alsa-stream.c
@@ -37,7 +37,7 @@ static void alsa_stream_class_init (AlsaStreamClass *klass);
static void alsa_stream_init (AlsaStream *stream);
static void alsa_stream_dispose (GObject *object);
-G_DEFINE_TYPE (AlsaStream, alsa_stream, MATE_MIXER_TYPE_STREAM)
+G_DEFINE_TYPE_WITH_PRIVATE (AlsaStream, alsa_stream, MATE_MIXER_TYPE_STREAM)
static const GList *alsa_stream_list_controls (MateMixerStream *mms);
static const GList *alsa_stream_list_switches (MateMixerStream *mms);
@@ -59,16 +59,12 @@ alsa_stream_class_init (AlsaStreamClass *klass)
stream_class = MATE_MIXER_STREAM_CLASS (klass);
stream_class->list_controls = alsa_stream_list_controls;
stream_class->list_switches = alsa_stream_list_switches;
-
- g_type_class_add_private (object_class, sizeof (AlsaStreamPrivate));
}
static void
alsa_stream_init (AlsaStream *stream)
{
- stream->priv = G_TYPE_INSTANCE_GET_PRIVATE (stream,
- ALSA_TYPE_STREAM,
- AlsaStreamPrivate);
+ stream->priv = alsa_stream_get_instance_private (stream);
}
static void