[gnome-terminal] Set $all_proxy from socks proxy settings
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-terminal] Set $all_proxy from socks proxy settings
- Date: Fri, 11 Dec 2009 14:46:48 +0000 (UTC)
commit 3a4de6e4a71711b33e69f83dab5a8606d292e5cd
Author: Behdad Esfahbod <behdad behdad org>
Date: Fri Dec 11 09:38:46 2009 -0500
Set $all_proxy from socks proxy settings
Last part of Bug 596688 - Expose more proxy settings (edit)
src/terminal-screen.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index 008deed..a2659e6 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -1458,6 +1458,23 @@ setup_ftp_proxy_env (GHashTable *env_table, GConfClient *conf)
}
static void
+setup_socks_proxy_env (GHashTable *env_table, GConfClient *conf)
+{
+ gchar *host;
+ gint port;
+
+ host = conf_get_string (conf, PROXY_DIR "/socks_host");
+ port = conf_get_int (conf, PROXY_DIR "/socks_port");
+ if (host && port)
+ {
+ char *proxy;
+ proxy = g_strdup_printf ("socks://%s:%d/", host, port);
+ set_proxy_env (env_table, "all_proxy", proxy);
+ }
+ g_free (host);
+}
+
+static void
setup_proxy_env (GHashTable *env_table)
{
char *proxymode;
@@ -1473,6 +1490,7 @@ setup_proxy_env (GHashTable *env_table)
setup_http_proxy_env (env_table, conf);
setup_https_proxy_env (env_table, conf);
setup_ftp_proxy_env (env_table, conf);
+ setup_socks_proxy_env (env_table, conf);
}
g_free (proxymode);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]