summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-21 00:13:08 +0200
committerlukefromdc <[email protected]>2019-09-02 23:58:10 +0000
commitceb1bf36aafc9ffde7cdd2da064b77298539c073 (patch)
treea368767a8c70cee0c800561c13f83c4ae9c80108
parent0d950d6a1ef9afc31f83a39bbb051a8cca2bfca5 (diff)
downloadmate-utils-ceb1bf36aafc9ffde7cdd2da064b77298539c073.tar.bz2
mate-utils-ceb1bf36aafc9ffde7cdd2da064b77298539c073.tar.xz
logview-manager: avoid 'g_type_class_add_private'
-rw-r--r--logview/src/logview-manager.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/logview/src/logview-manager.c b/logview/src/logview-manager.c
index 17d31201..01beb06b 100644
--- a/logview/src/logview-manager.c
+++ b/logview/src/logview-manager.c
@@ -62,10 +62,7 @@ static LogviewManager *singleton = NULL;
static MultipleCreation *op = NULL;
static guint signals[LAST_SIGNAL] = { 0 };
-G_DEFINE_TYPE (LogviewManager, logview_manager, G_TYPE_OBJECT);
-
-#define GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((o), LOGVIEW_TYPE_MANAGER, LogviewManagerPrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (LogviewManager, logview_manager, G_TYPE_OBJECT);
static void
logview_manager_finalize (GObject *object)
@@ -117,14 +114,12 @@ logview_manager_class_init (LogviewManagerClass *klass)
G_TYPE_NONE, 2,
LOGVIEW_TYPE_LOG,
LOGVIEW_TYPE_LOG);
-
- g_type_class_add_private (klass, sizeof (LogviewManagerPrivate));
}
static void
logview_manager_init (LogviewManager *self)
{
- LogviewManagerPrivate *priv = self->priv = GET_PRIVATE (self);
+ LogviewManagerPrivate *priv = self->priv = logview_manager_get_instance_private (self);
priv->active_log = NULL;
priv->logs = g_hash_table_new_full (g_str_hash, g_str_equal,