summaryrefslogtreecommitdiff
path: root/logview/src/logview-loglist.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-21 00:14:50 +0200
committerlukefromdc <[email protected]>2019-09-02 23:58:10 +0000
commit0130defcf4248783442c14c7cef1d40fa30e553e (patch)
tree063e8c57402a57bbf9925d537e5592d74bc520f8 /logview/src/logview-loglist.c
parentceb1bf36aafc9ffde7cdd2da064b77298539c073 (diff)
downloadmate-utils-0130defcf4248783442c14c7cef1d40fa30e553e.tar.bz2
mate-utils-0130defcf4248783442c14c7cef1d40fa30e553e.tar.xz
logview-loglist: avoid 'g_type_class_add_private'
Diffstat (limited to 'logview/src/logview-loglist.c')
-rw-r--r--logview/src/logview-loglist.c9
1 files changed, 2 insertions, 7 deletions
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 */