summaryrefslogtreecommitdiff
path: root/backends/pulse/pulse-backend.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-backend.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-backend.c')
-rw-r--r--backends/pulse/pulse-backend.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/backends/pulse/pulse-backend.c b/backends/pulse/pulse-backend.c
index 9b483b9..854d414 100644
--- a/backends/pulse/pulse-backend.c
+++ b/backends/pulse/pulse-backend.c
@@ -123,7 +123,7 @@ static void pulse_backend_finalize (GObject *object);
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-function"
-G_DEFINE_DYNAMIC_TYPE (PulseBackend, pulse_backend, MATE_MIXER_TYPE_BACKEND)
+G_DEFINE_DYNAMIC_TYPE_EXTENDED (PulseBackend, pulse_backend, MATE_MIXER_TYPE_BACKEND, 0, G_ADD_PRIVATE_DYNAMIC(PulseBackend))
#pragma clang diagnostic pop
static gboolean pulse_backend_open (MateMixerBackend *backend);
@@ -252,8 +252,6 @@ pulse_backend_class_init (PulseBackendClass *klass)
backend_class->list_stored_controls = pulse_backend_list_stored_controls;
backend_class->set_default_input_stream = pulse_backend_set_default_input_stream;
backend_class->set_default_output_stream = pulse_backend_set_default_output_stream;
-
- g_type_class_add_private (object_class, sizeof (PulseBackendPrivate));
}
/* Called in the code generated by G_DEFINE_DYNAMIC_TYPE() */
@@ -265,9 +263,7 @@ pulse_backend_class_finalize (PulseBackendClass *klass)
static void
pulse_backend_init (PulseBackend *pulse)
{
- pulse->priv = G_TYPE_INSTANCE_GET_PRIVATE (pulse,
- PULSE_TYPE_BACKEND,
- PulseBackendPrivate);
+ pulse->priv = pulse_backend_get_instance_private (pulse);
/* These hash tables store PulseDevice and PulseStream instances */
pulse->priv->devices =