From c003c99a75587ba39a45d164272760c33f9666b5 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 25 Feb 2011 16:20:41 +0100 Subject: Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly --- modules/mail/em-account-prefs.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'modules/mail/em-account-prefs.c') diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c index e309d2c4ba..378207c365 100644 --- a/modules/mail/em-account-prefs.c +++ b/modules/mail/em-account-prefs.c @@ -42,10 +42,6 @@ #include "shell/e-shell.h" #include "capplet/settings/mail-capplet-shell.h" -#define EM_ACCOUNT_PREFS_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), EM_TYPE_ACCOUNT_PREFS, EMAccountPrefsPrivate)) - struct _EMAccountPrefsPrivate { EMailSession *session; gpointer assistant; /* weak pointer */ @@ -162,7 +158,7 @@ account_prefs_dispose (GObject *object) { EMAccountPrefsPrivate *priv; - priv = EM_ACCOUNT_PREFS_GET_PRIVATE (object); + priv = EM_ACCOUNT_PREFS (object)->priv; if (priv->session != NULL) { g_object_unref (priv->session); @@ -192,7 +188,7 @@ account_prefs_add_account (EAccountManager *manager) EMAccountEditor *emae; gpointer parent; - priv = EM_ACCOUNT_PREFS_GET_PRIVATE (manager); + priv = EM_ACCOUNT_PREFS (manager)->priv; if (priv->assistant != NULL) { gtk_window_present (GTK_WINDOW (priv->assistant)); @@ -239,7 +235,7 @@ account_prefs_edit_account (EAccountManager *manager) EAccount *account; gpointer parent; - priv = EM_ACCOUNT_PREFS_GET_PRIVATE (manager); + priv = EM_ACCOUNT_PREFS (manager)->priv; if (priv->editor != NULL) { gtk_window_present (GTK_WINDOW (priv->editor)); @@ -286,7 +282,7 @@ account_prefs_delete_account (EAccountManager *manager) gpointer parent; gint response; - priv = EM_ACCOUNT_PREFS_GET_PRIVATE (manager); + priv = EM_ACCOUNT_PREFS (manager)->priv; account_list = e_account_manager_get_account_list (manager); tree_view = e_account_manager_get_tree_view (manager); @@ -364,7 +360,7 @@ em_account_prefs_init (EMAccountPrefs *prefs) EAccountManager *manager; EAccountTreeView *tree_view; - prefs->priv = EM_ACCOUNT_PREFS_GET_PRIVATE (prefs); + prefs->priv = G_TYPE_INSTANCE_GET_PRIVATE (prefs, EM_TYPE_ACCOUNT_PREFS, EMAccountPrefsPrivate); manager = E_ACCOUNT_MANAGER (prefs); tree_view = e_account_manager_get_tree_view (manager); -- cgit v1.2.3