From 8175abe15fbb13f4640e063f3756eb56fa46825b Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Wed, 21 Aug 2019 00:26:58 +0200 Subject: logview-filter-manager: avoid 'g_type_class_add_private' --- logview/src/logview-filter-manager.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'logview') 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; } -- cgit v1.2.1