aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format-html.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-format-html.c')
-rw-r--r--mail/em-format-html.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 0c55ecec5f..f60346dc24 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -1546,17 +1546,22 @@ efh_write_attachment (EMFormat *emf,
static void
efh_preparse (EMFormat *emf)
{
- CamelInternetAddress *addr;
-
EMFormatHTML *efh = EM_FORMAT_HTML (emf);
+ CamelInternetAddress *addr;
+ CamelSession *session;
+ ESourceRegistry *registry;
if (!emf->message) {
efh->priv->can_load_images = FALSE;
return;
}
+ session = em_format_get_session (emf);
+ registry = e_mail_session_get_registry (E_MAIL_SESSION (session));
+
addr = camel_mime_message_get_from (emf->message);
- efh->priv->can_load_images = em_utils_in_addressbook (addr, FALSE);
+ efh->priv->can_load_images = em_utils_in_addressbook (
+ registry, addr, FALSE);
}
static void
@@ -2678,6 +2683,8 @@ efh_format_full_headers (EMFormatHTML *efh,
gboolean have_icon = FALSE;
const gchar *photo_name = NULL;
CamelInternetAddress *cia = NULL;
+ CamelSession *session;
+ ESourceRegistry *registry;
gboolean face_decoded = FALSE, contact_has_photo = FALSE;
guchar *face_header_value = NULL;
gsize face_header_len = 0;
@@ -2689,6 +2696,9 @@ efh_format_full_headers (EMFormatHTML *efh,
if (cancellable && g_cancellable_is_cancelled (cancellable))
return;
+ session = em_format_get_session (emf);
+ registry = e_mail_session_get_registry (E_MAIL_SESSION (session));
+
ct = camel_mime_part_get_content_type ((CamelMimePart *) part);
charset = camel_content_type_param (ct, "charset");
charset = camel_iconv_charset_name (charset);
@@ -2871,7 +2881,8 @@ efh_format_full_headers (EMFormatHTML *efh,
camel_address_decode ((CamelAddress *) cia, (const gchar *) photo_name);
only_local_photo =
em_format_html_get_only_local_photos (efh);
- photopart = em_utils_contact_photo (cia, only_local_photo);
+ photopart = em_utils_contact_photo (
+ registry, cia, only_local_photo);
if (photopart) {
g_string_append (buffer, "<td align=\"right\" valign=\"top\">");