aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/em-format-html.c8
2 files changed, 13 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 2cad686331..d4c9202544 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2007-10-01 Sankar P <psankar@novell.com>
+
+ * em-format-html.c: (efh_format_headers):
+ Display Face header value if contacts doesn't
+ have any image associated with them.
+ Fixes bug mentioned in #481235 and not the
+ enhnacement request.
+
2007-09-27 Matthew Barnes <mbarnes@redhat.com>
* em-account-editor.c:
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index eb2ae95c3d..b1961bd2b2 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -1785,7 +1785,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
gboolean have_icon = FALSE;
const char *photo_name = NULL;
CamelInternetAddress *cia = NULL;
- gboolean face_decoded = FALSE;
+ gboolean face_decoded = FALSE, contact_has_photo = FALSE;
guchar *face_header_value = NULL;
gsize face_header_len = 0;
char *header_sender = NULL, *header_from = NULL, *name;
@@ -1927,6 +1927,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
photopart = em_utils_contact_photo (cia, emf->photo_local);
if (photopart) {
+ contact_has_photo = TRUE;
classid = g_strdup_printf("icon:///em-format-html/%s/photo/header",
emf->part_id->str);
camel_stream_printf(stream,
@@ -1939,7 +1940,9 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
g_free(classid);
}
camel_object_unref(cia);
- } else if (face_decoded) {
+ }
+
+ if (!contact_has_photo && face_decoded) {
char *classid;
CamelMimePart *part;
@@ -1949,7 +1952,6 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
camel_stream_printf(stream, "<td align=\"right\" valign=\"top\"><img width=64 src=\"%s\"></td>", classid);
em_format_add_puri(emf, sizeof(EMFormatPURI), classid, part, efh_write_image);
camel_object_unref(part);
-
}
if (have_icon && efh->show_icon) {