From 0931d27d61aa9f0ccc579be8d4c7b3c56bdd684f Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 12 Jun 2000 18:55:20 +0000 Subject: Fix the subject generation so we don't get "Re: Re:". This is working * mail-format.c (mail_generate_reply): Fix the subject generation so we don't get "Re: Re:". This is working around something that may later be declared a misfeature in Camel. svn path=/trunk/; revision=3531 --- mail/ChangeLog | 6 ++++++ mail/mail-format.c | 13 +++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index e5a7cac760..1ffb588b60 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2000-06-12 Dan Winship + + * mail-format.c (mail_generate_reply): Fix the subject generation + so we don't get "Re: Re:". This is working around something that + may later be declared a misfeature in Camel. + 2000-06-10 Ettore Perazzoli * component-factory.c (create_folder): New stub implementation for diff --git a/mail/mail-format.c b/mail/mail-format.c index 729fa5f42a..5612b0a55b 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -1393,10 +1393,15 @@ mail_generate_reply (CamelMimeMessage *message, gboolean to_all) subject = (char *)camel_mime_message_get_subject (message); if (!subject) subject = g_strdup (""); - else if (!strncasecmp (subject, "Re: ", 4)) - subject = g_strdup (subject); - else - subject = g_strdup_printf ("Re: %s", subject); + else { + while (*subject == ' ') + subject++; + + if (!strncasecmp (subject, "Re: ", 4)) + subject = g_strdup (subject); + else + subject = g_strdup_printf ("Re: %s", subject); + } e_msg_composer_set_headers (composer, to, cc, NULL, subject); g_list_free (to); -- cgit v1.2.3