aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-07-21 03:10:46 +0800
committerBharath Acharya <abharath@src.gnome.org>2008-07-21 03:10:46 +0800
commit55997e2451a279a7577b6a769810a0e0942ad1df (patch)
tree34b877b66d8cd3bf9c168b643b4ca70c6f5ad082
parent5948c36901a66021c7d3ded3acaf9bde18be17d2 (diff)
downloadgsoc2013-evolution-55997e2451a279a7577b6a769810a0e0942ad1df.tar
gsoc2013-evolution-55997e2451a279a7577b6a769810a0e0942ad1df.tar.gz
gsoc2013-evolution-55997e2451a279a7577b6a769810a0e0942ad1df.tar.bz2
gsoc2013-evolution-55997e2451a279a7577b6a769810a0e0942ad1df.tar.lz
gsoc2013-evolution-55997e2451a279a7577b6a769810a0e0942ad1df.tar.xz
gsoc2013-evolution-55997e2451a279a7577b6a769810a0e0942ad1df.tar.zst
gsoc2013-evolution-55997e2451a279a7577b6a769810a0e0942ad1df.zip
Committing on behalf of Milan Crha <mcrha@redhat.com>
2008-07-09 Milan Crha <mcrha@redhat.com> ** Fix for bug #269152 * em-format-quote.c: (emfq_format_header): * em-format-html.c: (efh_format_headers): Use X-MimeOLE as Mailer header when there's nothing better available. svn path=/trunk/; revision=35781
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/em-format-html.c23
-rw-r--r--mail/em-format-quote.c4
3 files changed, 30 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index cf9dbffc54..c874975c03 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -26,6 +26,14 @@
2008-07-09 Milan Crha <mcrha@redhat.com>
+ ** Fix for bug #269152
+
+ * em-format-quote.c: (emfq_format_header):
+ * em-format-html.c: (efh_format_headers):
+ Use X-MimeOLE as Mailer header when there's nothing better available.
+
+2008-07-09 Milan Crha <mcrha@redhat.com>
+
** Fix for bug #207802 (Patch suggested by Veerapuram Varadhan.)
* message-list.c: (struct search_child_struct), (search_child_cb),
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 5c76c5e861..1d094773dc 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -1942,15 +1942,30 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
if (!mailer_shown && mailer && (!g_ascii_strcasecmp (header->name, "X-Mailer") ||
!g_ascii_strcasecmp (header->name, "User-Agent") ||
- !g_ascii_strcasecmp (header->name, "X-Newsreader"))) {
- struct _camel_header_raw xmailer;
+ !g_ascii_strcasecmp (header->name, "X-Newsreader") ||
+ !g_ascii_strcasecmp (header->name, "X-MimeOLE"))) {
+ struct _camel_header_raw xmailer, *use_header = NULL;
+
+ if (!g_ascii_strcasecmp (header->name, "X-MimeOLE")) {
+ for (use_header = header->next; use_header; use_header = use_header->next) {
+ if (!g_ascii_strcasecmp (use_header->name, "X-Mailer") ||
+ !g_ascii_strcasecmp (use_header->name, "User-Agent") ||
+ !g_ascii_strcasecmp (use_header->name, "X-Newsreader")) {
+ /* even we have X-MimeOLE, then use rather the standard one, when available */
+ break;
+ }
+ }
+ }
+
+ if (!use_header)
+ use_header = header;
xmailer.name = "X-Evolution-Mailer";
- xmailer.value = header->value;
+ xmailer.value = use_header->value;
mailer_shown = TRUE;
efh_format_header (emf, stream, part, &xmailer, h->flags, charset);
- if (strstr(header->value, "Evolution"))
+ if (strstr(use_header->value, "Evolution"))
have_icon = TRUE;
} else if (!g_ascii_strcasecmp (header->name, "Face") && !face_decoded) {
char *cp = header->value;
diff --git a/mail/em-format-quote.c b/mail/em-format-quote.c
index f7427eb284..804eead5fd 100644
--- a/mail/em-format-quote.c
+++ b/mail/em-format-quote.c
@@ -343,7 +343,9 @@ emfq_format_header (EMFormat *emf, CamelStream *stream, CamelMedium *part, const
} else if (!strcmp (name, "X-Evolution-Mailer")) { /* pseudo-header */
if (!(txt = camel_medium_get_header (part, "x-mailer")))
if (!(txt = camel_medium_get_header (part, "user-agent")))
- return;
+ if (!(txt = camel_medium_get_header (part, "x-newsreader")))
+ if (!(txt = camel_medium_get_header (part, "x-mimeole")))
+ return;
txt = value = camel_header_format_ctext (txt, charset);