summaryrefslogtreecommitdiff
path: root/plugins/keyboard/msd-keyboard-manager.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-07-01 15:51:42 +0800
committerlukefromdc <[email protected]>2019-07-17 04:35:12 +0000
commit12ef1a821ebb63853b2d2e80f2559feca98bf7dc (patch)
tree67fc49fd8bc35932a0161c9868f28948e5ebce32 /plugins/keyboard/msd-keyboard-manager.c
parentde2761ddea2ca22cba4bb3668fb4328352210775 (diff)
downloadmate-settings-daemon-12ef1a821ebb63853b2d2e80f2559feca98bf7dc.tar.bz2
mate-settings-daemon-12ef1a821ebb63853b2d2e80f2559feca98bf7dc.tar.xz
plugins keyboard: fix deprecated g_type_class_add_private
Diffstat (limited to 'plugins/keyboard/msd-keyboard-manager.c')
-rw-r--r--plugins/keyboard/msd-keyboard-manager.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/plugins/keyboard/msd-keyboard-manager.c b/plugins/keyboard/msd-keyboard-manager.c
index 92450a8..c34b061 100644
--- a/plugins/keyboard/msd-keyboard-manager.c
+++ b/plugins/keyboard/msd-keyboard-manager.c
@@ -46,9 +46,6 @@
#include "msd-keyboard-xkb.h"
-#define MSD_KEYBOARD_MANAGER_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE((o), MSD_TYPE_KEYBOARD_MANAGER, MsdKeyboardManagerPrivate))
-
#define MSD_KEYBOARD_SCHEMA "org.mate.peripherals-keyboard"
#define KEY_REPEAT "repeat"
@@ -74,7 +71,7 @@ static void msd_keyboard_manager_class_init (MsdKeyboardManagerClass* klass
static void msd_keyboard_manager_init (MsdKeyboardManager* keyboard_manager);
static void msd_keyboard_manager_finalize (GObject* object);
-G_DEFINE_TYPE (MsdKeyboardManager, msd_keyboard_manager, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (MsdKeyboardManager, msd_keyboard_manager, G_TYPE_OBJECT)
static gpointer manager_object = NULL;
@@ -354,14 +351,12 @@ msd_keyboard_manager_class_init (MsdKeyboardManagerClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = msd_keyboard_manager_finalize;
-
- g_type_class_add_private (klass, sizeof (MsdKeyboardManagerPrivate));
}
static void
msd_keyboard_manager_init (MsdKeyboardManager *manager)
{
- manager->priv = MSD_KEYBOARD_MANAGER_GET_PRIVATE (manager);
+ manager->priv = msd_keyboard_manager_get_instance_private (manager);
}
static void