updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / firefox-beta-kde-opensuse / mozilla-nongnome-proxies.patch
blobec22657113f7ec7c14d41829107d9ec10f1da114
1 From: Wolfgang Rosenauer
2 Subject: Do not use gconf for proxy settings if not running within Gnome
4 Index: toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
5 ===================================================================
6 RCS file: /cvsroot/mozilla/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp,v
7 retrieving revision 1.1
8 diff -u -p -6 -r1.1 nsUnixSystemProxySettings.cpp
9 --- toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 29 Jan 2008 15:58:41 -0000 1.1
10 +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 17 Apr 2008 19:02:19 -0000
11 @@ -69,13 +69,19 @@ private:
13 NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
15 nsresult
16 nsUnixSystemProxySettings::Init()
18 - mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
19 + // If this is a GNOME session, load gconf and try to use its preferences.
20 + // If gconf is not available (which would be stupid) we'll proceed as if
21 + // this was not a GNOME session, using *_PROXY environment variables.
22 + const char* sessionType = PR_GetEnv("DESKTOP_SESSION");
23 + if (sessionType && !strcmp(sessionType, "gnome")) {
24 + mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
25 + }
26 return NS_OK;
29 PRBool
30 nsUnixSystemProxySettings::IsProxyMode(const char* aMode)