aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2008-09-15 16:21:02 +0800
committerSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2008-09-15 16:21:02 +0800
commit29b798bae34359dcad118be45729509dcd69747a (patch)
tree0bd4a8f352d1603cc5bb5b65248195235beb8ca4
parentd28925fa5d9e5060a5dd1e95a27feb808da9b71b (diff)
downloadgsoc2013-evolution-29b798bae34359dcad118be45729509dcd69747a.tar
gsoc2013-evolution-29b798bae34359dcad118be45729509dcd69747a.tar.gz
gsoc2013-evolution-29b798bae34359dcad118be45729509dcd69747a.tar.bz2
gsoc2013-evolution-29b798bae34359dcad118be45729509dcd69747a.tar.lz
gsoc2013-evolution-29b798bae34359dcad118be45729509dcd69747a.tar.xz
gsoc2013-evolution-29b798bae34359dcad118be45729509dcd69747a.tar.zst
gsoc2013-evolution-29b798bae34359dcad118be45729509dcd69747a.zip
** Fix for bug #539536
* em-format.c: (struct default_headers): * em-format-html.c: (efh_format_headers): * em-format-html.c: (default_headers): Add "Face" header to default headers and allow it to be hidden. svn path=/trunk/; revision=36331
-rw-r--r--mail/ChangeLog11
-rw-r--r--mail/em-format-html.c8
-rw-r--r--mail/em-format.c1
-rw-r--r--mail/em-mailer-prefs.c1
4 files changed, 18 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 8b1be83b28..a1616c6751 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,14 @@
+2008-06-22 Sankar P <psankar@novell.com>
+
+ * Committed on behalf of Paul Bolle <pebolle@tiscali.nl>
+
+ ** Fix for bug #539536
+
+ * em-format.c: (struct default_headers):
+ * em-format-html.c: (efh_format_headers):
+ * em-format-html.c: (default_headers):
+ Add "Face" header to default headers and allow it to be hidden.
+
2008-09-14 Milan Crha <mcrha@redhat.com>
** Fix for bug #504767
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 99c670e5ae..fa185bf9df 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -1931,10 +1931,11 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
} else {
int mailer_shown = FALSE;
while (h->next) {
- int mailer;
+ int mailer, face;
header = ((CamelMimePart *)part)->headers;
mailer = !g_ascii_strcasecmp (h->name, "X-Evolution-Mailer");
+ face = !g_ascii_strcasecmp (h->name, "Face");
while (header) {
if (emf->show_photo && !photo_name && !g_ascii_strcasecmp (header->name, "From"))
@@ -1967,7 +1968,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
efh_format_header (emf, stream, part, &xmailer, h->flags, charset);
if (strstr(use_header->value, "Evolution"))
have_icon = TRUE;
- } else if (!g_ascii_strcasecmp (header->name, "Face") && !face_decoded) {
+ } else if (!face_decoded && face && !g_ascii_strcasecmp (header->name, "Face")) {
char *cp = header->value;
/* Skip over spaces */
@@ -1978,7 +1979,8 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
face_header_value = g_realloc (face_header_value, face_header_len + 1);
face_header_value[face_header_len] = 0;
face_decoded = TRUE;
- } else if (!g_ascii_strcasecmp (header->name, h->name)) {
+ /* Showing an encoded "Face" header makes little sense */
+ } else if (!g_ascii_strcasecmp (header->name, h->name) && !face) {
efh_format_header(emf, stream, part, header, h->flags, charset);
}
diff --git a/mail/em-format.c b/mail/em-format.c
index 483b86cf34..fc6ff85b7c 100644
--- a/mail/em-format.c
+++ b/mail/em-format.c
@@ -889,6 +889,7 @@ static const struct {
{ N_("Subject"), EM_FORMAT_HEADER_BOLD },
{ N_("Date"), EM_FORMAT_HEADER_BOLD },
{ N_("Newsgroups"), EM_FORMAT_HEADER_BOLD },
+ { N_("Face"), 0 },
};
/**
diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c
index d390f8061d..ef9aa94aa5 100644
--- a/mail/em-mailer-prefs.c
+++ b/mail/em-mailer-prefs.c
@@ -80,6 +80,7 @@ static const char *default_headers[] = {
N_("Subject"),
N_("Date"),
N_("Newsgroups"),
+ N_("Face"),
"x-evolution-mailer", /* DO NOT translate */
};