summaryrefslogtreecommitdiff
path: root/plugins/typing-break
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-18 03:50:11 +0200
committerVictor Kareh <[email protected]>2019-08-20 09:01:31 -0400
commit92dc29d64b7bbda84381bcbb87daf5a44c3aec3d (patch)
tree828cffdcfb62661ea669f03bd15184df5ef98543 /plugins/typing-break
parenta989ee04b2fa66e0769b690888999fb6ce44f74d (diff)
downloadmate-settings-daemon-92dc29d64b7bbda84381bcbb87daf5a44c3aec3d.tar.bz2
mate-settings-daemon-92dc29d64b7bbda84381bcbb87daf5a44c3aec3d.tar.xz
msd-typing-break-manager: avoid 'g_type_class_add_private'
Diffstat (limited to 'plugins/typing-break')
-rw-r--r--plugins/typing-break/msd-typing-break-manager.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/typing-break/msd-typing-break-manager.c b/plugins/typing-break/msd-typing-break-manager.c
index 5fdc729..22cdb1e 100644
--- a/plugins/typing-break/msd-typing-break-manager.c
+++ b/plugins/typing-break/msd-typing-break-manager.c
@@ -41,8 +41,6 @@
#include "mate-settings-profile.h"
#include "msd-typing-break-manager.h"
-#define MSD_TYPING_BREAK_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_TYPING_BREAK_MANAGER, MsdTypingBreakManagerPrivate))
-
#define MATE_BREAK_SCHEMA "org.mate.typing-break"
struct MsdTypingBreakManagerPrivate
@@ -58,7 +56,7 @@ static void msd_typing_break_manager_class_init (MsdTypingBreakManagerClass
static void msd_typing_break_manager_init (MsdTypingBreakManager *typing_break_manager);
static void msd_typing_break_manager_finalize (GObject *object);
-G_DEFINE_TYPE (MsdTypingBreakManager, msd_typing_break_manager, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (MsdTypingBreakManager, msd_typing_break_manager, G_TYPE_OBJECT)
static gpointer manager_object = NULL;
@@ -221,14 +219,12 @@ msd_typing_break_manager_class_init (MsdTypingBreakManagerClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = msd_typing_break_manager_finalize;
-
- g_type_class_add_private (klass, sizeof (MsdTypingBreakManagerPrivate));
}
static void
msd_typing_break_manager_init (MsdTypingBreakManager *manager)
{
- manager->priv = MSD_TYPING_BREAK_MANAGER_GET_PRIVATE (manager);
+ manager->priv = msd_typing_break_manager_get_instance_private (manager);
}