File palemoon-nongnome-proxies.patch of Package palemoon

diff -ruN palemoon-31.3.0.1_Release/platform/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp palemoon-31.3.0.1_Release.patched/platform/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
--- palemoon-31.3.0.1_Release/platform/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp	2022-10-31 19:17:38.170863200 -0400
+++ palemoon-31.3.0.1_Release.patched/platform/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp	2022-11-01 11:47:11.638580692 -0400
@@ -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;
openSUSE Build Service is sponsored by