From 0130defcf4248783442c14c7cef1d40fa30e553e Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Wed, 21 Aug 2019 00:14:50 +0200 Subject: logview-loglist: avoid 'g_type_class_add_private' --- logview/src/logview-loglist.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'logview/src') diff --git a/logview/src/logview-loglist.c b/logview/src/logview-loglist.c index 117e859e..611f455a 100644 --- a/logview/src/logview-loglist.c +++ b/logview/src/logview-loglist.c @@ -39,10 +39,7 @@ struct _LogviewLoglistPrivate { gboolean has_day_selection; }; -G_DEFINE_TYPE (LogviewLoglist, logview_loglist, GTK_TYPE_TREE_VIEW); - -#define GET_PRIVATE(o) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((o), LOGVIEW_TYPE_LOGLIST, LogviewLoglistPrivate)) +G_DEFINE_TYPE_WITH_PRIVATE (LogviewLoglist, logview_loglist, GTK_TYPE_TREE_VIEW); enum { LOG_OBJECT = 0, @@ -401,7 +398,7 @@ logview_loglist_init (LogviewLoglist *list) GtkTreeSelection *selection; GtkCellRenderer *cell; - list->priv = GET_PRIVATE (list); + list->priv = logview_loglist_get_instance_private (list); list->priv->has_day_selection = FALSE; list->priv->selection = NULL; @@ -467,8 +464,6 @@ logview_loglist_class_init (LogviewLoglistClass *klass) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - - g_type_class_add_private (klass, sizeof (LogviewLoglistPrivate)); } /* public methods */ -- cgit v1.2.1