aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--embed/ephy-embed-prefs.h2
-rw-r--r--embed/mozilla/mozilla-notifiers.cpp45
3 files changed, 53 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c15faa2a6..14fd25164 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2003-08-11 Marco Pesenti Gritti <marco@it.gnome.org>
+ * embed/ephy-embed-prefs.h:
+ * embed/mozilla/mozilla-notifiers.cpp:
+
+ Respect system pref about no proxy for.
+
+2003-08-11 Marco Pesenti Gritti <marco@it.gnome.org>
+
* lib/widgets/ephy-node-view.c: (ephy_node_view_finalize),
(ephy_node_view_enable_drag_dest), (selection_foreach),
(get_selection_refs), (ref_list_free), (stop_drag_check),
diff --git a/embed/ephy-embed-prefs.h b/embed/ephy-embed-prefs.h
index 707829d00..50e63bdb7 100644
--- a/embed/ephy-embed-prefs.h
+++ b/embed/ephy-embed-prefs.h
@@ -25,4 +25,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"
diff --git a/embed/mozilla/mozilla-notifiers.cpp b/embed/mozilla/mozilla-notifiers.cpp
index e267d3423..6c46fe55e 100644
--- a/embed/mozilla/mozilla-notifiers.cpp
+++ b/embed/mozilla/mozilla-notifiers.cpp
@@ -39,6 +39,8 @@
#include "nsIPrefService.h"
#include "nsIServiceManager.h"
+#define MOZILLA_PREF_NO_PROXIES "network.proxy.no_proxies_on"
+
static void
mozilla_cache_size_notifier (GConfClient *client,
guint cnxn_id,
@@ -102,6 +104,11 @@ mozilla_cookies_accept_notifier (GConfClient *client,
guint cnxn_id,
GConfEntry *entry,
char *pref);
+static void
+mozilla_proxy_ignore_notifier (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ EphyEmbedSingle *single);
/* Keeps the list of the notifiers we installed for mozilla prefs */
/* to be able to remove them when exiting */
@@ -162,6 +169,8 @@ custom_notifiers [] =
(GConfClientNotifyFunc) mozilla_cache_size_notifier },
{ CONF_SECURITY_COOKIES_ACCEPT,
(GConfClientNotifyFunc) mozilla_cookies_accept_notifier },
+ { CONF_NETWORK_PROXY_IGNORE_HOSTS,
+ (GConfClientNotifyFunc) mozilla_proxy_ignore_notifier },
{ NULL, NULL }
};
@@ -661,3 +670,39 @@ mozilla_language_notifier(GConfClient *client,
g_slist_foreach (languages, (GFunc) g_free, NULL);
g_slist_free (languages);
}
+
+static void
+mozilla_proxy_ignore_notifier (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ EphyEmbedSingle *single)
+{
+ GSList *hosts, *l;
+ char **strings, *mozilla_ignore_list;
+ int i = 0;
+
+ hosts = eel_gconf_get_string_list (entry->key);
+
+ strings = g_new (gchar*, g_slist_length (hosts) + 1);
+ for (l = hosts; l != NULL; l = l->next)
+ {
+ char *item = (char *) l->data;
+
+ if (item && item[0] != '\0')
+ {
+ strings[i] = item;
+ i++;
+ }
+ }
+ strings[i] = NULL;
+
+ mozilla_ignore_list = g_strjoinv (", ", strings);
+ mozilla_prefs_set_string (MOZILLA_PREF_NO_PROXIES,
+ mozilla_ignore_list);
+
+ g_free (mozilla_ignore_list);
+ g_free (strings);
+ g_slist_foreach (hosts, (GFunc) g_free, NULL);
+ g_slist_free (hosts);
+}
+