diff options
-rw-r--r-- | mail/e-http-request.c | 11 | ||||
-rw-r--r-- | mail/e-mail-request.c | 1 |
2 files changed, 5 insertions, 7 deletions
diff --git a/mail/e-http-request.c b/mail/e-http-request.c index d6fe5d2254..ffefdaefd1 100644 --- a/mail/e-http-request.c +++ b/mail/e-http-request.c @@ -31,7 +31,6 @@ #include <string.h> -#include <em-format/e-mail-formatter.h> #include <shell/e-shell.h> #define d(x) @@ -97,13 +96,11 @@ handle_http_request (GSimpleAsyncResult *res, gboolean force_load_images = FALSE; EMailImageLoadingPolicy image_policy; gchar *uri_md5; - EMailFormatter *formatter; EShell *shell; - + EShellSettings *shell_settings; const gchar *user_cache_dir; CamelDataCache *cache; CamelStream *cache_stream; - GHashTable *query; gint uri_len; @@ -111,8 +108,6 @@ handle_http_request (GSimpleAsyncResult *res, return; } - formatter = e_mail_formatter_new (); - /* Remove the __evo-mail query */ soup_uri = soup_request_get_uri (SOUP_REQUEST (request)); query = soup_form_decode (soup_uri->query); @@ -217,9 +212,11 @@ handle_http_request (GSimpleAsyncResult *res, goto cleanup; } + shell_settings = e_shell_get_shell_settings (shell); + image_policy = e_shell_settings_get_int (shell_settings, "mail-image-loading-policy"); + /* Item not found in cache, but image loading policy allows us to fetch * it from the interwebs */ - image_policy = e_mail_formatter_get_image_loading_policy (formatter); if (!force_load_images && mail_uri && (image_policy == E_MAIL_IMAGE_LOADING_POLICY_SOMETIMES)) { CamelObjectBag *registry; diff --git a/mail/e-mail-request.c b/mail/e-mail-request.c index 37320bc4a3..b0cbedee93 100644 --- a/mail/e-mail-request.c +++ b/mail/e-mail-request.c @@ -163,6 +163,7 @@ handle_mail_request (GSimpleAsyncResult *res, g_free (part_id); g_object_unref (part_list); + g_object_unref (formatter); stream = g_memory_input_stream_new_from_data ( (gchar *) ba->data, ba->len, NULL); |