From 0a41bb42395f4874b4768b1e2eb7e3fcfdef9363 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 30 Jul 2002 19:37:12 +0000 Subject: Use camel_medium_get_header to get the date header rather than getting the 2002-07-30 Jeffrey Stedfast * 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. svn path=/trunk/; revision=17643 --- mail/ChangeLog | 6 ++++++ mail/mail-format.c | 17 ++++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) (limited to 'mail') 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 + + * 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 * 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 @@ -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 ", datestr); - - g_free (datestr); + if (datestr) { + write_field_row_begin (_("Date"), flags, html, stream); + gtk_html_stream_printf (stream, "%s ", datestr); + } } static void -- cgit v1.2.3