aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-format.c17
2 files changed, 12 insertions, 11 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index cd00ca61b9..79229adcfc 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2002-07-30 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-format.c (write_date): Use camel_medium_get_header to get
+ the date header rather than getting the time_t and converting it
+ into a string.
+
2002-07-29 Not Zed <NotZed@Ximian.com>
* mail-display.c (mail_display_init): setup private data.
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 693721bb3c..946e4f0cc5 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -1,5 +1,4 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
/*
* Authors:
* Dan Winship <danw@ximian.com>
@@ -753,18 +752,14 @@ write_field_row_begin (const char *name, gint flags, GtkHTML *html, GtkHTMLStrea
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);
+ const char *datestr;
- date = camel_mime_message_get_date (message, &offset);
- datestr = header_format_date (date, offset);
+ datestr = camel_medium_get_header (CAMEL_MEDIUM (message), "Date");
- gtk_html_stream_printf (stream, "%s</td> </tr>", datestr);
-
- g_free (datestr);
+ if (datestr) {
+ write_field_row_begin (_("Date"), flags, html, stream);
+ gtk_html_stream_printf (stream, "%s</td> </tr>", datestr);
+ }
}
static void