mozilla-nongnome-proxies.patch
branchfirefox60
changeset 1090 554cd9503f75
parent 994 9fc447b00040
child 1093 3942c205588b
equal deleted inserted replaced
1080:e8d4a33582b8 1090:554cd9503f75
     7 retrieving revision 1.1
     7 retrieving revision 1.1
     8 
     8 
     9 diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
     9 diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
    10 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
    10 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
    11 +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
    11 +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
    12 @@ -54,23 +54,27 @@ nsUnixSystemProxySettings::GetMainThread
    12 @@ -55,24 +55,27 @@ NS_IMETHODIMP
    13    // dbus prevents us from being threadsafe, but this routine should not block anyhow
    13  nsUnixSystemProxySettings::GetMainThreadOnly(bool* aMainThreadOnly) {
       
    14    // dbus prevents us from being threadsafe, but this routine should not block
       
    15    // anyhow
    14    *aMainThreadOnly = true;
    16    *aMainThreadOnly = true;
    15    return NS_OK;
    17    return NS_OK;
    16  }
    18  }
    17  
    19  
    18  nsresult
    20  nsresult nsUnixSystemProxySettings::Init() {
    19  nsUnixSystemProxySettings::Init()
       
    20  {
       
    21 -  mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
    21 -  mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
    22 -  if (mGSettings) {
    22 -  if (mGSettings) {
    23 -    mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"),
    23 -    mGSettings->GetCollectionForSchema(
    24 -                                       getter_AddRefs(mProxySettings));
    24 -        NS_LITERAL_CSTRING("org.gnome.system.proxy"),
       
    25 -        getter_AddRefs(mProxySettings));
    25 -  }
    26 -  }
    26 -  if (!mProxySettings) {
    27 -  if (!mProxySettings) {
    27 -    mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
    28 -    mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
    28 +  // only use GSettings if that is a GNOME session
    29 +  // only use GSettings if that is a GNOME session
    29 +  const char* sessionType = PR_GetEnv("DESKTOP_SESSION");
    30 +  const char* sessionType = PR_GetEnv("DESKTOP_SESSION");
    39    }
    40    }
    40  
    41  
    41    return NS_OK;
    42    return NS_OK;
    42  }
    43  }
    43  
    44  
    44  bool
    45  bool nsUnixSystemProxySettings::IsProxyMode(const char* aMode) {
    45  nsUnixSystemProxySettings::IsProxyMode(const char* aMode)
    46    nsAutoCString mode;
    46  {
    47    return NS_SUCCEEDED(mGConf->GetString(