diff options
author | Wu Xiaotian <[email protected]> | 2019-06-30 17:33:00 +0800 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-07-02 13:51:06 +0200 |
commit | 498b37841f36c86a27b75b97a4fc22053da94ffa (patch) | |
tree | f532a529031101a189b9668794bf23929d77f699 /backends/pulse/pulse-device-profile.c | |
parent | ceedb3408e9f12f1b36ad98218fee69960eb47e8 (diff) | |
download | libmatemixer-498b37841f36c86a27b75b97a4fc22053da94ffa.tar.bz2 libmatemixer-498b37841f36c86a27b75b97a4fc22053da94ffa.tar.xz |
pulse: avoid deprecated g_type_class_add_private
Diffstat (limited to 'backends/pulse/pulse-device-profile.c')
-rw-r--r-- | backends/pulse/pulse-device-profile.c | 7 |
1 files changed, 2 insertions, 5 deletions
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 * |