From 2f4dd02ef15c4e3f252b8b95cf0ce82f4451a3cf Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 27 Mar 2002 23:27:49 +0000 Subject: Updated to respect the new mail-config options for default reply style 2002-03-27 Jeffrey Stedfast * mail-callbacks.c (mail_generate_reply): Updated to respect the new mail-config options for default reply style that NotZed had started to implement before there was a gui. svn path=/trunk/; revision=16266 --- mail/ChangeLog | 6 ++++++ mail/mail-callbacks.c | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 818905faf1..1a64ef5d64 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2002-03-27 Jeffrey Stedfast + + * mail-callbacks.c (mail_generate_reply): Updated to respect the + new mail-config options for default reply style that NotZed had + started to implement before there was a gui. + 2002-03-27 Dan Winship * mail-display.c (do_attachment_header): unset GTK_CAN_FOCUS on diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index d1c25930d7..6bf6cd617a 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -840,6 +840,7 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char GList *to = NULL, *cc = NULL; EDestination **tov, **ccv; EMsgComposer *composer; + CamelMimePart *part; time_t date; const int max_subject_length = 1024; @@ -941,7 +942,19 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char } /* set body text here as we want all ignored words to take effect */ - if ((mode & REPLY_NO_QUOTE) == 0) { + switch (mail_config_get_default_reply_style ()) { + case MAIL_CONFIG_REPLY_DO_NOT_QUOTE: + /* do nothing */ + break; + case MAIL_CONFIG_REPLY_ATTACH: + /* attach the original message as an attachment */ + part = mail_tool_make_message_attachment (message); + e_msg_composer_attach (composer, part); + camel_object_unref (CAMEL_OBJECT (part)); + break; + case MAIL_CONFIG_REPLY_QUOTED: + default: + /* do what any sane user would want when replying... */ 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); @@ -960,6 +973,7 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char e_msg_composer_set_body_text (composer, text); g_free (text); } + break; } /* Set the subject of the new message. */ -- cgit v1.2.3