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/box.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/box.c')
-rw-r--r-- | src/box.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -27,7 +27,8 @@ static const double STACKED_OFFSET = 4.0; -G_DEFINE_TYPE(GanvBox, ganv_box, GANV_TYPE_NODE) +G_DEFINE_TYPE_WITH_CODE(GanvBox, ganv_box, GANV_TYPE_NODE, + G_ADD_PRIVATE(GanvBox)) static GanvNodeClass* parent_class; @@ -48,8 +49,7 @@ enum { static void ganv_box_init(GanvBox* box) { - box->impl = G_TYPE_INSTANCE_GET_PRIVATE( - box, GANV_TYPE_BOX, GanvBoxPrivate); + box->impl = ganv_box_get_instance_private(box); memset(&box->impl->coords, '\0', sizeof(GanvBoxCoords)); @@ -385,8 +385,6 @@ ganv_box_class_init(GanvBoxClass* klass) parent_class = GANV_NODE_CLASS(g_type_class_peek_parent(klass)); - g_type_class_add_private(klass, sizeof(GanvBoxPrivate)); - gobject_class->set_property = ganv_box_set_property; gobject_class->get_property = ganv_box_get_property; |