seamonkey/mozilla-nongnome-proxies.patch
Wolfgang Rosenauer c99db130a3 Accepting request 888777 from mozilla
Requesting inclusion in mozilla:Factory for eventual submission to Factory/Tumbleweed.

OBS-URL: https://build.opensuse.org/request/show/888777
OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/seamonkey?expand=0&rev=1
2021-04-27 13:08:58 +00:00

32 lines
1.4 KiB
Diff

From: Wolfgang Rosenauer
Subject: Do not use gconf for proxy settings if not running within Gnome
diff -ruN seamonkey/mozilla/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp seamonkey.new/mozilla/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
--- seamonkey/mozilla/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 2020-02-18 00:39:44.000000000 +0100
+++ seamonkey.new/mozilla/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 2020-03-02 12:41:27.735383057 +0100
@@ -59,13 +59,17 @@
nsresult
nsUnixSystemProxySettings::Init()
{
- 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);
+ // 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);
+ }
}
return NS_OK;