aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-03-20 05:42:49 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-03-20 05:42:49 +0800
commitdb0bdf0538baabf0d2049e846252cf90b6cf7b02 (patch)
tree0865de4689534d1d2024c427e9331de28b791c57 /mail
parentb8bb7dd7ed3344a93fd72ace13197ca11da18fa8 (diff)
downloadgsoc2013-evolution-db0bdf0538baabf0d2049e846252cf90b6cf7b02.tar.gz
gsoc2013-evolution-db0bdf0538baabf0d2049e846252cf90b6cf7b02.tar.zst
gsoc2013-evolution-db0bdf0538baabf0d2049e846252cf90b6cf7b02.zip
Write the date header.
2001-03-19 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (write_headers): Write the date header. svn path=/trunk/; revision=8829
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog2
-rw-r--r--mail/mail-format.c23
2 files changed, 23 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 4eb3c0d1ac..e20a163713 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,7 @@
2001-03-19 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-format.c (write_headers): Write the date header.
+
* component-factory.c (owner_unset_cb): Call
unref_standard_folders() here instead.
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 7c8fed1ff7..4d5dfd82d3 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -589,6 +589,23 @@ write_field_row_begin (const char *description, gint flags, GtkHTML *html, GtkHT
}
static void
+write_date (CamelMimeMessage *message, int flags, GtkHTML *html, GtkHTMLStream *stream)
+{
+ char *datestr;
+ time_t date;
+ int offset;
+
+ write_field_row_begin (_("Date:"), flags, html, stream);
+
+ date = camel_mime_message_get_date (message, &offset);
+ datestr = header_format_date (date, offset);
+
+ mail_html_write (html, stream, "<td> %s </td> </tr>", datestr);
+
+ g_free (datestr);
+}
+
+static void
write_subject (const char *subject, int flags, GtkHTML *html, GtkHTMLStream *stream)
{
char *encoded_subj;
@@ -674,7 +691,7 @@ write_headers (CamelMimeMessage *message, MailDisplay *md)
"cellspacing=0 cellpadding=1><tr><td>"
"<table bgcolor=\"#EEEEEE\" width=\"100%%\" cellpadding=0 cellspacing=0>"
"<tr><td><table>\n");
-
+
write_address(md, camel_mime_message_get_from(message),
_("From:"), WRITE_BOLD);
write_address(md, camel_mime_message_get_reply_to(message),
@@ -683,9 +700,11 @@ write_headers (CamelMimeMessage *message, MailDisplay *md)
_("To:"), WRITE_BOLD);
write_address(md, camel_mime_message_get_recipients(message, CAMEL_RECIPIENT_TYPE_CC),
_("Cc:"), WRITE_BOLD);
-
+
write_subject (camel_mime_message_get_subject (message), WRITE_BOLD, md->html, md->stream);
+ write_date (message,WRITE_BOLD, md->html, md->stream);
+
mail_html_write (md->html, md->stream,
"</table></td></tr></table></td></tr></table></font>");
}