summaryrefslogtreecommitdiff
path: root/backends/pulse/pulse-device-switch.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-06-30 17:33:00 +0800
committerraveit65 <[email protected]>2019-07-02 13:51:06 +0200
commit498b37841f36c86a27b75b97a4fc22053da94ffa (patch)
treef532a529031101a189b9668794bf23929d77f699 /backends/pulse/pulse-device-switch.c
parentceedb3408e9f12f1b36ad98218fee69960eb47e8 (diff)
downloadlibmatemixer-498b37841f36c86a27b75b97a4fc22053da94ffa.tar.bz2
libmatemixer-498b37841f36c86a27b75b97a4fc22053da94ffa.tar.xz
pulse: avoid deprecated g_type_class_add_private
Diffstat (limited to 'backends/pulse/pulse-device-switch.c')
-rw-r--r--backends/pulse/pulse-device-switch.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/backends/pulse/pulse-device-switch.c b/backends/pulse/pulse-device-switch.c
index 4bd32ce..ea0f6fd 100644
--- a/backends/pulse/pulse-device-switch.c
+++ b/backends/pulse/pulse-device-switch.c
@@ -36,7 +36,7 @@ static void pulse_device_switch_class_init (PulseDeviceSwitchClass *klass);
static void pulse_device_switch_init (PulseDeviceSwitch *swtch);
static void pulse_device_switch_dispose (GObject *object);
-G_DEFINE_TYPE (PulseDeviceSwitch, pulse_device_switch, MATE_MIXER_TYPE_DEVICE_SWITCH)
+G_DEFINE_TYPE_WITH_PRIVATE (PulseDeviceSwitch, pulse_device_switch, MATE_MIXER_TYPE_DEVICE_SWITCH)
static gboolean pulse_device_switch_set_active_option (MateMixerSwitch *mms,
MateMixerSwitchOption *mmso);
@@ -60,16 +60,12 @@ pulse_device_switch_class_init (PulseDeviceSwitchClass *klass)
switch_class = MATE_MIXER_SWITCH_CLASS (klass);
switch_class->set_active_option = pulse_device_switch_set_active_option;
switch_class->list_options = pulse_device_switch_list_options;
-
- g_type_class_add_private (G_OBJECT_CLASS (klass), sizeof (PulseDeviceSwitchPrivate));
}
static void
pulse_device_switch_init (PulseDeviceSwitch *swtch)
{
- swtch->priv = G_TYPE_INSTANCE_GET_PRIVATE (swtch,
- PULSE_TYPE_DEVICE_SWITCH,
- PulseDeviceSwitchPrivate);
+ swtch->priv = pulse_device_switch_get_instance_private (swtch);
}
static void