diff options
author | Milan Crha <mcrha@redhat.com> | 2011-02-25 23:20:41 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-02-25 23:20:41 +0800 |
commit | 1301cf02efdacd20fb5ce3e2554ae15b8f146e8a (patch) | |
tree | 8d5f3985a82ec7d330af27ee0a29a79a2f0ecfa3 /widgets/misc/e-attachment.c | |
parent | 1a4be6c521d674c4a60e54203521e2721b81b921 (diff) | |
download | gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.gz gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.zst gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.zip |
Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly
Diffstat (limited to 'widgets/misc/e-attachment.c')
-rw-r--r-- | widgets/misc/e-attachment.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c index a96f7ed4ad..2c219a79ce 100644 --- a/widgets/misc/e-attachment.c +++ b/widgets/misc/e-attachment.c @@ -33,10 +33,6 @@ #include "e-util/e-mktemp.h" #include "e-attachment-store.h" -#define E_ATTACHMENT_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_ATTACHMENT, EAttachmentPrivate)) - /* Fallback Icon */ #define DEFAULT_ICON_NAME "mail-attachment" @@ -667,7 +663,7 @@ attachment_dispose (GObject *object) { EAttachmentPrivate *priv; - priv = E_ATTACHMENT_GET_PRIVATE (object); + priv = E_ATTACHMENT (object)->priv; if (priv->file != NULL) { g_object_unref (priv->file); @@ -712,7 +708,7 @@ attachment_finalize (GObject *object) { EAttachmentPrivate *priv; - priv = E_ATTACHMENT_GET_PRIVATE (object); + priv = E_ATTACHMENT (object)->priv; g_free (priv->disposition); @@ -881,7 +877,7 @@ e_attachment_class_init (EAttachmentClass *class) static void e_attachment_init (EAttachment *attachment) { - attachment->priv = E_ATTACHMENT_GET_PRIVATE (attachment); + attachment->priv = G_TYPE_INSTANCE_GET_PRIVATE (attachment, E_TYPE_ATTACHMENT, EAttachmentPrivate); attachment->priv->cancellable = g_cancellable_new (); attachment->priv->encrypted = CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE; attachment->priv->signed_ = CAMEL_CIPHER_VALIDITY_SIGN_NONE; |