From 498b37841f36c86a27b75b97a4fc22053da94ffa Mon Sep 17 00:00:00 2001 From: Wu Xiaotian Date: Sun, 30 Jun 2019 17:33:00 +0800 Subject: pulse: avoid deprecated g_type_class_add_private --- backends/pulse/pulse-device-profile.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'backends/pulse/pulse-device-profile.c') diff --git a/backends/pulse/pulse-device-profile.c b/backends/pulse/pulse-device-profile.c index 5487841..0b00aba 100644 --- a/backends/pulse/pulse-device-profile.c +++ b/backends/pulse/pulse-device-profile.c @@ -36,20 +36,17 @@ struct _PulseDeviceProfilePrivate static void pulse_device_profile_class_init (PulseDeviceProfileClass *klass); static void pulse_device_profile_init (PulseDeviceProfile *profile); -G_DEFINE_TYPE (PulseDeviceProfile, pulse_device_profile, MATE_MIXER_TYPE_SWITCH_OPTION) +G_DEFINE_TYPE_WITH_PRIVATE (PulseDeviceProfile, pulse_device_profile, MATE_MIXER_TYPE_SWITCH_OPTION) static void pulse_device_profile_class_init (PulseDeviceProfileClass *klass) { - g_type_class_add_private (klass, sizeof (PulseDeviceProfilePrivate)); } static void pulse_device_profile_init (PulseDeviceProfile *profile) { - profile->priv = G_TYPE_INSTANCE_GET_PRIVATE (profile, - PULSE_TYPE_DEVICE_PROFILE, - PulseDeviceProfilePrivate); + profile->priv = pulse_device_profile_get_instance_private (profile); } PulseDeviceProfile * -- cgit v1.2.1