author | Wolfgang Rosenauer <wr@rosenauer.org> |
Fri, 12 Jun 2020 23:01:02 +0200 | |
changeset 1130 | ea7152ed4a37 |
parent 1123 | 7fa561e5d7c7 |
child 1141 | edb0ebe8cccc |
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 |
|
1123 | 6 |
# Parent dc1684693eed684bdafeff0ad78d4f6d288fcae1 |
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 |
|
16 |
@@ -49,21 +49,24 @@ NS_IMETHODIMP |
|
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) { |
1085 | 27 |
- mGSettings->GetCollectionForSchema( |
28 |
- NS_LITERAL_CSTRING("org.gnome.system.proxy"), |
|
29 |
- getter_AddRefs(mProxySettings)); |
|
0 | 30 |
+ const char* sessionType = PR_GetEnv("DESKTOP_SESSION"); |
31 |
+ if (sessionType && !strcmp(sessionType, "gnome")) { |
|
382
67f876aafae8
lift up to Gecko 11beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
32 |
+ mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); |
419
f6b055dd94bc
commit Aurora 13 state
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
382
diff
changeset
|
33 |
+ if (mGSettings) { |
1097 | 34 |
+ mGSettings->GetCollectionForSchema( |
35 |
+ NS_LITERAL_CSTRING("org.gnome.system.proxy"), |
|
36 |
+ getter_AddRefs(mProxySettings)); |
|
650 | 37 |
+ } |
1095 | 38 |
} |
0 | 39 |
} |
40 |
||
1123 | 41 |
nsresult nsUnixSystemProxySettings::GetPACURI(nsACString& aResult) { |
42 |
if (mProxySettings) { |
|
43 |
nsCString proxyMode; |
|
44 |
// Check if mode is auto |
|
45 |
nsresult rv = |