author | Wolfgang Rosenauer <wr@rosenauer.org> |
Wed, 30 Sep 2020 09:49:14 +0200 | |
branch | firefox81 |
changeset 1145 | fbfd8f7cbd53 |
parent 1141 | edb0ebe8cccc |
child 1190 | 2a24a948b5cf |
permissions | -rw-r--r-- |
1097 | 1 |
# HG changeset patch |
2 |
# User Wolfgang Rosenauer |
|
3 |
# Date 1558442915 -7200 |
|
4 |
# Tue May 21 14:48:35 2019 +0200 |
|
5 |
# Node ID 6bcf2dfebc1ea2aa34e5cc61152709fc8e409dc5 |
|
1141 | 6 |
# Parent bd5d1f49975deb730064a16b3079edb53c4a5f84 |
1097 | 7 |
Do not use gconf for proxy settings if not running within Gnome |
0 | 8 |
Index: toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
9 |
=================================================================== |
|
10 |
RCS file: /cvsroot/mozilla/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp,v |
|
11 |
retrieving revision 1.1 |
|
367 | 12 |
|
1123 | 13 |
diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
14 |
--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
|
15 |
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
|
1141 | 16 |
@@ -49,20 +49,24 @@ NS_IMETHODIMP |
1123 | 17 |
nsUnixSystemProxySettings::GetMainThreadOnly(bool* aMainThreadOnly) { |
18 |
// dbus prevents us from being threadsafe, but this routine should not block |
|
19 |
// anyhow |
|
20 |
*aMainThreadOnly = true; |
|
21 |
return NS_OK; |
|
568
2c74c5927ea2
first working Aurora 18 build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
419
diff
changeset
|
22 |
} |
0 | 23 |
|
1093 | 24 |
void nsUnixSystemProxySettings::Init() { |
382
67f876aafae8
lift up to Gecko 11beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
25 |
- mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); |
419
f6b055dd94bc
commit Aurora 13 state
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
382
diff
changeset
|
26 |
- if (mGSettings) { |
1141 | 27 |
- mGSettings->GetCollectionForSchema("org.gnome.system.proxy"_ns, |
28 |
- getter_AddRefs(mProxySettings)); |
|
0 | 29 |
+ const char* sessionType = PR_GetEnv("DESKTOP_SESSION"); |
30 |
+ if (sessionType && !strcmp(sessionType, "gnome")) { |
|
382
67f876aafae8
lift up to Gecko 11beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
31 |
+ mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); |
419
f6b055dd94bc
commit Aurora 13 state
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
382
diff
changeset
|
32 |
+ if (mGSettings) { |
1097 | 33 |
+ mGSettings->GetCollectionForSchema( |
1141 | 34 |
+ "org.gnome.system.proxy"_ns, |
1097 | 35 |
+ getter_AddRefs(mProxySettings)); |
650 | 36 |
+ } |
1095 | 37 |
} |
0 | 38 |
} |
39 |
||
1123 | 40 |
nsresult nsUnixSystemProxySettings::GetPACURI(nsACString& aResult) { |
41 |
if (mProxySettings) { |
|
42 |
nsCString proxyMode; |
|
43 |
// Check if mode is auto |
|
1141 | 44 |
nsresult rv = mProxySettings->GetString("mode"_ns, proxyMode); |