aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@novell.com>2005-05-13 01:04:15 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2005-05-13 01:04:15 +0800
commit68416e0bdd4f24d7d1336df463d6944d5451ecdd (patch)
treef53b00194f94ac6601626a8c5e6f140290f0a53b /mail
parent20ef8f97a52cd7ce155f88bbfd4f911119e3d2e2 (diff)
downloadgsoc2013-evolution-68416e0bdd4f24d7d1336df463d6944d5451ecdd.tar.gz
gsoc2013-evolution-68416e0bdd4f24d7d1336df463d6944d5451ecdd.tar.zst
gsoc2013-evolution-68416e0bdd4f24d7d1336df463d6944d5451ecdd.zip
Use the real folder and real uid (not the virtual if replying to a message
2005-04-21 Jeffrey Stedfast <fejj@novell.com> * em-composer-utils.c (post_reply_to_message): Use the real folder and real uid (not the virtual if replying to a message in a vfolder). Fixes bug #269129. svn path=/trunk/; revision=29345
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/em-composer-utils.c25
-rw-r--r--mail/em-folder-view.c36
3 files changed, 47 insertions, 24 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index e289cd5976..2692f43f62 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,7 +1,13 @@
+2005-04-21 Jeffrey Stedfast <fejj@novell.com>
+
+ * em-composer-utils.c (post_reply_to_message): Use the real folder
+ and real uid (not the virtual if replying to a message in a
+ vfolder). Fixes bug #269129.
+
2005-05-06 Vivek Jain <jvivek@novell.com>
- * em-folder-view.c :EPopupItem emfv_popup_items[]
- replace Print with Print... Fixes #272242
+ * em-folder-view.c: EPopupItem emfv_popup_items[] replace Print
+ with Print... Fixes #272242
2005-05-07 Sankar P <psankar@novell.com>
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 975d560ba8..7007a318bb 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -52,6 +52,7 @@
#include <camel/camel-string-utils.h>
#include <camel/camel-stream-mem.h>
#include <camel/camel-nntp-address.h>
+#include <camel/camel-vee-folder.h>
static EAccount * guess_account (CamelMimeMessage *message, CamelFolder *folder);
@@ -1958,15 +1959,29 @@ post_reply_to_message (CamelFolder *folder, const char *uid, CamelMimeMessage *m
const char *message_id, *references;
CamelInternetAddress *to;
EDestination **tov = NULL;
+ CamelFolder *real_folder;
EMsgComposer *composer;
char *subject, *url;
EAccount *account;
+ char *real_uid;
guint32 flags;
if (message == NULL)
return;
- account = guess_account (message, folder);
+ if (CAMEL_IS_VEE_FOLDER (folder)) {
+ CamelMessageInfo *info;
+
+ info = camel_folder_get_message_info (folder, uid);
+ real_folder = camel_vee_folder_get_location ((CamelVeeFolder *) folder, (struct _CamelVeeMessageInfo *) info, &real_uid);
+ camel_folder_free_message_info (folder, info);
+ } else {
+ real_folder = folder;
+ camel_object_ref (folder);
+ real_uid = g_strdup (uid);
+ }
+
+ account = guess_account (message, real_folder);
flags = CAMEL_MESSAGE_ANSWERED | CAMEL_MESSAGE_SEEN;
to = camel_internet_address_new();
@@ -1991,7 +2006,7 @@ post_reply_to_message (CamelFolder *folder, const char *uid, CamelMimeMessage *m
g_free (subject);
- url = mail_tools_folder_to_url (folder);
+ url = mail_tools_folder_to_url (real_folder);
e_msg_composer_hdrs_set_post_to ((EMsgComposerHdrs *) composer->hdrs, url);
g_free (url);
@@ -2020,12 +2035,14 @@ post_reply_to_message (CamelFolder *folder, const char *uid, CamelMimeMessage *m
composer_set_body (composer, message, NULL);
- em_composer_utils_setup_callbacks (composer, folder, uid, flags, flags, NULL, NULL);
+ em_composer_utils_setup_callbacks (composer, real_folder, real_uid, flags, flags, NULL, NULL);
gtk_widget_show (GTK_WIDGET (composer));
e_msg_composer_unset_changed (composer);
-
+
+ camel_object_unref (real_folder);
camel_object_unref(to);
+ g_free (real_uid);
}
/**
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index cf7d26dbba..f4c5b737f2 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -1339,24 +1339,24 @@ emfv_message_reply(EMFolderView *emfv, int mode)
selection_string = gtk_html_get_selection_html (((EMFormatHTML *)emfv->preview)->html, &len);
if (selection_string && len) {
- CamelMimeMessage *msg, *src;
- struct _camel_header_raw *header;
-
- src = (CamelMimeMessage *)((EMFormat *)emfv->preview)->message;
- msg = camel_mime_message_new();
-
- /* need to strip content- headers */
- header = ((CamelMimePart *)src)->headers;
- while (header) {
- if (g_ascii_strncasecmp(header->name, "content-", 8) != 0)
- camel_medium_add_header((CamelMedium *)msg, header->name, header->value);
- header = header->next;
- }
- camel_mime_part_set_encoding((CamelMimePart *)msg, CAMEL_TRANSFER_ENCODING_8BIT);
- camel_mime_part_set_content((CamelMimePart *)msg,
- selection_string, len, "text/html");
- em_utils_reply_to_message (emfv->folder, emfv->list->cursor_uid, msg, mode, NULL);
- camel_object_unref(msg);
+ CamelMimeMessage *msg, *src;
+ struct _camel_header_raw *header;
+
+ src = (CamelMimeMessage *)((EMFormat *)emfv->preview)->message;
+ msg = camel_mime_message_new();
+
+ /* need to strip content- headers */
+ header = ((CamelMimePart *)src)->headers;
+ while (header) {
+ if (g_ascii_strncasecmp(header->name, "content-", 8) != 0)
+ camel_medium_add_header((CamelMedium *)msg, header->name, header->value);
+ header = header->next;
+ }
+ camel_mime_part_set_encoding((CamelMimePart *)msg, CAMEL_TRANSFER_ENCODING_8BIT);
+ camel_mime_part_set_content((CamelMimePart *)msg,
+ selection_string, len, "text/html");
+ em_utils_reply_to_message (emfv->folder, emfv->list->cursor_uid, msg, mode, NULL);
+ camel_object_unref(msg);
} else {
em_utils_reply_to_message (emfv->folder, emfv->list->cursor_uid, NULL, mode, (EMFormat *)emfv->preview);
}