summaryrefslogtreecommitdiff
path: root/logview/src
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-21 00:16:46 +0200
committerlukefromdc <[email protected]>2019-09-02 23:58:10 +0000
commit7f0457c0438ec2f76a4c04e384c2f78e0ede9043 (patch)
tree1887c16f17780ac81fb5e022661f45f7c84b2ac1 /logview/src
parent0130defcf4248783442c14c7cef1d40fa30e553e (diff)
downloadmate-utils-7f0457c0438ec2f76a4c04e384c2f78e0ede9043.tar.bz2
mate-utils-7f0457c0438ec2f76a4c04e384c2f78e0ede9043.tar.xz
logview-filter: avoid 'g_type_class_add_private'
Diffstat (limited to 'logview/src')
-rw-r--r--logview/src/logview-filter.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/logview/src/logview-filter.c b/logview/src/logview-filter.c
index 1a865fa8..91bfa3b2 100644
--- a/logview/src/logview-filter.c
+++ b/logview/src/logview-filter.c
@@ -30,21 +30,18 @@ enum {
PROP_TEXTTAG
};
-G_DEFINE_TYPE (LogviewFilter, logview_filter, G_TYPE_OBJECT);
-
struct _LogviewFilterPrivate {
GRegex* regex;
gchar* name;
GtkTextTag* tag;
};
-#define LOGVIEW_FILTER_GET_PRIVATE(o) \
-(G_TYPE_INSTANCE_GET_PRIVATE ((o), LOGVIEW_TYPE_FILTER, LogviewFilterPrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (LogviewFilter, logview_filter, G_TYPE_OBJECT);
static void
logview_filter_init (LogviewFilter *object)
{
- object->priv = LOGVIEW_FILTER_GET_PRIVATE(object);
+ object->priv = logview_filter_get_instance_private (object);
object->priv->tag = NULL;
}
@@ -154,9 +151,6 @@ logview_filter_class_init (LogviewFilterClass *klass)
"The text tag to be set on matching lines",
GTK_TYPE_TEXT_TAG,
G_PARAM_READABLE | G_PARAM_WRITABLE));
-
-
- g_type_class_add_private (klass, sizeof (LogviewFilterPrivate));
}
/* public methods */