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 | |
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
-rw-r--r-- | mail/ChangeLog | 2 | ||||
-rw-r--r-- | mail/mail-format.c | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 161c15ca21..021d80affd 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,7 @@ 2000-06-28 Dan Winship <danw@helixcode.com> + * mail-format.c (mail_generate_forward): add default subjects + * component-factory.c (create_folder): Refuse to create folders not of type "mail", and correctly create an empty "mbox" folder for new folders in /local. 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; } |