diff options
author | Pablo Barciela <[email protected]> | 2019-08-12 02:21:46 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-08-16 21:04:51 +0000 |
commit | 0baad4f23d685c6685e6bf14eb931948f26647ec (patch) | |
tree | 9a3dab29674756338519b7860fa76cef6d1f160f | |
parent | f2273b05a03e18d1ee3cc327b04a0df001d96f62 (diff) | |
download | atril-0baad4f23d685c6685e6bf14eb931948f26647ec.tar.bz2 atril-0baad4f23d685c6685e6bf14eb931948f26647ec.tar.xz |
ev-attachment: avoid 'g_type_class_add_private'
-rw-r--r-- | libdocument/ev-attachment.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libdocument/ev-attachment.c b/libdocument/ev-attachment.c index bf7aede5..c0fb46f7 100644 --- a/libdocument/ev-attachment.c +++ b/libdocument/ev-attachment.c @@ -48,10 +48,7 @@ struct _EvAttachmentPrivate { GFile *tmp_file; }; -#define EV_ATTACHMENT_GET_PRIVATE(object) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_ATTACHMENT, EvAttachmentPrivate)) - -G_DEFINE_TYPE (EvAttachment, ev_attachment, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (EvAttachment, ev_attachment, G_TYPE_OBJECT) GQuark ev_attachment_error_quark (void) @@ -152,8 +149,6 @@ ev_attachment_class_init (EvAttachmentClass *klass) g_object_class->set_property = ev_attachment_set_property; - g_type_class_add_private (g_object_class, sizeof (EvAttachmentPrivate)); - /* Properties */ g_object_class_install_property (g_object_class, PROP_NAME, @@ -209,7 +204,7 @@ ev_attachment_class_init (EvAttachmentClass *klass) static void ev_attachment_init (EvAttachment *attachment) { - attachment->priv = EV_ATTACHMENT_GET_PRIVATE (attachment); + attachment->priv = ev_attachment_get_instance_private (attachment); attachment->priv->name = NULL; attachment->priv->description = NULL; |