diff options
author | David Robillard <d@drobilla.net> | 2018-09-16 16:55:21 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-09-16 17:08:00 +0200 |
commit | 75b11aac0bc76e459017728fb0d3f5b631a7a993 (patch) | |
tree | 6f2033a083ada31ec666632a22a2a4826681fe64 /src/circle.c | |
parent | 43373dd610017d7e78672e473a36285a92254f2e (diff) | |
download | ganv-75b11aac0bc76e459017728fb0d3f5b631a7a993.tar.gz ganv-75b11aac0bc76e459017728fb0d3f5b631a7a993.tar.bz2 ganv-75b11aac0bc76e459017728fb0d3f5b631a7a993.zip |
Remove use of deprecated g_type_class_add_private()
Diffstat (limited to 'src/circle.c')
-rw-r--r-- | src/circle.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/circle.c b/src/circle.c index 9d19971..a69c207 100644 --- a/src/circle.c +++ b/src/circle.c @@ -24,7 +24,8 @@ #include "./gettext.h" #include "./ganv-private.h" -G_DEFINE_TYPE(GanvCircle, ganv_circle, GANV_TYPE_NODE) +G_DEFINE_TYPE_WITH_CODE(GanvCircle, ganv_circle, GANV_TYPE_NODE, + G_ADD_PRIVATE(GanvCircle)) static GanvNodeClass* parent_class; @@ -38,8 +39,7 @@ enum { static void ganv_circle_init(GanvCircle* circle) { - circle->impl = G_TYPE_INSTANCE_GET_PRIVATE( - circle, GANV_TYPE_CIRCLE, GanvCirclePrivate); + circle->impl = ganv_circle_get_instance_private(circle); memset(&circle->impl->coords, '\0', sizeof(GanvCircleCoords)); circle->impl->coords.radius = 0.0; @@ -366,8 +366,6 @@ ganv_circle_class_init(GanvCircleClass* klass) parent_class = GANV_NODE_CLASS(g_type_class_peek_parent(klass)); - g_type_class_add_private(klass, sizeof(GanvCirclePrivate)); - gobject_class->set_property = ganv_circle_set_property; gobject_class->get_property = ganv_circle_get_property; |