summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-19 14:39:53 +0200
committerVictor Kareh <[email protected]>2019-08-20 09:01:31 -0400
commit4023bf3b605d4dca13fd9edd5fb6df607e90d410 (patch)
tree0a565c79a790c5ad50dd74e5d3903a9257120f0a /plugins
parenta38d2230754e1f984b73fd83ca3df9c3cf8708b4 (diff)
downloadmate-settings-daemon-4023bf3b605d4dca13fd9edd5fb6df607e90d410.tar.bz2
mate-settings-daemon-4023bf3b605d4dca13fd9edd5fb6df607e90d410.tar.xz
msd-rfkill-manager: avoid 'g_type_class_add_private'
Diffstat (limited to 'plugins')
-rw-r--r--plugins/rfkill/msd-rfkill-manager.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/rfkill/msd-rfkill-manager.c b/plugins/rfkill/msd-rfkill-manager.c
index 4c1ec19..f9c6924 100644
--- a/plugins/rfkill/msd-rfkill-manager.c
+++ b/plugins/rfkill/msd-rfkill-manager.c
@@ -31,8 +31,6 @@
#include "rfkill-glib.h"
#include "mate-settings-bus.h"
-#define MSD_RFKILL_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_RFKILL_MANAGER, MsdRfkillManagerPrivate))
-
struct MsdRfkillManagerPrivate
{
GDBusNodeInfo *introspection_data;
@@ -84,7 +82,7 @@ static void msd_rfkill_manager_class_init (MsdRfkillManagerClass *klass);
static void msd_rfkill_manager_init (MsdRfkillManager *rfkill_manager);
static void msd_rfkill_manager_finalize (GObject *object);
-G_DEFINE_TYPE (MsdRfkillManager, msd_rfkill_manager, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (MsdRfkillManager, msd_rfkill_manager, G_TYPE_OBJECT)
static gpointer manager_object = NULL;
@@ -94,14 +92,12 @@ msd_rfkill_manager_class_init (MsdRfkillManagerClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = msd_rfkill_manager_finalize;
-
- g_type_class_add_private (klass, sizeof (MsdRfkillManagerPrivate));
}
static void
msd_rfkill_manager_init (MsdRfkillManager *manager)
{
- manager->priv = MSD_RFKILL_MANAGER_GET_PRIVATE (manager);
+ manager->priv = msd_rfkill_manager_get_instance_private (manager);
}
static gboolean