aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-vfolder-context.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-25 23:20:41 +0800
committerMilan Crha <mcrha@redhat.com>2011-02-25 23:20:41 +0800
commit1301cf02efdacd20fb5ce3e2554ae15b8f146e8a (patch)
tree8d5f3985a82ec7d330af27ee0a29a79a2f0ecfa3 /mail/em-vfolder-context.c
parent1a4be6c521d674c4a60e54203521e2721b81b921 (diff)
downloadgsoc2013-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 'mail/em-vfolder-context.c')
-rw-r--r--mail/em-vfolder-context.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/mail/em-vfolder-context.c b/mail/em-vfolder-context.c
index 4e7d4018d4..d59715b78d 100644
--- a/mail/em-vfolder-context.c
+++ b/mail/em-vfolder-context.c
@@ -35,10 +35,6 @@
#include "em-filter-folder-element.h"
-#define EM_VFOLDER_CONTEXT_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), EM_TYPE_VFOLDER_CONTEXT, EMVFolderContextPrivate))
-
struct _EMVFolderContextPrivate {
EMailSession *session;
};
@@ -103,7 +99,7 @@ vfolder_context_dispose (GObject *object)
{
EMVFolderContextPrivate *priv;
- priv = EM_VFOLDER_CONTEXT_GET_PRIVATE (object);
+ priv = EM_VFOLDER_CONTEXT (object)->priv;
if (priv->session != NULL) {
g_object_unref (priv->session);
@@ -120,7 +116,7 @@ vfolder_context_new_element (ERuleContext *context,
{
EMVFolderContextPrivate *priv;
- priv = EM_VFOLDER_CONTEXT_GET_PRIVATE (context);
+ priv = EM_VFOLDER_CONTEXT (context)->priv;
if (strcmp (type, "system-flag") == 0)
return e_filter_option_new ();
@@ -175,7 +171,7 @@ em_vfolder_context_class_init (EMVFolderContextClass *class)
static void
em_vfolder_context_init (EMVFolderContext *context)
{
- context->priv = EM_VFOLDER_CONTEXT_GET_PRIVATE (context);
+ context->priv = G_TYPE_INSTANCE_GET_PRIVATE (context, EM_TYPE_VFOLDER_CONTEXT, EMVFolderContextPrivate);
e_rule_context_add_part_set (
E_RULE_CONTEXT (context), "partset", E_TYPE_FILTER_PART,