summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-21 00:26:58 +0200
committerlukefromdc <[email protected]>2019-09-02 23:58:10 +0000
commit8175abe15fbb13f4640e063f3756eb56fa46825b (patch)
tree52b4f1be10c11a406e0a2bf91adc95817f0adc58
parentd8df825c4f30f33526b48a312c56c6703dd835ab (diff)
downloadmate-utils-8175abe15fbb13f4640e063f3756eb56fa46825b.tar.bz2
mate-utils-8175abe15fbb13f4640e063f3756eb56fa46825b.tar.xz
logview-filter-manager: avoid 'g_type_class_add_private'
-rw-r--r--logview/src/logview-filter-manager.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/logview/src/logview-filter-manager.c b/logview/src/logview-filter-manager.c
index 3d2c470e..4f3df30c 100644
--- a/logview/src/logview-filter-manager.c
+++ b/logview/src/logview-filter-manager.c
@@ -48,10 +48,7 @@ enum {
N_COLUMNS
};
-#define LOGVIEW_FILTER_MANAGER_GET_PRIVATE(o) \
-(G_TYPE_INSTANCE_GET_PRIVATE ((o), LOGVIEW_TYPE_FILTER_MANAGER, LogviewFilterManagerPrivate))
-
-G_DEFINE_TYPE (LogviewFilterManager, logview_filter_manager, GTK_TYPE_DIALOG);
+G_DEFINE_TYPE_WITH_PRIVATE (LogviewFilterManager, logview_filter_manager, GTK_TYPE_DIALOG);
static void
logview_filter_manager_update_model (LogviewFilterManager *manager)
@@ -458,7 +455,7 @@ logview_filter_manager_init (LogviewFilterManager *manager)
GtkCellRenderer *text_renderer;
LogviewFilterManagerPrivate *priv;
- manager->priv = LOGVIEW_FILTER_MANAGER_GET_PRIVATE (manager);
+ manager->priv = logview_filter_manager_get_instance_private (manager);
priv = manager->priv;
priv->builder = gtk_builder_new ();
@@ -573,8 +570,6 @@ logview_filter_manager_class_init (LogviewFilterManagerClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkDialogClass *parent_class = GTK_DIALOG_CLASS (klass);
- g_type_class_add_private (klass, sizeof (LogviewFilterManagerPrivate));
-
object_class->dispose = logview_filter_manager_dispose;
parent_class->response = logview_filter_manager_response;
}