[evolution/gnome-3-32] Remember source message information when re-editing in Drafts or Outbox
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-32] Remember source message information when re-editing in Drafts or Outbox
- Date: Thu, 20 Jun 2019 20:01:28 +0000 (UTC)
commit d78d92b6ab55cb2488aa9a8021d379df4bcd5108
Author: Milan Crha <mcrha redhat com>
Date: Thu Jun 20 21:58:06 2019 +0200
Remember source message information when re-editing in Drafts or Outbox
When a user saved a reply/forward message into Drafts and returned back
to it later the composed message lost an information about the source
message, thus when finally sent, the source message wasn't marked as
replied to or forwarded. Similarly when re-editing in the Outbox folder.
This is fixed by preserving related headers in the composer when
opening an existing message in either of the two folders.
src/mail/em-composer-utils.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
---
diff --git a/src/mail/em-composer-utils.c b/src/mail/em-composer-utils.c
index efe821d411..b04a107a5a 100644
--- a/src/mail/em-composer-utils.c
+++ b/src/mail/em-composer-utils.c
@@ -2226,6 +2226,28 @@ em_utils_edit_message (EMsgComposer *composer,
}
}
+ /* Remember the source message headers when re-editing in Drafts or Outbox,
+ thus Reply, Forward and such mark the source message properly. Do this
+ before the setup_with_message(), because it modifies the message headers. */
+ if (folder_is_drafts || folder_is_outbox) {
+ CamelMedium *medium;
+ const gchar *hdr_folder;
+ const gchar *hdr_message;
+ const gchar *hdr_flags;
+
+ medium = CAMEL_MEDIUM (message);
+
+ hdr_folder = camel_medium_get_header (medium, "X-Evolution-Source-Folder");
+ hdr_message = camel_medium_get_header (medium, "X-Evolution-Source-Message");
+ hdr_flags = camel_medium_get_header (medium, "X-Evolution-Source-Flags");
+
+ if (hdr_folder && hdr_message && hdr_flags) {
+ e_msg_composer_set_header (composer, "X-Evolution-Source-Folder", hdr_folder);
+ e_msg_composer_set_header (composer, "X-Evolution-Source-Message", hdr_message);
+ e_msg_composer_set_header (composer, "X-Evolution-Source-Flags", hdr_flags);
+ }
+ }
+
e_msg_composer_setup_with_message (composer, message, keep_signature, override_identity_uid,
override_alias_name, override_alias_address, NULL);
g_free (override_identity_uid);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]