proxy/gnome: only use this when running under GNOME
authorDan Winship <danw@gnome.org>
Sun, 9 Dec 2012 17:55:33 +0000 (18:55 +0100)
committerDan Winship <danw@gnome.org>
Sun, 9 Dec 2012 17:55:33 +0000 (18:55 +0100)
The original idea had been that people could just not build/install
this module if they didn't want the GNOME proxy settings, but that
hasn't really worked. So change it to only use this module when in a
GNOME session (falling back to the libproxy module otherwise).

proxy/gnome/gproxyresolvergnome.c

index 31cdd0d..ae046d4 100644 (file)
@@ -390,9 +390,7 @@ update_settings (GProxyResolverGnome *resolver)
 static gboolean
 g_proxy_resolver_gnome_is_supported (GProxyResolver *object)
 {
-  GProxyResolverGnome *resolver = G_PROXY_RESOLVER_GNOME (object);
-
-  return resolver->proxy_settings != NULL;
+  return !g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "gnome");
 }
 
 static gboolean