From 5e1eda8877c85460ab1bd347533673c43c35309b Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 15 Feb 2013 21:04:43 -0500 Subject: EMailShellView: Use g_clear_object() in dispose(). --- modules/mail/e-mail-shell-view-private.c | 11 +++++------ modules/mail/e-mail-shell-view-private.h | 6 ------ 2 files changed, 5 insertions(+), 12 deletions(-) (limited to 'modules/mail') diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c index cb37b6e374..cf917f5251 100644 --- a/modules/mail/e-mail-shell-view-private.c +++ b/modules/mail/e-mail-shell-view-private.c @@ -855,17 +855,16 @@ e_mail_shell_view_private_dispose (EMailShellView *mail_shell_view) priv->prepare_for_quit_handler_id = 0; } - DISPOSE (priv->mail_shell_backend); - DISPOSE (priv->mail_shell_content); - DISPOSE (priv->mail_shell_sidebar); + g_clear_object (&priv->mail_shell_backend); + g_clear_object (&priv->mail_shell_content); + g_clear_object (&priv->mail_shell_sidebar); for (ii = 0; ii < MAIL_NUM_SEARCH_RULES; ii++) - DISPOSE (priv->search_rules[ii]); + g_clear_object (&priv->search_rules[ii]); if (priv->opening_folder != NULL) { g_cancellable_cancel (priv->opening_folder); - g_object_unref (priv->opening_folder); - priv->opening_folder = NULL; + g_clear_object (&priv->opening_folder); } if (priv->search_account_all != NULL) { diff --git a/modules/mail/e-mail-shell-view-private.h b/modules/mail/e-mail-shell-view-private.h index bd9db02b10..28d90d463b 100644 --- a/modules/mail/e-mail-shell-view-private.h +++ b/modules/mail/e-mail-shell-view-private.h @@ -70,12 +70,6 @@ #define ACTION_GROUP(name) \ (E_SHELL_WINDOW_ACTION_GROUP_##name (shell_window)) -/* For use in dispose() methods. */ -#define DISPOSE(obj) \ - G_STMT_START { \ - if ((obj) != NULL) { g_object_unref (obj); (obj) = NULL; } \ - } G_STMT_END - /* ETable Specifications */ #define ETSPEC_FILENAME "message-list.etspec" -- cgit v1.2.3