diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-06-02 22:10:54 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-06-09 01:14:47 +0800 |
commit | 7428fc93d58921bab9968a999172b843af2a2244 (patch) | |
tree | e40e4c00469ef986fb734d93eb86ed2d699762b6 /mail/em-composer-utils.c | |
parent | a6e485712f2785680ee2dd2084a9d4d70152ffec (diff) | |
download | gsoc2013-evolution-7428fc93d58921bab9968a999172b843af2a2244.tar.gz gsoc2013-evolution-7428fc93d58921bab9968a999172b843af2a2244.tar.zst gsoc2013-evolution-7428fc93d58921bab9968a999172b843af2a2244.zip |
Miscellaneous mail cleanups.
Diffstat (limited to 'mail/em-composer-utils.c')
-rw-r--r-- | mail/em-composer-utils.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index 326072110f..1ab739185f 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -1227,13 +1227,20 @@ em_utils_edit_message (EShell *shell, const gchar *message_uid) { EMsgComposer *composer; + gboolean folder_is_drafts; + gboolean folder_is_outbox; + gboolean folder_is_templates; g_return_val_if_fail (E_IS_SHELL (shell), NULL); g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL); g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL); + folder_is_drafts = em_utils_folder_is_drafts (folder); + folder_is_outbox = em_utils_folder_is_outbox (folder); + folder_is_templates = em_utils_folder_is_templates (folder); + /* Template specific code follows. */ - if (em_utils_folder_is_templates (folder)) { + if (folder_is_templates) { CamelDataWrapper *content; GConfClient *gconf; GSList *clue_list = NULL; @@ -1254,9 +1261,10 @@ em_utils_edit_message (EShell *shell, composer = e_msg_composer_new_with_message (shell, message, NULL); - e_msg_composer_remove_header (composer, "X-Evolution-Replace-Outbox-UID"); + e_msg_composer_remove_header ( + composer, "X-Evolution-Replace-Outbox-UID"); - if (message_uid != NULL && em_utils_folder_is_drafts (folder)) { + if (message_uid != NULL && folder_is_drafts) { gchar *folder_uri; folder_uri = e_mail_folder_uri_from_folder (folder); @@ -1265,8 +1273,11 @@ em_utils_edit_message (EShell *shell, composer, folder_uri, message_uid); g_free (folder_uri); - } else if (message_uid != NULL && em_utils_folder_is_outbox (folder)) { - e_msg_composer_set_header (composer, "X-Evolution-Replace-Outbox-UID", message_uid); + + } else if (message_uid != NULL && folder_is_outbox) { + e_msg_composer_set_header ( + composer, "X-Evolution-Replace-Outbox-UID", + message_uid); } composer_set_no_change (composer); |