--- a/mozilla-nongnome-proxies.patch Tue May 14 12:12:16 2019 +0200
+++ b/mozilla-nongnome-proxies.patch Wed May 15 19:43:42 2019 +0200
@@ -9,7 +9,7 @@
diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
-@@ -55,24 +55,27 @@ NS_IMETHODIMP
+@@ -57,25 +57,27 @@ NS_IMETHODIMP
nsUnixSystemProxySettings::GetMainThreadOnly(bool* aMainThreadOnly) {
// dbus prevents us from being threadsafe, but this routine should not block
// anyhow
@@ -17,7 +17,7 @@
return NS_OK;
}
- nsresult nsUnixSystemProxySettings::Init() {
+ void nsUnixSystemProxySettings::Init() {
- mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
- if (mGSettings) {
- mGSettings->GetCollectionForSchema(
@@ -26,6 +26,7 @@
- }
- if (!mProxySettings) {
- mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
+- }
+ // only use GSettings if that is a GNOME session
+ const char* sessionType = PR_GetEnv("DESKTOP_SESSION");
+ if (sessionType && !strcmp(sessionType, "gnome")) {
@@ -37,11 +38,11 @@
+ if (!mProxySettings) {
+ mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
+ }
- }
-
- return NS_OK;
}
bool nsUnixSystemProxySettings::IsProxyMode(const char* aMode) {
nsAutoCString mode;
return NS_SUCCEEDED(mGConf->GetString(
+ NS_LITERAL_CSTRING("/system/proxy/mode"), mode)) &&
+ mode.EqualsASCII(aMode);
+ }