aboutsummaryrefslogtreecommitdiffstats
path: root/libemail-engine
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-10-22 21:28:01 +0800
committerMilan Crha <mcrha@redhat.com>2012-10-22 21:28:01 +0800
commit0c65652f2a3b29250b11425c594ded737a2a4cc5 (patch)
tree55d2c006ecc77a15991e67620420edb76357d105 /libemail-engine
parentb956da9fb4dac330fe70525e97642d79adc58009 (diff)
downloadgsoc2013-evolution-0c65652f2a3b29250b11425c594ded737a2a4cc5.tar
gsoc2013-evolution-0c65652f2a3b29250b11425c594ded737a2a4cc5.tar.gz
gsoc2013-evolution-0c65652f2a3b29250b11425c594ded737a2a4cc5.tar.bz2
gsoc2013-evolution-0c65652f2a3b29250b11425c594ded737a2a4cc5.tar.lz
gsoc2013-evolution-0c65652f2a3b29250b11425c594ded737a2a4cc5.tar.xz
gsoc2013-evolution-0c65652f2a3b29250b11425c594ded737a2a4cc5.tar.zst
gsoc2013-evolution-0c65652f2a3b29250b11425c594ded737a2a4cc5.zip
Bug #268618 - Add: Save replies in the folder of the message being replied to
Follow-up fixes: a) don't copy to origin folder for forwarded messages b) use a real folder when reply/forward from a vFolder
Diffstat (limited to 'libemail-engine')
-rw-r--r--libemail-engine/e-mail-session-utils.c11
-rw-r--r--libemail-engine/mail-ops.c11
2 files changed, 14 insertions, 8 deletions
diff --git a/libemail-engine/e-mail-session-utils.c b/libemail-engine/e-mail-session-utils.c
index 33e7effa47..7ec3ca3a70 100644
--- a/libemail-engine/e-mail-session-utils.c
+++ b/libemail-engine/e-mail-session-utils.c
@@ -863,10 +863,13 @@ e_mail_session_send_to (EMailSession *session,
transport_uid = g_strstrip (g_strdup (string));
if (replies_to_origin_folder) {
- string = camel_header_raw_find (&xev, "X-Evolution-Source-Folder", NULL);
- if (string != NULL && camel_header_raw_find (&xev, "X-Evolution-Source-Message", NULL) != NULL) {
- g_free (sent_folder_uri);
- sent_folder_uri = g_strstrip (g_strdup (string));
+ string = camel_header_raw_find (&xev, "X-Evolution-Source-Flags", NULL);
+ if (string != NULL && strstr (string, "FORWARDED") == NULL) {
+ string = camel_header_raw_find (&xev, "X-Evolution-Source-Folder", NULL);
+ if (string != NULL && camel_header_raw_find (&xev, "X-Evolution-Source-Message", NULL) != NULL) {
+ g_free (sent_folder_uri);
+ sent_folder_uri = g_strstrip (g_strdup (string));
+ }
}
}
diff --git a/libemail-engine/mail-ops.c b/libemail-engine/mail-ops.c
index e24e8c9752..748152602c 100644
--- a/libemail-engine/mail-ops.c
+++ b/libemail-engine/mail-ops.c
@@ -623,10 +623,13 @@ mail_send_message (struct _send_queue_msg *m,
sent_folder_uri = g_strstrip (g_strdup (tmp));
if (replies_to_origin_folder) {
- tmp = camel_header_raw_find (&xev, "X-Evolution-Source-Folder", NULL);
- if (tmp != NULL && camel_header_raw_find (&xev, "X-Evolution-Source-Message", NULL) != NULL) {
- g_free (sent_folder_uri);
- sent_folder_uri = g_strstrip (g_strdup (tmp));
+ tmp = camel_header_raw_find (&xev, "X-Evolution-Source-Flags", NULL);
+ if (tmp != NULL && strstr (tmp, "FORWARDED") == NULL) {
+ tmp = camel_header_raw_find (&xev, "X-Evolution-Source-Folder", NULL);
+ if (tmp != NULL && camel_header_raw_find (&xev, "X-Evolution-Source-Message", NULL) != NULL) {
+ g_free (sent_folder_uri);
+ sent_folder_uri = g_strstrip (g_strdup (tmp));
+ }
}
}