diff options
author | Wu Xiaotian <[email protected]> | 2019-06-25 10:39:49 +0800 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-06-29 09:16:12 +0200 |
commit | ead1fde223a89a5157e936d23b3bbc5d77260167 (patch) | |
tree | 88492f6de032b5256551846e9873769fba999b7b /backends/alsa/alsa-switch.c | |
parent | 6c214952d2567143a53ab6273f00fac3a66b3c18 (diff) | |
download | libmatemixer-ead1fde223a89a5157e936d23b3bbc5d77260167.tar.bz2 libmatemixer-ead1fde223a89a5157e936d23b3bbc5d77260167.tar.xz |
backend-alsa: avoid deprecated g_type_class_add_private
Diffstat (limited to 'backends/alsa/alsa-switch.c')
-rw-r--r-- | backends/alsa/alsa-switch.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/backends/alsa/alsa-switch.c b/backends/alsa/alsa-switch.c index c2a95ca..7711e0d 100644 --- a/backends/alsa/alsa-switch.c +++ b/backends/alsa/alsa-switch.c @@ -42,6 +42,7 @@ static void alsa_switch_dispose (GObject *object); G_DEFINE_TYPE_WITH_CODE (AlsaSwitch, alsa_switch, MATE_MIXER_TYPE_STREAM_SWITCH, + G_ADD_PRIVATE(AlsaSwitch) G_IMPLEMENT_INTERFACE (ALSA_TYPE_ELEMENT, alsa_element_interface_init)) @@ -75,8 +76,6 @@ alsa_switch_class_init (AlsaSwitchClass *klass) switch_class = MATE_MIXER_SWITCH_CLASS (klass); switch_class->set_active_option = alsa_switch_set_active_option; switch_class->list_options = alsa_switch_list_options; - - g_type_class_add_private (G_OBJECT_CLASS (klass), sizeof (AlsaSwitchPrivate)); } static void @@ -97,9 +96,7 @@ alsa_switch_dispose (GObject *object) static void alsa_switch_init (AlsaSwitch *swtch) { - swtch->priv = G_TYPE_INSTANCE_GET_PRIVATE (swtch, - ALSA_TYPE_SWITCH, - AlsaSwitchPrivate); + swtch->priv = alsa_switch_get_instance_private (swtch); } AlsaSwitch * |