From 066d3e77338ac913f86cd6146dce4aec8c7e4de2 Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Sun, 18 Aug 2019 03:53:17 +0200 Subject: msd-sound-manager: avoid 'g_type_class_add_private' --- plugins/sound/msd-sound-manager.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/sound/msd-sound-manager.c b/plugins/sound/msd-sound-manager.c index 498d0ff..38dcced 100644 --- a/plugins/sound/msd-sound-manager.c +++ b/plugins/sound/msd-sound-manager.c @@ -43,8 +43,6 @@ #include "msd-sound-manager.h" #include "mate-settings-profile.h" -#define MSD_SOUND_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_SOUND_MANAGER, MsdSoundManagerPrivate)) - struct MsdSoundManagerPrivate { GSettings *settings; @@ -58,7 +56,7 @@ static void msd_sound_manager_class_init (MsdSoundManagerClass *klass); static void msd_sound_manager_init (MsdSoundManager *sound_manager); static void msd_sound_manager_finalize (GObject *object); -G_DEFINE_TYPE (MsdSoundManager, msd_sound_manager, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (MsdSoundManager, msd_sound_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; @@ -348,14 +346,12 @@ msd_sound_manager_class_init (MsdSoundManagerClass *klass) object_class->dispose = msd_sound_manager_dispose; object_class->finalize = msd_sound_manager_finalize; - - g_type_class_add_private (klass, sizeof (MsdSoundManagerPrivate)); } static void msd_sound_manager_init (MsdSoundManager *manager) { - manager->priv = MSD_SOUND_MANAGER_GET_PRIVATE (manager); + manager->priv = msd_sound_manager_get_instance_private (manager); } static void -- cgit v1.2.1