diff options
author | Milan Crha <mcrha@redhat.com> | 2013-05-07 05:54:37 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2013-05-07 05:54:37 +0800 |
commit | b254ea37eff47973b076fcf9345f80215ae5c978 (patch) | |
tree | 6a3c594988e168ee938f73adb4c13319c52f2616 /mail | |
parent | 9567024148976a663585894ccef76d729f0fb095 (diff) | |
download | gsoc2013-evolution-b254ea37eff47973b076fcf9345f80215ae5c978.tar.gz gsoc2013-evolution-b254ea37eff47973b076fcf9345f80215ae5c978.tar.zst gsoc2013-evolution-b254ea37eff47973b076fcf9345f80215ae5c978.zip |
Bug #301323 - "Edit as new message" doesn't strip signature properly
Diffstat (limited to 'mail')
-rw-r--r-- | mail/e-mail-folder-pane.c | 4 | ||||
-rw-r--r-- | mail/e-mail-reader-utils.c | 4 | ||||
-rw-r--r-- | mail/e-mail-reader.c | 2 | ||||
-rw-r--r-- | mail/em-composer-utils.c | 12 | ||||
-rw-r--r-- | mail/em-composer-utils.h | 6 |
5 files changed, 17 insertions, 11 deletions
diff --git a/mail/e-mail-folder-pane.c b/mail/e-mail-folder-pane.c index 985f47b99c..a84aab1453 100644 --- a/mail/e-mail-folder-pane.c +++ b/mail/e-mail-folder-pane.c @@ -100,7 +100,7 @@ mail_paned_view_open_selected_mail (EMailPanedView *view) if (em_utils_folder_is_drafts (registry, folder) || em_utils_folder_is_outbox (registry, folder) || em_utils_folder_is_templates (registry, folder)) { - em_utils_edit_messages (reader, folder, uids, TRUE); + em_utils_edit_messages (reader, folder, uids, TRUE, TRUE); g_ptr_array_unref (uids); return 0; } @@ -135,7 +135,7 @@ mail_paned_view_open_selected_mail (EMailPanedView *view) (GDestroyNotify) g_free); g_ptr_array_add (edits, real_uid); em_utils_edit_messages ( - reader, real_folder, edits, TRUE); + reader, real_folder, edits, TRUE, TRUE); g_ptr_array_unref (edits); } else { g_free (real_uid); diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c index 36e745570a..c4a6ac09b9 100644 --- a/mail/e-mail-reader-utils.c +++ b/mail/e-mail-reader-utils.c @@ -789,7 +789,7 @@ e_mail_reader_open_selected (EMailReader *reader) if (em_utils_folder_is_drafts (registry, folder) || em_utils_folder_is_outbox (registry, folder) || em_utils_folder_is_templates (registry, folder)) { - em_utils_edit_messages (reader, folder, uids, TRUE); + em_utils_edit_messages (reader, folder, uids, TRUE, TRUE); return uids->len; } @@ -822,7 +822,7 @@ e_mail_reader_open_selected (EMailReader *reader) edits = g_ptr_array_new (); g_ptr_array_add (edits, real_uid); em_utils_edit_messages ( - reader, real_folder, edits, TRUE); + reader, real_folder, edits, TRUE, TRUE); } else { g_free (real_uid); g_ptr_array_add (views, g_strdup (uid)); diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index e36b1f745b..97774c84d4 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -926,7 +926,7 @@ action_mail_message_edit_cb (GtkAction *action, g_ptr_array_set_free_func (uids, (GDestroyNotify) g_free); replace = em_utils_folder_is_drafts (registry, folder); - em_utils_edit_messages (reader, folder, uids, replace); + em_utils_edit_messages (reader, folder, uids, replace, replace); g_ptr_array_unref (uids); } diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index 64e1e2deed..cf5039b9fd 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -81,6 +81,7 @@ struct _AsyncContext { gchar *folder_uri; gchar *message_uid; gboolean replace; + gboolean keep_signature; GtkWidget *destroy_when_done; }; @@ -1336,7 +1337,8 @@ GtkWidget * em_utils_edit_message (EShell *shell, CamelFolder *folder, CamelMimeMessage *message, - const gchar *message_uid) + const gchar *message_uid, + gboolean keep_signature) { EMsgComposer *composer; ESourceRegistry *registry; @@ -1377,7 +1379,7 @@ em_utils_edit_message (EShell *shell, g_slist_free (clue_list); } - composer = e_msg_composer_new_with_message (shell, message, NULL); + composer = e_msg_composer_new_with_message (shell, message, keep_signature, NULL); if (!folder_is_templates) { EComposerHeaderTable *table; ESource *source; @@ -1483,7 +1485,7 @@ edit_messages_cb (CamelFolder *folder, message = CAMEL_MIME_MESSAGE (value); camel_medium_remove_header (CAMEL_MEDIUM (value), "X-Mailer"); - em_utils_edit_message (shell, folder, message, key); + em_utils_edit_message (shell, folder, message, key, context->keep_signature); } g_hash_table_unref (hash_table); @@ -1506,7 +1508,8 @@ void em_utils_edit_messages (EMailReader *reader, CamelFolder *folder, GPtrArray *uids, - gboolean replace) + gboolean replace, + gboolean keep_signature) { EActivity *activity; AsyncContext *context; @@ -1524,6 +1527,7 @@ em_utils_edit_messages (EMailReader *reader, context->reader = g_object_ref (reader); context->ptr_array = g_ptr_array_ref (uids); context->replace = replace; + context->keep_signature = keep_signature; e_mail_folder_get_multiple_messages ( folder, uids, G_PRIORITY_DEFAULT, diff --git a/mail/em-composer-utils.h b/mail/em-composer-utils.h index cda63d1458..14d65f73ba 100644 --- a/mail/em-composer-utils.h +++ b/mail/em-composer-utils.h @@ -41,11 +41,13 @@ EMsgComposer * em_utils_compose_new_message_with_mailto GtkWidget * em_utils_edit_message (EShell *shell, CamelFolder *folder, CamelMimeMessage *message, - const gchar *message_uid); + const gchar *message_uid, + gboolean keep_signature); void em_utils_edit_messages (EMailReader *reader, CamelFolder *folder, GPtrArray *uids, - gboolean replace); + gboolean replace, + gboolean keep_signature); EMsgComposer * em_utils_forward_message (EShell *shell, CamelSession *session, CamelMimeMessage *msg, |