diff options
author | Dan Winship <danw@src.gnome.org> | 2000-06-29 11:18:39 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-06-29 11:18:39 +0800 |
commit | 70646faa9f9f5418d31e3e293768bc8366873000 (patch) | |
tree | a6d2a278f3273a162c0fb93da89e4a369a068a06 /mail/mail-format.c | |
parent | f8a8fc9e730a03fb07e8cd6d2fa9b6b9aa54631a (diff) | |
download | gsoc2013-evolution-70646faa9f9f5418d31e3e293768bc8366873000.tar gsoc2013-evolution-70646faa9f9f5418d31e3e293768bc8366873000.tar.gz gsoc2013-evolution-70646faa9f9f5418d31e3e293768bc8366873000.tar.bz2 gsoc2013-evolution-70646faa9f9f5418d31e3e293768bc8366873000.tar.lz gsoc2013-evolution-70646faa9f9f5418d31e3e293768bc8366873000.tar.xz gsoc2013-evolution-70646faa9f9f5418d31e3e293768bc8366873000.tar.zst gsoc2013-evolution-70646faa9f9f5418d31e3e293768bc8366873000.zip |
add default subjects
* mail-format.c (mail_generate_forward): add default subjects
svn path=/trunk/; revision=3784
Diffstat (limited to 'mail/mail-format.c')
-rw-r--r-- | mail/mail-format.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mail/mail-format.c b/mail/mail-format.c index 6f55ce3b38..e2fef22180 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -1444,6 +1444,8 @@ mail_generate_forward (CamelMimeMessage *mime_message, { EMsgComposer *composer; CamelMimePart *part; + const char *from, *subject; + char *fwd_subj; if (!forward_as_attachment) g_warning ("Forward as non-attachment not implemented."); @@ -1462,7 +1464,20 @@ mail_generate_forward (CamelMimeMessage *mime_message, e_msg_composer_attach (composer, part); gtk_object_unref (GTK_OBJECT (part)); - /* FIXME: should we default a subject? */ + from = camel_mime_message_get_from (mime_message); + subject = camel_mime_message_get_subject (mime_message); + if (from) { + if (subject && *subject) { + while (*subject == ' ') + subject++; + fwd_subj = g_strdup_printf ("[%s] %s", from, subject); + } else { + fwd_subj = g_strdup_printf ("[%s] (forwarded message)", + from); + } + } + e_msg_composer_set_headers (composer, NULL, NULL, NULL, fwd_subj); + g_free (fwd_subj); return composer; } |