summaryrefslogtreecommitdiff
path: root/backends/pulse/pulse-port.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-port.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-port.c')
-rw-r--r--backends/pulse/pulse-port.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/backends/pulse/pulse-port.c b/backends/pulse/pulse-port.c
index f427448..23faafa 100644
--- a/backends/pulse/pulse-port.c
+++ b/backends/pulse/pulse-port.c
@@ -35,20 +35,17 @@ struct _PulsePortPrivate
static void pulse_port_class_init (PulsePortClass *klass);
static void pulse_port_init (PulsePort *port);
-G_DEFINE_TYPE (PulsePort, pulse_port, MATE_MIXER_TYPE_SWITCH_OPTION)
+G_DEFINE_TYPE_WITH_PRIVATE (PulsePort, pulse_port, MATE_MIXER_TYPE_SWITCH_OPTION)
static void
pulse_port_class_init (PulsePortClass *klass)
{
- g_type_class_add_private (klass, sizeof (PulsePortPrivate));
}
static void
pulse_port_init (PulsePort *port)
{
- port->priv = G_TYPE_INSTANCE_GET_PRIVATE (port,
- PULSE_TYPE_PORT,
- PulsePortPrivate);
+ port->priv = pulse_port_get_instance_private (port);
}
PulsePort *