aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format-html.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-04-13 22:30:40 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-06-03 11:00:40 +0800
commit3449e5fcc7f9c797fcde7f2a444b1eb7a934cd81 (patch)
treeff59febf4ac0c6316ef344ea25cee002088bd314 /mail/em-format-html.c
parentf78795f4dff8b225d78385c5e23e1cd44ee946ad (diff)
downloadgsoc2013-evolution-3449e5fcc7f9c797fcde7f2a444b1eb7a934cd81.tar
gsoc2013-evolution-3449e5fcc7f9c797fcde7f2a444b1eb7a934cd81.tar.gz
gsoc2013-evolution-3449e5fcc7f9c797fcde7f2a444b1eb7a934cd81.tar.bz2
gsoc2013-evolution-3449e5fcc7f9c797fcde7f2a444b1eb7a934cd81.tar.lz
gsoc2013-evolution-3449e5fcc7f9c797fcde7f2a444b1eb7a934cd81.tar.xz
gsoc2013-evolution-3449e5fcc7f9c797fcde7f2a444b1eb7a934cd81.tar.zst
gsoc2013-evolution-3449e5fcc7f9c797fcde7f2a444b1eb7a934cd81.zip
Adapt mail to the new ESource API.
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\">");