diff options
author | Sankar P <psankar@novell.com> | 2007-10-01 12:53:06 +0800 |
---|---|---|
committer | Sankarasivasubramanian Pasupathilingam <psankar@src.gnome.org> | 2007-10-01 12:53:06 +0800 |
commit | 528f6d679cd444a8f71b031d3de5a7ad31ed3b5b (patch) | |
tree | 6c1cf8570728386f6434710a67f779c26bea9395 /mail/em-format-html.c | |
parent | bab3532411521faf4d64eb566ebed2eff327a0f6 (diff) | |
download | gsoc2013-evolution-528f6d679cd444a8f71b031d3de5a7ad31ed3b5b.tar.gz gsoc2013-evolution-528f6d679cd444a8f71b031d3de5a7ad31ed3b5b.tar.zst gsoc2013-evolution-528f6d679cd444a8f71b031d3de5a7ad31ed3b5b.zip |
Display Face header value if contacts doesn't have any image associated
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.
svn path=/trunk/; revision=34333
Diffstat (limited to 'mail/em-format-html.c')
-rw-r--r-- | mail/em-format-html.c | 8 |
1 files changed, 5 insertions, 3 deletions
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) { |