summaryrefslogtreecommitdiff
path: root/logview/src
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-21 00:25:03 +0200
committerlukefromdc <[email protected]>2019-09-02 23:58:10 +0000
commitd8df825c4f30f33526b48a312c56c6703dd835ab (patch)
treec0048132776eb88b46268f733286248238157120 /logview/src
parentb53d4c280ac6a0f31b289098eaf1f61faa3fd2ac (diff)
downloadmate-utils-d8df825c4f30f33526b48a312c56c6703dd835ab.tar.bz2
mate-utils-d8df825c4f30f33526b48a312c56c6703dd835ab.tar.xz
logview-log: avoid 'g_type_class_add_private'
Diffstat (limited to 'logview/src')
-rw-r--r--logview/src/logview-log.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/logview/src/logview-log.c b/logview/src/logview-log.c
index c9a7150e..13f9df32 100644
--- a/logview/src/logview-log.c
+++ b/logview/src/logview-log.c
@@ -33,11 +33,6 @@
#include "logview-log.h"
#include "logview-utils.h"
-G_DEFINE_TYPE (LogviewLog, logview_log, G_TYPE_OBJECT);
-
-#define GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((o), LOGVIEW_TYPE_LOG, LogviewLogPrivate))
-
enum {
LOG_CHANGED,
LAST_SIGNAL
@@ -93,6 +88,8 @@ typedef struct {
z_stream zstream;
} GZHandle;
+G_DEFINE_TYPE_WITH_PRIVATE (LogviewLog, logview_log, G_TYPE_OBJECT);
+
static void
do_finalize (GObject *obj)
{
@@ -143,14 +140,12 @@ logview_log_class_init (LogviewLogClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
- g_type_class_add_private (klass, sizeof (LogviewLogPrivate));
}
static void
logview_log_init (LogviewLog *self)
{
- self->priv = GET_PRIVATE (self);
+ self->priv = logview_log_get_instance_private (self);
self->priv->lines = NULL;
self->priv->lines_no = 0;