mozilla-nongnome-proxies.patch
author Wolfgang Rosenauer <wr@rosenauer.org>
Sun, 17 Oct 2021 20:19:48 +0200
branchfirefox93
changeset 1164 bb219fd0d646
parent 1141 edb0ebe8cccc
permissions -rw-r--r--
Firefox 93.0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1097
840132a4a9b3 Firefox 68.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1095
diff changeset
     1
# HG changeset patch
840132a4a9b3 Firefox 68.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1095
diff changeset
     2
# User Wolfgang Rosenauer
840132a4a9b3 Firefox 68.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1095
diff changeset
     3
# Date 1558442915 -7200
840132a4a9b3 Firefox 68.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1095
diff changeset
     4
#      Tue May 21 14:48:35 2019 +0200
840132a4a9b3 Firefox 68.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1095
diff changeset
     5
# Node ID 6bcf2dfebc1ea2aa34e5cc61152709fc8e409dc5
1141
edb0ebe8cccc Firefox 80.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1123
diff changeset
     6
# Parent  bd5d1f49975deb730064a16b3079edb53c4a5f84
1097
840132a4a9b3 Firefox 68.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1095
diff changeset
     7
Do not use gconf for proxy settings if not running within Gnome
0
ad87c5e85a41 patch status 20091128
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     8
Index: toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
ad87c5e85a41 patch status 20091128
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     9
===================================================================
ad87c5e85a41 patch status 20091128
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    10
RCS file: /cvsroot/mozilla/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp,v
ad87c5e85a41 patch status 20091128
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    11
retrieving revision 1.1
367
3fabd9f66322 begin Firefox 10 cycle
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    12
1123
7fa561e5d7c7 Firefox 74.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1097
diff changeset
    13
diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
7fa561e5d7c7 Firefox 74.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1097
diff changeset
    14
--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
7fa561e5d7c7 Firefox 74.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1097
diff changeset
    15
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
1141
edb0ebe8cccc Firefox 80.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1123
diff changeset
    16
@@ -49,20 +49,24 @@ NS_IMETHODIMP
1123
7fa561e5d7c7 Firefox 74.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1097
diff changeset
    17
 nsUnixSystemProxySettings::GetMainThreadOnly(bool* aMainThreadOnly) {
7fa561e5d7c7 Firefox 74.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1097
diff changeset
    18
   // dbus prevents us from being threadsafe, but this routine should not block
7fa561e5d7c7 Firefox 74.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1097
diff changeset
    19
   // anyhow
7fa561e5d7c7 Firefox 74.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1097
diff changeset
    20
   *aMainThreadOnly = true;
7fa561e5d7c7 Firefox 74.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1097
diff changeset
    21
   return NS_OK;
568
2c74c5927ea2 first working Aurora 18 build
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 419
diff changeset
    22
 }
0
ad87c5e85a41 patch status 20091128
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    23
 
1093
3942c205588b 67.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1085
diff changeset
    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
edb0ebe8cccc Firefox 80.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1123
diff changeset
    27
-    mGSettings->GetCollectionForSchema("org.gnome.system.proxy"_ns,
edb0ebe8cccc Firefox 80.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1123
diff changeset
    28
-                                       getter_AddRefs(mProxySettings));
0
ad87c5e85a41 patch status 20091128
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    29
+  const char* sessionType = PR_GetEnv("DESKTOP_SESSION");
ad87c5e85a41 patch status 20091128
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    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
840132a4a9b3 Firefox 68.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1095
diff changeset
    33
+      mGSettings->GetCollectionForSchema(
1141
edb0ebe8cccc Firefox 80.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1123
diff changeset
    34
+          "org.gnome.system.proxy"_ns,
1097
840132a4a9b3 Firefox 68.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1095
diff changeset
    35
+          getter_AddRefs(mProxySettings));
650
e8c83b144fd1 22.0b4 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 568
diff changeset
    36
+    }
1095
9c008b241362 fixed syntax issue
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1093
diff changeset
    37
   }
0
ad87c5e85a41 patch status 20091128
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    38
 }
ad87c5e85a41 patch status 20091128
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    39
 
1123
7fa561e5d7c7 Firefox 74.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1097
diff changeset
    40
 nsresult nsUnixSystemProxySettings::GetPACURI(nsACString& aResult) {
7fa561e5d7c7 Firefox 74.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1097
diff changeset
    41
   if (mProxySettings) {
7fa561e5d7c7 Firefox 74.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1097
diff changeset
    42
     nsCString proxyMode;
7fa561e5d7c7 Firefox 74.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1097
diff changeset
    43
     // Check if mode is auto
1141
edb0ebe8cccc Firefox 80.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1123
diff changeset
    44
     nsresult rv = mProxySettings->GetString("mode"_ns, proxyMode);