[evolution/webkit-composer: 173/185] Fix composer ACTION macros.



commit 6a73d71a67502c274335104560a5d933de95b0c3
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Feb 8 10:47:10 2013 -0500

    Fix composer ACTION macros.
    
    Put them back the way they were.  The macros take a 'composer' argument
    and do "e_editor_get_action (e_msg_composer_get_editor (composer), name)"
    to obtain the GtkAction.

 composer/e-composer-actions.h                     | 86 ++++++++++++-----------
 mail/e-mail-reader-utils.c                        |  2 -
 plugins/attachment-reminder/attachment-reminder.c |  4 +-
 3 files changed, 45 insertions(+), 47 deletions(-)
---
diff --git a/composer/e-composer-actions.h b/composer/e-composer-actions.h
index 93f9908..efea8ea 100644
--- a/composer/e-composer-actions.h
+++ b/composer/e-composer-actions.h
@@ -18,48 +18,50 @@
 #ifndef E_COMPOSER_ACTIONS_H
 #define E_COMPOSER_ACTIONS_H
 
-#define E_COMPOSER_ACTION(editor, name) \
-       (e_editor_get_action (E_EDITOR (editor), (name)))
+#define E_COMPOSER_ACTION(composer, name) \
+       (e_editor_get_action ( \
+               e_msg_composer_get_editor ( \
+               E_MSG_COMPOSER (composer)), (name)))
 
