diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-07-19 04:46:35 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-07-19 04:46:35 +0800 |
commit | 6142029e7eabd1b78cc3cc477484f26477627c63 (patch) | |
tree | dd9932b23be72716f5cb8074d13cf3a2b7ccbd4d /mail/mail-tools.c | |
parent | 14308a5492efa78df23df51e53fbdbea76dba7cc (diff) | |
download | gsoc2013-evolution-6142029e7eabd1b78cc3cc477484f26477627c63.tar.gz gsoc2013-evolution-6142029e7eabd1b78cc3cc477484f26477627c63.tar.zst gsoc2013-evolution-6142029e7eabd1b78cc3cc477484f26477627c63.zip |
Do what was suggested in #4596.
2001-07-18 Jeffrey Stedfast <fejj@ximian.com>
* mail-tools.c (mail_tool_generate_forward_subject): Do what was
suggested in #4596.
svn path=/trunk/; revision=11210
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r-- | mail/mail-tools.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/mail/mail-tools.c b/mail/mail-tools.c index c72a5d2d02..cd31fa067f 100644 --- a/mail/mail-tools.c +++ b/mail/mail-tools.c @@ -193,30 +193,25 @@ char * mail_tool_generate_forward_subject (CamelMimeMessage *msg) { const char *subject; - char *fwd_subj, *fromstr; - const CamelInternetAddress *from; - - from = camel_mime_message_get_from(msg); + char *fwd_subj; + subject = camel_mime_message_get_subject(msg); - - if (from) { - fromstr = camel_address_format((CamelAddress *)from); - if (subject && *subject) { - fwd_subj = g_strdup_printf ("[%s] %s", fromstr, subject); - } else { - fwd_subj = g_strdup_printf (_("[%s] (forwarded message)"), - fromstr); - } - g_free(fromstr); + + if (subject && *subject) { + fwd_subj = g_strdup_printf ("[Fwd: %s]", subject); } else { - if (subject && *subject) { - if (strncmp (subject, "Fwd: ", 5) == 0) - subject += 4; - fwd_subj = g_strdup_printf ("Fwd: %s", subject); + const CamelInternetAddress *from; + char *fromstr; + + from = camel_mime_message_get_from (msg); + if (from) { + fromstr = camel_address_format (CAMEL_ADDRESS (from)); + fwd_subj = g_strdup_printf ("[Fwd: %s]", fromstr); + g_free (fromstr); } else - fwd_subj = g_strdup (_("Fwd: (no subject)")); + fwd_subj = g_strdup (_("[Fwd: No Subject]")); } - + return fwd_subj; } |