7 retrieving revision 1.1 |
7 retrieving revision 1.1 |
8 |
8 |
9 diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
9 diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
10 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
10 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
11 +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
11 +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
12 @@ -54,23 +54,27 @@ nsUnixSystemProxySettings::GetMainThread |
12 @@ -55,24 +55,27 @@ NS_IMETHODIMP |
13 // dbus prevents us from being threadsafe, but this routine should not block anyhow |
13 nsUnixSystemProxySettings::GetMainThreadOnly(bool* aMainThreadOnly) { |
|
14 // dbus prevents us from being threadsafe, but this routine should not block |
|
15 // anyhow |
14 *aMainThreadOnly = true; |
16 *aMainThreadOnly = true; |
15 return NS_OK; |
17 return NS_OK; |
16 } |
18 } |
17 |
19 |
18 nsresult |
20 nsresult nsUnixSystemProxySettings::Init() { |
19 nsUnixSystemProxySettings::Init() |
|
20 { |
|
21 - mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); |
21 - mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); |
22 - if (mGSettings) { |
22 - if (mGSettings) { |
23 - mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"), |
23 - mGSettings->GetCollectionForSchema( |
24 - getter_AddRefs(mProxySettings)); |
24 - NS_LITERAL_CSTRING("org.gnome.system.proxy"), |
|
25 - getter_AddRefs(mProxySettings)); |
25 - } |
26 - } |
26 - if (!mProxySettings) { |
27 - if (!mProxySettings) { |
27 - mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID); |
28 - mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID); |
28 + // only use GSettings if that is a GNOME session |
29 + // only use GSettings if that is a GNOME session |
29 + const char* sessionType = PR_GetEnv("DESKTOP_SESSION"); |
30 + const char* sessionType = PR_GetEnv("DESKTOP_SESSION"); |