summaryrefslogtreecommitdiffstats
path: root/src/edge.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-16 16:55:21 +0200
committerDavid Robillard <d@drobilla.net>2018-09-16 17:08:00 +0200
commit75b11aac0bc76e459017728fb0d3f5b631a7a993 (patch)
tree6f2033a083ada31ec666632a22a2a4826681fe64 /src/edge.c
parent43373dd610017d7e78672e473a36285a92254f2e (diff)
downloadganv-75b11aac0bc76e459017728fb0d3f5b631a7a993.tar.gz
ganv-75b11aac0bc76e459017728fb0d3f5b631a7a993.tar.bz2
ganv-75b11aac0bc76e459017728fb0d3f5b631a7a993.zip
Remove use of deprecated g_type_class_add_private()
Diffstat (limited to 'src/edge.c')
-rw-r--r--src/edge.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/edge.c b/src/edge.c
index b61ce85..a22bc73 100644
--- a/src/edge.c
+++ b/src/edge.c
@@ -55,15 +55,15 @@ enum {
PROP_GHOST
};
-G_DEFINE_TYPE(GanvEdge, ganv_edge, GANV_TYPE_ITEM)
+G_DEFINE_TYPE_WITH_CODE(GanvEdge, ganv_edge, GANV_TYPE_ITEM,
+ G_ADD_PRIVATE(GanvEdge))
static GanvItemClass* parent_class;
static void
ganv_edge_init(GanvEdge* edge)
{
- GanvEdgePrivate* impl = G_TYPE_INSTANCE_GET_PRIVATE(
- edge, GANV_TYPE_EDGE, GanvEdgePrivate);
+ GanvEdgePrivate* impl = ganv_edge_get_instance_private(edge);
edge->impl = impl;
@@ -516,8 +516,6 @@ ganv_edge_class_init(GanvEdgeClass* klass)
parent_class = GANV_ITEM_CLASS(g_type_class_peek_parent(klass));
- g_type_class_add_private(klass, sizeof(GanvEdgePrivate));
-
gobject_class->set_property = ganv_edge_set_property;
gobject_class->get_property = ganv_edge_get_property;