MozillaFirefox/mozilla-nongnome-proxies.patch
Wolfgang Rosenauer 09a0ed1d17 - update to Firefox 22.0 (bnc#825935)
* removed obsolete patches
    + mozilla-qcms-ppc.patch
    + mozilla-gstreamer-760140.patch
  * GStreamer support does not build on 12.1 anymore (build only
    on 12.2 and later)
- Fix qcms altivec include (mozilla-qcms-ppc.patch)

OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=340
2013-06-24 07:57:33 +00:00

49 lines
1.8 KiB
Diff

From: Wolfgang Rosenauer
Subject: 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 --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
@@ -50,24 +50,28 @@ nsUnixSystemProxySettings::GetMainThread
// dbus prevents us from being threadsafe, but this routine should not block anyhow
*aMainThreadOnly = true;
return NS_OK;
}
nsresult
nsUnixSystemProxySettings::Init()
{
- mSchemeProxySettings.Init(5);
- 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")) {
+ mSchemeProxySettings.Init(5);
+ 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;
}
bool
nsUnixSystemProxySettings::IsProxyMode(const char* aMode)
{