-#define E_COMPOSER_ACTION_ATTACH(editor) \
-       E_COMPOSER_ACTION ((editor), "attach")
-#define E_COMPOSER_ACTION_CLOSE(editor) \
-       E_COMPOSER_ACTION ((editor), "close")
-#define E_COMPOSER_ACTION_PGP_ENCRYPT(editor) \
-       E_COMPOSER_ACTION ((editor), "pgp-encrypt")
-#define E_COMPOSER_ACTION_PGP_SIGN(editor) \
-       E_COMPOSER_ACTION ((editor), "pgp-sign")
-#define E_COMPOSER_ACTION_PICTURE_GALLERY(editor) \
-       E_COMPOSER_ACTION ((editor), "picture-gallery")
-#define E_COMPOSER_ACTION_PRINT(editor) \
-       E_COMPOSER_ACTION ((editor), "print")
-#define E_COMPOSER_ACTION_PRINT_PREVIEW(editor) \
-       E_COMPOSER_ACTION ((editor), "print-preview")
-#define E_COMPOSER_ACTION_PRIORITIZE_MESSAGE(editor) \
-       E_COMPOSER_ACTION ((editor), "prioritize-message")
-#define E_COMPOSER_ACTION_REQUEST_READ_RECEIPT(editor) \
-       E_COMPOSER_ACTION ((editor), "request-read-receipt")
-#define E_COMPOSER_ACTION_SAVE(editor) \
-       E_COMPOSER_ACTION ((editor), "save")
-#define E_COMPOSER_ACTION_SAVE_AS(editor) \
-       E_COMPOSER_ACTION ((editor), "save-as")
-#define E_COMPOSER_ACTION_SAVE_DRAFT(editor) \
-       E_COMPOSER_ACTION ((editor), "save-draft")
-#define E_COMPOSER_ACTION_SECURITY_MENU(editor) \
-       E_COMPOSER_ACTION ((editor), "security-menu")
-#define E_COMPOSER_ACTION_SEND(editor) \
-       E_COMPOSER_ACTION ((editor), "send")
-#define E_COMPOSER_ACTION_NEW_MESSAGE(editor) \
-       E_COMPOSER_ACTION ((editor), "new-message")
-#define E_COMPOSER_ACTION_SMIME_ENCRYPT(editor) \
-       E_COMPOSER_ACTION ((editor), "smime-encrypt")
-#define E_COMPOSER_ACTION_SMIME_SIGN(editor) \
-       E_COMPOSER_ACTION ((editor), "smime-sign")
-#define E_COMPOSER_ACTION_VIEW_BCC(editor) \
-       E_COMPOSER_ACTION ((editor), "view-bcc")
-#define E_COMPOSER_ACTION_VIEW_CC(editor) \
-       E_COMPOSER_ACTION ((editor), "view-cc")
-#define E_COMPOSER_ACTION_VIEW_REPLY_TO(editor) \
-       E_COMPOSER_ACTION ((editor), "view-reply-to")
+#define E_COMPOSER_ACTION_ATTACH(composer) \
+       E_COMPOSER_ACTION ((composer), "attach")
+#define E_COMPOSER_ACTION_CLOSE(composer) \
+       E_COMPOSER_ACTION ((composer), "close")
+#define E_COMPOSER_ACTION_PGP_ENCRYPT(composer) \
+       E_COMPOSER_ACTION ((composer), "pgp-encrypt")
+#define E_COMPOSER_ACTION_PGP_SIGN(composer) \
+       E_COMPOSER_ACTION ((composer), "pgp-sign")
+#define E_COMPOSER_ACTION_PICTURE_GALLERY(composer) \
+       E_COMPOSER_ACTION ((composer), "picture-gallery")
+#define E_COMPOSER_ACTION_PRINT(composer) \
+       E_COMPOSER_ACTION ((composer), "print")
+#define E_COMPOSER_ACTION_PRINT_PREVIEW(composer) \
+       E_COMPOSER_ACTION ((composer), "print-preview")
+#define E_COMPOSER_ACTION_PRIORITIZE_MESSAGE(composer) \
+       E_COMPOSER_ACTION ((composer), "prioritize-message")
+#define E_COMPOSER_ACTION_REQUEST_READ_RECEIPT(composer) \
+       E_COMPOSER_ACTION ((composer), "request-read-receipt")
+#define E_COMPOSER_ACTION_SAVE(composer) \
+       E_COMPOSER_ACTION ((composer), "save")
+#define E_COMPOSER_ACTION_SAVE_AS(composer) \
+       E_COMPOSER_ACTION ((composer), "save-as")
+#define E_COMPOSER_ACTION_SAVE_DRAFT(composer) \
+       E_COMPOSER_ACTION ((composer), "save-draft")
+#define E_COMPOSER_ACTION_SECURITY_MENU(composer) \
+       E_COMPOSER_ACTION ((composer), "security-menu")
+#define E_COMPOSER_ACTION_SEND(composer) \
+       E_COMPOSER_ACTION ((composer), "send")
+#define E_COMPOSER_ACTION_NEW_MESSAGE(composer) \
+       E_COMPOSER_ACTION ((composer), "new-message")
+#define E_COMPOSER_ACTION_SMIME_ENCRYPT(composer) \
+       E_COMPOSER_ACTION ((composer), "smime-encrypt")
+#define E_COMPOSER_ACTION_SMIME_SIGN(composer) \
+       E_COMPOSER_ACTION ((composer), "smime-sign")
+#define E_COMPOSER_ACTION_VIEW_BCC(composer) \
+       E_COMPOSER_ACTION ((composer), "view-bcc")
+#define E_COMPOSER_ACTION_VIEW_CC(composer) \
+       E_COMPOSER_ACTION ((composer), "view-cc")
+#define E_COMPOSER_ACTION_VIEW_REPLY_TO(composer) \
+       E_COMPOSER_ACTION ((composer), "view-reply-to")
 
 #endif /* E_COMPOSER_ACTIONS_H */
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c
index 8a3e777..752c05b 100644
--- a/mail/e-mail-reader-utils.c
+++ b/mail/e-mail-reader-utils.c
@@ -1483,7 +1483,6 @@ e_mail_reader_reply_to_message (EMailReader *reader,
                GtkToggleAction *action;
 
                if ((validity_pgp_sum & E_MAIL_PART_VALIDITY_PGP) != 0) {
-                       EEditor *editor = E_EDITOR (composer);
                        if ((validity_pgp_sum & E_MAIL_PART_VALIDITY_SIGNED) != 0) {
                                action = GTK_TOGGLE_ACTION (E_COMPOSER_ACTION_PGP_SIGN (composer));
                                gtk_toggle_action_set_active (action, TRUE);
@@ -1496,7 +1495,6 @@ e_mail_reader_reply_to_message (EMailReader *reader,
                }
 
                if ((validity_smime_sum & E_MAIL_PART_VALIDITY_SMIME) != 0) {
-                       EEditor *editor = E_EDITOR (composer);
                        if ((validity_smime_sum & E_MAIL_PART_VALIDITY_SIGNED) != 0) {
                                action = GTK_TOGGLE_ACTION (E_COMPOSER_ACTION_SMIME_SIGN (composer));
                                gtk_toggle_action_set_active (action, TRUE);
diff --git a/plugins/attachment-reminder/attachment-reminder.c 
b/plugins/attachment-reminder/attachment-reminder.c
index fb1bf70..52a0323 100644
--- a/plugins/attachment-reminder/attachment-reminder.c
+++ b/plugins/attachment-reminder/attachment-reminder.c
@@ -129,10 +129,8 @@ ask_for_missing_attachment (EPlugin *ep,
 
        gtk_widget_destroy (dialog);
 
-       if (response == GTK_RESPONSE_OK) {
-               EEditor *editor = e_editor_window_get_editor (E_EDITOR_WINDOW (window));
+       if (response == GTK_RESPONSE_OK)
                gtk_action_activate (E_COMPOSER_ACTION_ATTACH (window));
-       }
 
        return response == GTK_RESPONSE_YES;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]