[evolution-patches] Fix x-evolution-mailer display
- From: Grahame Bowland <grahame angrygoats net>
- To: evolution-patches ximian com
- Subject: [evolution-patches] Fix x-evolution-mailer display
- Date: Fri, 12 Mar 2004 00:47:35 +0800
Hey guys
The x-evolution-mailer display got broken when someone fixed the bug
that made multi-valued headers all appear the same. Attached patch fixes
it.
Ok to commit? Patch also fixes a potential crash if the "Date" header
isn't parsable. It's ugly the way it fudges _camel_header_raw but I
couldn't seen a cleaner way to do it without changing everything
else :-)
Cheers
Grahame
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3159
diff -u -r1.3159 ChangeLog
--- ChangeLog 11 Mar 2004 08:52:02 -0000 1.3159
+++ ChangeLog 11 Mar 2004 16:45:26 -0000
@@ -1,3 +1,8 @@
+2004-03-12 Grahame Bowland <grahame angrygoats net>
+
+ * em-format-html.c (efh-format-headers): fix display of
+ x-evolution-mailer special header
+
2004-03-11 Not Zed <NotZed Ximian com>
* em-folder-browser.c (emfb_set_folder): a really gross hack,
Index: em-format-html.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-format-html.c,v
retrieving revision 1.36
diff -u -r1.36 em-format-html.c
--- em-format-html.c 11 Mar 2004 03:05:43 -0000 1.36
+++ em-format-html.c 11 Mar 2004 16:45:27 -0000
@@ -1517,6 +1517,8 @@
txt = value = g_strdup_printf ("%s %s", html, buf);
g_free (html);
flags |= EM_FORMAT_HTML_HEADER_HTML;
+ } else {
+ return;
}
if (!strcmp (name, "date"))
@@ -1564,10 +1566,17 @@
}
} else {
while (h->next) {
+ if (!strcasecmp(h->name, "x-evolution-mailer")) {
+ struct _camel_header_raw xem;
+ xem.name = "x-evolution-mailer";
+ efh_format_header(emf, stream, part, &xem, h->flags, charset);
+ continue;
+ }
header = ((CamelMimePart *)part)->headers;
while (header) {
- if (!g_ascii_strcasecmp(header->name, h->name))
+ if (!g_ascii_strcasecmp(header->name, h->name)) {
efh_format_header(emf, stream, part, header, h->flags, charset);
+ }
header = header->next;
}
h = h->next;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]