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 /modules/mail/e-mail-shell-content.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 'modules/mail/e-mail-shell-content.c')
-rw-r--r-- | modules/mail/e-mail-shell-content.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c index 2f7bea3017..d367994086 100644 --- a/modules/mail/e-mail-shell-content.c +++ b/modules/mail/e-mail-shell-content.c @@ -43,10 +43,6 @@ #include "e-mail-shell-backend.h" #include "e-mail-shell-view-actions.h" -#define E_MAIL_SHELL_CONTENT_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_MAIL_SHELL_CONTENT, EMailShellContentPrivate)) - struct _EMailShellContentPrivate { EMailView *mail_view; }; @@ -154,7 +150,7 @@ mail_shell_content_dispose (GObject *object) { EMailShellContentPrivate *priv; - priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (object); + priv = E_MAIL_SHELL_CONTENT (object)->priv; if (priv->mail_view != NULL) { g_object_unref (priv->mail_view); @@ -174,7 +170,7 @@ mail_shell_content_constructed (GObject *object) GtkWidget *container; GtkWidget *widget; - priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (object); + priv = E_MAIL_SHELL_CONTENT (object)->priv; /* Chain up to parent's constructed () method. */ G_OBJECT_CLASS (parent_class)->constructed (object); @@ -213,7 +209,7 @@ mail_shell_content_check_state (EShellContent *shell_content) EMailShellContentPrivate *priv; EMailReader *reader; - priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (shell_content); + priv = E_MAIL_SHELL_CONTENT (shell_content)->priv; /* Forward this to our internal EMailView, which * also implements the EMailReader interface. */ @@ -229,7 +225,7 @@ mail_shell_content_focus_search_results (EShellContent *shell_content) GtkWidget *message_list; EMailReader *reader; - priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (shell_content); + priv = E_MAIL_SHELL_CONTENT (shell_content)->priv; reader = E_MAIL_READER (priv->mail_view); message_list = e_mail_reader_get_message_list (reader); @@ -242,7 +238,7 @@ mail_shell_content_open_selected_mail (EMailReader *reader) { EMailShellContentPrivate *priv; - priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader); + priv = E_MAIL_SHELL_CONTENT (reader)->priv; /* Forward this to our internal EMailView, which * also implements the EMailReader interface. */ @@ -270,7 +266,7 @@ mail_shell_content_get_alert_sink (EMailReader *reader) { EMailShellContentPrivate *priv; - priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader); + priv = E_MAIL_SHELL_CONTENT (reader)->priv; /* Forward this to our internal EMailView, which * also implements the EMailReader interface. */ @@ -284,7 +280,7 @@ mail_shell_content_get_backend (EMailReader *reader) { EMailShellContentPrivate *priv; - priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader); + priv = E_MAIL_SHELL_CONTENT (reader)->priv; /* Forward this to our internal EMailView, which * also implements the EMailReader interface. */ @@ -298,7 +294,7 @@ mail_shell_content_get_formatter (EMailReader *reader) { EMailShellContentPrivate *priv; - priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader); + priv = E_MAIL_SHELL_CONTENT (reader)->priv; /* Forward this to our internal EMailView, which * also implements the EMailReader interface. */ @@ -312,7 +308,7 @@ mail_shell_content_get_hide_deleted (EMailReader *reader) { EMailShellContentPrivate *priv; - priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader); + priv = E_MAIL_SHELL_CONTENT (reader)->priv; /* Forward this to our internal EMailView, which * also implements the EMailReader interface. */ @@ -326,7 +322,7 @@ mail_shell_content_get_message_list (EMailReader *reader) { EMailShellContentPrivate *priv; - priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader); + priv = E_MAIL_SHELL_CONTENT (reader)->priv; /* Forward this to our internal EMailView, which * also implements the EMailReader interface. */ @@ -340,7 +336,7 @@ mail_shell_content_get_popup_menu (EMailReader *reader) { EMailShellContentPrivate *priv; - priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader); + priv = E_MAIL_SHELL_CONTENT (reader)->priv; /* Forward this to our internal EMailView, which * also implements the EMailReader interface. */ @@ -354,7 +350,7 @@ mail_shell_content_get_window (EMailReader *reader) { EMailShellContentPrivate *priv; - priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader); + priv = E_MAIL_SHELL_CONTENT (reader)->priv; /* Forward this to our internal EMailView, which * also implements the EMailReader interface. */ @@ -370,7 +366,7 @@ mail_shell_content_set_folder (EMailReader *reader, { EMailShellContentPrivate *priv; - priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader); + priv = E_MAIL_SHELL_CONTENT (reader)->priv; /* Forward this to our internal EMailView, which * also implements the EMailReader interface. */ @@ -384,7 +380,7 @@ mail_shell_content_show_search_bar (EMailReader *reader) { EMailShellContentPrivate *priv; - priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader); + priv = E_MAIL_SHELL_CONTENT (reader)->priv; /* Forward this to our internal EMailView, which * also implements the EMailReader interface. */ @@ -444,8 +440,7 @@ mail_shell_content_class_init (EMailShellContentClass *class) static void mail_shell_content_init (EMailShellContent *mail_shell_content) { - mail_shell_content->priv = - E_MAIL_SHELL_CONTENT_GET_PRIVATE (mail_shell_content); + mail_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (mail_shell_content, E_TYPE_MAIL_SHELL_CONTENT, EMailShellContentPrivate); /* Postpone widget construction until we have a shell view. */ } |