summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-17 13:31:58 +0200
committerVictor Kareh <[email protected]>2019-08-20 09:01:31 -0400
commita768ccbc8d08bf289098e3c93dd45ed451dc43dc (patch)
tree605b29e6d919170498563055fbd6ab56a0b6af3f /plugins
parentefef8824d5deb1bcbb77514c7f981f3eb972b979 (diff)
downloadmate-settings-daemon-a768ccbc8d08bf289098e3c93dd45ed451dc43dc.tar.bz2
mate-settings-daemon-a768ccbc8d08bf289098e3c93dd45ed451dc43dc.tar.xz
msd-keybindings-manager: avoid 'g_type_class_add_private'
Diffstat (limited to 'plugins')
-rw-r--r--plugins/keybindings/msd-keybindings-manager.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/keybindings/msd-keybindings-manager.c b/plugins/keybindings/msd-keybindings-manager.c
index 76905db..903ea3f 100644
--- a/plugins/keybindings/msd-keybindings-manager.c
+++ b/plugins/keybindings/msd-keybindings-manager.c
@@ -49,8 +49,6 @@
#define GSETTINGS_KEYBINDINGS_DIR "/org/mate/desktop/keybindings/"
#define CUSTOM_KEYBINDING_SCHEMA "org.mate.control-center.keybinding"
-#define MSD_KEYBINDINGS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_KEYBINDINGS_MANAGER, MsdKeybindingsManagerPrivate))
-
typedef struct {
char *binding_str;
char *action;
@@ -70,7 +68,7 @@ static void msd_keybindings_manager_class_init (MsdKeybindingsManagerClass
static void msd_keybindings_manager_init (MsdKeybindingsManager *keybindings_manager);
static void msd_keybindings_manager_finalize (GObject *object);
-G_DEFINE_TYPE (MsdKeybindingsManager, msd_keybindings_manager, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (MsdKeybindingsManager, msd_keybindings_manager, G_TYPE_OBJECT)
static gpointer manager_object = NULL;
@@ -598,14 +596,12 @@ msd_keybindings_manager_class_init (MsdKeybindingsManagerClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = msd_keybindings_manager_finalize;
-
- g_type_class_add_private (klass, sizeof (MsdKeybindingsManagerPrivate));
}
static void
msd_keybindings_manager_init (MsdKeybindingsManager *manager)
{
- manager->priv = MSD_KEYBINDINGS_MANAGER_GET_PRIVATE (manager);
+ manager->priv = msd_keybindings_manager_get_instance_private (manager);
}