From 3dfda2606ca61cdc79819f01bdcdb388038c97fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Vr=C3=A1til?= Date: Mon, 18 Jun 2012 15:43:58 +0200 Subject: Bug #431497 - Offline mode should disable loading of images from the internet --- mail/e-http-request.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mail/e-http-request.c b/mail/e-http-request.c index 3bc4878a45..734496b8fa 100644 --- a/mail/e-http-request.c +++ b/mail/e-http-request.c @@ -217,6 +217,7 @@ handle_http_request (GSimpleAsyncResult *res, EMailImageLoadingPolicy image_policy; gchar *uri_md5; EMailFormatter *formatter; + EShell *shell; const gchar *user_cache_dir; CamelDataCache *cache; @@ -316,6 +317,13 @@ handle_http_request (GSimpleAsyncResult *res, } } + /* If the item is not in the cache and Evolution is in offline mode then + * quit regardless any image loading policy */ + shell = e_shell_get_default (); + if (!e_shell_get_online (shell)) { + goto cleanup; + } + /* 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); -- cgit v1.2.3