summaryrefslogtreecommitdiff
path: root/plugins/media-keys
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-18 16:26:36 +0200
committerVictor Kareh <[email protected]>2019-08-20 09:01:31 -0400
commit85db1434aef3b70da4603a6a91391b8e8212c13f (patch)
tree13244f998d53e44716f2e55b4931282b6c9b4e63 /plugins/media-keys
parentdd9ee32f97982cc65dfd6d2517d73c9a4f38e13a (diff)
downloadmate-settings-daemon-85db1434aef3b70da4603a6a91391b8e8212c13f.tar.bz2
mate-settings-daemon-85db1434aef3b70da4603a6a91391b8e8212c13f.tar.xz
msd-media-keys-manager: avoid 'g_type_class_add_private'
Diffstat (limited to 'plugins/media-keys')
-rw-r--r--plugins/media-keys/msd-media-keys-manager.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/media-keys/msd-media-keys-manager.c b/plugins/media-keys/msd-media-keys-manager.c
index b1fe2dc..c33eccb 100644
--- a/plugins/media-keys/msd-media-keys-manager.c
+++ b/plugins/media-keys/msd-media-keys-manager.c
@@ -58,8 +58,6 @@
#define TOUCHPAD_SCHEMA "org.mate.peripherals-touchpad"
#define TOUCHPAD_ENABLED_KEY "touchpad-enabled"
-#define MSD_MEDIA_KEYS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_MEDIA_KEYS_MANAGER, MsdMediaKeysManagerPrivate))
-
typedef struct {
char *application;
guint32 time;
@@ -104,7 +102,7 @@ static guint signals[LAST_SIGNAL] = { 0 };
static void msd_media_keys_manager_class_init (MsdMediaKeysManagerClass *klass);
static void msd_media_keys_manager_init (MsdMediaKeysManager *media_keys_manager);
-G_DEFINE_TYPE (MsdMediaKeysManager, msd_media_keys_manager, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (MsdMediaKeysManager, msd_media_keys_manager, G_TYPE_OBJECT)
static gpointer manager_object = NULL;
@@ -1620,14 +1618,12 @@ msd_media_keys_manager_class_init (MsdMediaKeysManagerClass *klass)
G_TYPE_STRING);
dbus_g_object_type_install_info (MSD_TYPE_MEDIA_KEYS_MANAGER, &dbus_glib_msd_media_keys_manager_object_info);
-
- g_type_class_add_private (klass, sizeof (MsdMediaKeysManagerPrivate));
}
static void
msd_media_keys_manager_init (MsdMediaKeysManager *manager)
{
- manager->priv = MSD_MEDIA_KEYS_MANAGER_GET_PRIVATE (manager);
+ manager->priv = msd_media_keys_manager_get_instance_private (manager);
}
static gboolean