summaryrefslogtreecommitdiff
path: root/src/unit-manager.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-01-29 19:06:51 +0100
committerZenWalker <[email protected]>2019-01-30 20:18:02 +0100
commita61f07d0f1dc4ab88ad655ef23cbcd66277980cf (patch)
tree590e8ed84c088789ff7782908ae17ca1f4e26f52 /src/unit-manager.c
parent25f0f0a234059d282dbf445c3ca47cb0c08c3ca4 (diff)
downloadmate-calc-a61f07d0f1dc4ab88ad655ef23cbcd66277980cf.tar.bz2
mate-calc-a61f07d0f1dc4ab88ad655ef23cbcd66277980cf.tar.xz
unit-manager: avoid deprecated 'g_type_class_add_private'
Diffstat (limited to 'src/unit-manager.c')
-rw-r--r--src/unit-manager.c5
1 files changed, 2 insertions, 3 deletions
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);
}