? epiphany.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/epiphany/ChangeLog,v
retrieving revision 1.435
diff -u -r1.435 ChangeLog
--- ChangeLog	18 May 2003 09:06:46 -0000	1.435
+++ ChangeLog	18 May 2003 12:50:45 -0000
@@ -1,3 +1,11 @@
+2003-05-18  Malcolm Tredinnick <malcolm@commsecure.com.au>
+	
+	* embed/ephy-embed-prefs.h
+	* embed/mozilla/mozilla-notifiers.cpp:
+
+	Process the /system/http_proxy/ignore_hosts gconf key and pass
+	the hosts which do not use the proxy to gtkmozembed.
+
 2003-05-18  Xan Lopez  <xan@masilla.org>
 
 	* NEWS: Updates, typos.
Index: embed/ephy-embed-prefs.h
===================================================================
RCS file: /cvs/gnome/epiphany/embed/ephy-embed-prefs.h,v
retrieving revision 1.2
diff -u -r1.2 ephy-embed-prefs.h
--- embed/ephy-embed-prefs.h	10 May 2003 10:57:10 -0000	1.2
+++ embed/ephy-embed-prefs.h	18 May 2003 12:50:46 -0000
@@ -37,4 +37,4 @@
 #define CONF_NETWORK_FTP_PROXY_PORT "/system/proxy/ftp_port"
 #define CONF_NETWORK_SOCKS_PROXY_PORT "/system/proxy/socks_port"
 #define CONF_NETWORK_PROXY_AUTO_URL "/system/proxy/autoconfig_url"
-
+#define CONF_NETWORK_PROXY_IGNORE_HOSTS "/system/http_proxy/ignore_hosts"
Index: embed/mozilla/mozilla-notifiers.cpp
===================================================================
RCS file: /cvs/gnome/epiphany/embed/mozilla/mozilla-notifiers.cpp,v
retrieving revision 1.8
diff -u -r1.8 mozilla-notifiers.cpp
--- embed/mozilla/mozilla-notifiers.cpp	17 May 2003 12:43:25 -0000	1.8
+++ embed/mozilla/mozilla-notifiers.cpp	18 May 2003 12:50:58 -0000
@@ -93,6 +93,13 @@
 			     guint cnxn_id,
 			     GConfEntry *entry,
 			     EphyEmbedSingle *single);
+
+static void
+mozilla_proxy_ignore_notifier (GConfClient *client,
+		               guint cnxn_id,
+		               GConfEntry *entry,
+			       EphyEmbedSingle *single);
+
 static void
 mozilla_proxy_autoconfig_notifier (GConfClient *client,
 			           guint cnxn_id,
@@ -190,6 +197,8 @@
 	  (GConfClientNotifyFunc) mozilla_proxy_mode_notifier },
 	{ CONF_NETWORK_PROXY_AUTO_URL,
 	  (GConfClientNotifyFunc) mozilla_proxy_autoconfig_notifier },
+	{ CONF_NETWORK_PROXY_IGNORE_HOSTS,
+	  (GConfClientNotifyFunc) mozilla_proxy_ignore_notifier },
 	{NULL, NULL}
 };
 
@@ -227,6 +236,38 @@
 	}
 
 	mozilla_prefs_set_int ("network.proxy.type", mozilla_mode);
+}
+
+static void
+mozilla_proxy_ignore_notifier (GConfClient *client,
+		               guint cnxn_id,
+		               GConfEntry *entry,
+		               EphyEmbedSingle *single)
+{
+	GSList *hosts, *pos;
+	gchar **strings, *mozilla_ignore_list;
+	int i;
+
+	hosts = gconf_value_get_list (entry->value);
+	if (!hosts)
+	{
+		return;
+	}
+
+	strings = g_new (gchar*, g_slist_length (hosts) + 1);
+	for (pos = hosts, i = 0; pos; pos = g_slist_next (pos), ++i)
+	{
+		strings[i] = (gchar*) gconf_value_get_string (
+				(GConfValue*) (pos->data));
+	}
+	strings[i] = NULL;
+
+	mozilla_ignore_list = g_strjoinv (", ", strings);
+	mozilla_prefs_set_string ("network.proxy.no_proxies_on",
+			mozilla_ignore_list);
+
+	g_free (mozilla_ignore_list);
+	g_free (strings);
 }
 
 static void
