[evolution] Bug 620635 - do not setup proxy if it's not enabled
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 620635 - do not setup proxy if it's not enabled
- Date: Sat, 5 Jun 2010 17:01:23 +0000 (UTC)
commit 517023edcb2468e76786511b0ada27025e18caa6
Author: Lucian Langa <lucilanga gnome org>
Date: Sat Jun 5 19:49:24 2010 +0300
Bug 620635 - do not setup proxy if it's not enabled
mail/mail-session.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/mail/mail-session.c b/mail/mail-session.c
index d2ab1d8..c4e1af7 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -809,6 +809,7 @@ mail_session_check_junk_notify (GConfClient *gconf, guint id, GConfEntry *entry,
}
#define DIR_PROXY "/system/proxy"
+#define MODE_PROXY "/system/proxy/mode"
#define KEY_SOCKS_HOST "/system/proxy/socks_host"
#define KEY_SOCKS_PORT "/system/proxy/socks_port"
@@ -816,16 +817,19 @@ static void
set_socks_proxy_from_gconf (void)
{
GConfClient *client;
- gchar *host;
+ gchar *mode, *host;
gint port;
client = mail_config_get_gconf_client ();
- host = gconf_client_get_string (client, KEY_SOCKS_HOST, NULL); /* NULL-GError */
- port = gconf_client_get_int (client, KEY_SOCKS_PORT, NULL); /* NULL-GError */
- camel_session_set_socks_proxy (session, host, port);
-
- g_free (host);
+ mode = gconf_client_get_string (client, MODE_PROXY, NULL);
+ if (!strcmp(mode, "manual")) {
+ host = gconf_client_get_string (client, KEY_SOCKS_HOST, NULL); /* NULL-GError */
+ port = gconf_client_get_int (client, KEY_SOCKS_PORT, NULL); /* NULL-GError */
+ camel_session_set_socks_proxy (session, host, port);
+ g_free (host);
+ }
+ g_free (mode);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]