diff options
author | Dan Vrátil <dvratil@redhat.com> | 2012-06-18 21:43:58 +0800 |
---|---|---|
committer | Dan Vrátil <dvratil@redhat.com> | 2012-06-18 21:44:32 +0800 |
commit | 3dfda2606ca61cdc79819f01bdcdb388038c97fd (patch) | |
tree | d7ed2c12537f9bc58862c19f936cb09964b63898 /mail/e-http-request.c | |
parent | 6c05b09be16ac8eceb17653c3c26c0c6f963ef10 (diff) | |
download | gsoc2013-evolution-3dfda2606ca61cdc79819f01bdcdb388038c97fd.tar.gz gsoc2013-evolution-3dfda2606ca61cdc79819f01bdcdb388038c97fd.tar.zst gsoc2013-evolution-3dfda2606ca61cdc79819f01bdcdb388038c97fd.zip |
Bug #431497 - Offline mode should disable loading of images from the internet
Diffstat (limited to 'mail/e-http-request.c')
-rw-r--r-- | mail/e-http-request.c | 8 |
1 files changed, 8 insertions, 0 deletions
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); |