summaryrefslogtreecommitdiff
path: root/libdocument/ev-layer.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-12 02:15:47 +0200
committerlukefromdc <[email protected]>2019-08-16 21:04:51 +0000
commita5231ade55cdd752f04613ab2c4999f774521eee (patch)
tree38c4fe2b081b558907ebcdd04f6003e1d9ff9076 /libdocument/ev-layer.c
parent5e87ab42499310051fc568250d0e25f75cdad75f (diff)
downloadatril-a5231ade55cdd752f04613ab2c4999f774521eee.tar.bz2
atril-a5231ade55cdd752f04613ab2c4999f774521eee.tar.xz
ev-layer: avoid 'g_type_class_add_private'
Diffstat (limited to 'libdocument/ev-layer.c')
-rw-r--r--libdocument/ev-layer.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libdocument/ev-layer.c b/libdocument/ev-layer.c
index cb735164..91e7e088 100644
--- a/libdocument/ev-layer.c
+++ b/libdocument/ev-layer.c
@@ -26,23 +26,17 @@ struct _EvLayerPrivate {
gint rb_group;
};
-#define EV_LAYER_GET_PRIVATE(object) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_LAYER, EvLayerPrivate))
-
-G_DEFINE_TYPE (EvLayer, ev_layer, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (EvLayer, ev_layer, G_TYPE_OBJECT)
static void
ev_layer_class_init (EvLayerClass *klass)
{
- GObjectClass *g_object_class = G_OBJECT_CLASS (klass);
-
- g_type_class_add_private (g_object_class, sizeof (EvLayerPrivate));
}
static void
ev_layer_init (EvLayer *layer)
{
- layer->priv = EV_LAYER_GET_PRIVATE (layer);
+ layer->priv = ev_layer_get_instance_private (layer);
}
EvLayer *