File mozilla-nongnome-proxies.patch of Package MozillaFirefox.11385
# HG changeset patch
# User Wolfgang Rosenauer
# Date 1558421095 -7200
# Tue May 21 08:44:55 2019 +0200
# Node ID ed1ebea5177464ffe5ed3204dcc585c6f992edcd
# Parent 2fc98c7ea73a9eb166e6f3550a86db9e1ad2b613
Do not use gconf for proxy settings if not running within Gnome
Index: toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
===================================================================
RCS file: /cvsroot/mozilla/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp,v
retrieving revision 1.1
diff -r 2fc98c7ea73a toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp Tue May 21 15:01:08 2019 +0000
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp Tue May 21 17:37:31 2019 +0200
@@ -60,16 +60,19 @@
}
nsresult nsUnixSystemProxySettings::Init() {
- mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
- if (mGSettings) {
- mGSettings->GetCollectionForSchema(
- NS_LITERAL_CSTRING("org.gnome.system.proxy"),
- getter_AddRefs(mProxySettings));
+ // only use GSettings if that is a GNOME session
+ const char* sessionType = PR_GetEnv("DESKTOP_SESSION");
+ if (sessionType && !strcmp(sessionType, "gnome")) {
+ mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
+ if (mGSettings) {
+ mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"),
+ getter_AddRefs(mProxySettings));
+ }
+ if (!mProxySettings) {
+ mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
+ }
}
- if (!mProxySettings) {
- mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
- }
-
+
return NS_OK;
}