[evolution] Bug #431497 - Offline mode should disable loading of images from the internet
- From: Dan VrÃtil <dvratil src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #431497 - Offline mode should disable loading of images from the internet
- Date: Mon, 18 Jun 2012 13:44:50 +0000 (UTC)
commit 3dfda2606ca61cdc79819f01bdcdb388038c97fd
Author: Dan VrÃtil <dvratil redhat com>
Date: Mon Jun 18 15:43:58 2012 +0200
Bug #431497 - Offline mode should disable loading of images from the internet
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 3bc4878..734496b 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]