From a61f07d0f1dc4ab88ad655ef23cbcd66277980cf Mon Sep 17 00:00:00 2001
From: Pablo Barciela <scow@riseup.net>
Date: Tue, 29 Jan 2019 19:06:51 +0100
Subject: unit-manager: avoid deprecated 'g_type_class_add_private'

---
 src/unit-manager.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'src')

diff --git a/src/unit-manager.c b/src/unit-manager.c
index 9943a31..cf1e441 100644
--- a/src/unit-manager.c
+++ b/src/unit-manager.c
@@ -20,7 +20,7 @@ struct UnitManagerPrivate
     GList *categories;
 };
 
-G_DEFINE_TYPE (UnitManager, unit_manager, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (UnitManager, unit_manager, G_TYPE_OBJECT);
 
 
 static UnitManager *default_unit_manager = NULL;
@@ -257,12 +257,11 @@ unit_manager_convert_by_symbol(UnitManager *manager, const MPNumber *x, const ch
 static void
 unit_manager_class_init(UnitManagerClass *klass)
 {
-    g_type_class_add_private(klass, sizeof(UnitManagerPrivate));
 }
 
 
 static void
 unit_manager_init(UnitManager *manager)
 {
-    manager->priv = G_TYPE_INSTANCE_GET_PRIVATE(manager, unit_manager_get_type(), UnitManagerPrivate);
+    manager->priv = unit_manager_get_instance_private (manager);
 }
-- 
cgit v1.2.1