diff options
author | Pablo Barciela <[email protected]> | 2019-08-12 02:18:42 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-08-16 21:04:51 +0000 |
commit | f2273b05a03e18d1ee3cc327b04a0df001d96f62 (patch) | |
tree | cdbbe69043ce1ac8380bedbae73718e5988e9e03 /libdocument | |
parent | a5231ade55cdd752f04613ab2c4999f774521eee (diff) | |
download | atril-f2273b05a03e18d1ee3cc327b04a0df001d96f62.tar.bz2 atril-f2273b05a03e18d1ee3cc327b04a0df001d96f62.tar.xz |
ev-image: avoid 'g_type_class_add_private'
Diffstat (limited to 'libdocument')
-rw-r--r-- | libdocument/ev-image.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libdocument/ev-image.c b/libdocument/ev-image.c index 9e2525f8..690c4bda 100644 --- a/libdocument/ev-image.c +++ b/libdocument/ev-image.c @@ -33,10 +33,7 @@ struct _EvImagePrivate { gchar *tmp_uri; }; -#define EV_IMAGE_GET_PRIVATE(object) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_IMAGE, EvImagePrivate)) - -G_DEFINE_TYPE (EvImage, ev_image, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (EvImage, ev_image, G_TYPE_OBJECT) static void ev_image_finalize (GObject *object) @@ -68,15 +65,13 @@ ev_image_class_init (EvImageClass *klass) g_object_class = G_OBJECT_CLASS (klass); - g_type_class_add_private (g_object_class, sizeof (EvImagePrivate)); - g_object_class->finalize = ev_image_finalize; } static void ev_image_init (EvImage *image) { - image->priv = EV_IMAGE_GET_PRIVATE (image); + image->priv = ev_image_get_instance_private (image); } EvImage * |