aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-02-04 10:22:18 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-02-04 10:22:18 +0800
commit45c33701786d742fbfd570c82ac4fe19dbc9c224 (patch)
treedbdee8410af6e9eca041aecf8a7786e0665f4754 /mail/mail-callbacks.c
parentdc6f613eeafd60b175c0a4565e6066656ae5ca90 (diff)
downloadgsoc2013-evolution-45c33701786d742fbfd570c82ac4fe19dbc9c224.tar
gsoc2013-evolution-45c33701786d742fbfd570c82ac4fe19dbc9c224.tar.gz
gsoc2013-evolution-45c33701786d742fbfd570c82ac4fe19dbc9c224.tar.bz2
gsoc2013-evolution-45c33701786d742fbfd570c82ac4fe19dbc9c224.tar.lz
gsoc2013-evolution-45c33701786d742fbfd570c82ac4fe19dbc9c224.tar.xz
gsoc2013-evolution-45c33701786d742fbfd570c82ac4fe19dbc9c224.tar.zst
gsoc2013-evolution-45c33701786d742fbfd570c82ac4fe19dbc9c224.zip
Add attachments after we've seen if the composer object is valid.
2002-01-31 Not Zed <NotZed@Ximian.com> * mail-callbacks.c (mail_generate_reply): Add attachments after we've seen if the composer object is valid. (mail_generate_reply): Support new flag REPLY_NO_QUOTE - if set, then dont quote any of the message in the reply. svn path=/trunk/; revision=15560
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r--mail/mail-callbacks.c40
1 files changed, 23 insertions, 17 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 7ed137e9e0..4b54798044 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -870,27 +870,33 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char
time_t date;
const int max_subject_length = 1024;
- composer = e_msg_composer_new ();
- e_msg_composer_add_message_attachments (composer, message, TRUE);
-
+ composer = e_msg_composer_new ();
if (!composer)
return NULL;
- sender = camel_mime_message_get_from (message);
- if (sender != NULL && camel_address_length (CAMEL_ADDRESS (sender)) > 0) {
- camel_internet_address_get (sender, 0, &name, &address);
- } else {
- name = _("an unknown sender");
- }
-
- date = camel_mime_message_get_date (message, NULL);
+ e_msg_composer_add_message_attachments (composer, message, TRUE);
+
+ if ((mode & REPLY_NO_QUOTE) == 0) {
+ sender = camel_mime_message_get_from (message);
+ if (sender != NULL && camel_address_length (CAMEL_ADDRESS (sender)) > 0) {
+ camel_internet_address_get (sender, 0, &name, &address);
+ } else {
+ name = _("an unknown sender");
+ }
+
+ date = camel_mime_message_get_date (message, NULL);
+ strftime (date_str, sizeof (date_str), _("On %a, %Y-%m-%d at %H:%M, %%s wrote:"),
+ localtime (&date));
+ format = e_utf8_from_locale_string (date_str);
+ text = mail_tool_quote_message (message, format, name && *name ? name : address);
+ mail_ignore (composer, name, address);
+ g_free (format);
- strftime (date_str, sizeof (date_str), _("On %a, %Y-%m-%d at %H:%M, %%s wrote:"),
- localtime (&date));
- format = e_utf8_from_locale_string (date_str);
- text = mail_tool_quote_message (message, format, name && *name ? name : address);
- mail_ignore (composer, name, address);
- g_free (format);
+ if (text) {
+ e_msg_composer_set_body_text (composer, text);
+ g_free (text);
+ }
+ }
/* Set the recipients */
accounts = mail_config_get_accounts ();