diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-02-16 10:04:43 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-02-16 10:05:32 +0800 |
commit | 5e1eda8877c85460ab1bd347533673c43c35309b (patch) | |
tree | eabab7cd61e8370e7da8748f7d09dc5066d34e6d | |
parent | 2ebfd1d525cac225a61f743a295fd94266095e6a (diff) | |
download | gsoc2013-evolution-5e1eda8877c85460ab1bd347533673c43c35309b.tar.gz gsoc2013-evolution-5e1eda8877c85460ab1bd347533673c43c35309b.tar.zst gsoc2013-evolution-5e1eda8877c85460ab1bd347533673c43c35309b.zip |
EMailShellView: Use g_clear_object() in dispose().
-rw-r--r-- | modules/mail/e-mail-shell-view-private.c | 11 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view-private.h | 6 |
2 files changed, 5 insertions, 12 deletions
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" |