← Back to team overview

desktop-packages team mailing list archive

[Bug 875266]

 

Comment on attachment 577534
gsettings proxy patch v2

>   FUNC(g_variant_get_string, const char *, (GVariant* value, gsize* length)) \
>   FUNC(g_variant_is_of_type, gboolean, (GVariant* value, const GVariantType* type)) \
>   FUNC(g_variant_new_int32, GVariant *, (gint32 value)) \
>   FUNC(g_variant_new_boolean, GVariant *, (gboolean value)) \
>   FUNC(g_variant_new_string, GVariant *, (const char* string)) \
>+  FUNC(g_variant_get_strv, GVariant *, (gsize* length)) \

These were roughly in an order.
Can you insert get_strv after get_string, please?

(In reply to jhorak from comment #10)
> Could you be more specific (the other things)?

Check the #define statements before and after GSETTIINGS_FUNCTIONS as any new
symbols need to be added here.

A #define is needed for g_variant_get_strv and
G_VARIANT_TYPE_STRING_ARRAY.

>+  if (mGConf && IsProxyMode("auto")) {
>+    return mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/autoconfig_url"),
>+                             aResult);
>   }

>+  if (mGSettings) {
>+     // Check if mode is auto

I assume GSettings should override GConf settings.
Otherwise I assume those who upgrade to GNOME 3 will still be using their old
GConf settings, but the configuration utility will change the GSettings
values.

>+     nsCString proxyMode; 
>+     nsCOMPtr<nsIGSettingsCollection> proxy_settings;
>+     mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"), 
>+                                        getter_AddRefs(proxy_settings));
>+     if (proxy_settings) {
>+       nsresult rv = proxy_settings->GetString(NS_LITERAL_CSTRING("mode"), proxyMode);

Move the proxyMode declaration to within the "if (proxy_setttings)" block
where it is used.

>+         return proxy_settings->GetString(NS_LITERAL_CSTRING("autoconfig-url"), 
>+                                             aResult);

Alignment.

>+  PRInt32 port;
>+  rv = proxy_settings->GetInt(NS_LITERAL_CSTRING("port"), &port);
>+  NS_ENSURE_SUCCESS(rv, rv);
>+    
>+  SetProxyResult(aType, host, port, aResult);
>+  return NS_OK;

Need to return NS_ERROR_FAILURE when the port is 0.

       'Each of the 4 proxy types is enabled if its "host" key is
        non-empty and its "port" key is non-0.'

http://git.gnome.org/browse/gsettings-desktop-
schemas/tree/schemas/org.gnome.system.proxy.gschema.xml.in.in

>+  // Check if proxy is enabled, flag is only in schema org.gnome.system.proxy.http,
>+  // there is no separate flag for each schema.
>+  nsresult rv = mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy.http"),
>+                                                   getter_AddRefs(proxy_settings));
>+  NS_ENSURE_SUCCESS(rv, rv);
>+  rv = proxy_settings->GetBoolean(NS_LITERAL_CSTRING("enabled"), &masterProxySwitch);
>+  NS_ENSURE_SUCCESS(rv, rv);

"enabled" is described as "Unused", so don't use this key.

>+  bool useHttpProxyForAll = false;
>+  // This setting sometimes doesn't exist, don't bail on failure
>+  proxy_settings->GetBoolean(NS_LITERAL_CSTRING("use-same-proxy"), &useHttpProxyForAll);
>+
>+  if (!useHttpProxyForAll) {
>+    rv = SetProxyResultFromGSettings("org.gnome.system.proxy.socks", "SOCKS", aResult);
>+    if (NS_SUCCEEDED(rv))
>+      return rv;
>+  }
>+  

Similarly, "use-same-proxy" is also "Unused".

>+  if (aScheme.LowerCaseEqualsLiteral("http") || useHttpProxyForAll) {
>+    rv = SetProxyResultFromGSettings("org.gnome.system.proxy.http", "PROXY", aResult);
>+  } else if (aScheme.LowerCaseEqualsLiteral("https")) {
>+    rv = SetProxyResultFromGSettings("org.gnome.system.proxy.https", "PROXY", aResult);

Need to handle this case:

       "If an http proxy is configured, but an https proxy is not,
        then the http proxy is also used for https."

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to firefox in Ubuntu.
https://bugs.launchpad.net/bugs/875266

Title:
  Firefox ignores GNOME 3 proxy settings

Status in The Mozilla Firefox Browser:
  In Progress
Status in “firefox” package in Ubuntu:
  Triaged

Bug description:
  Firefox ignores GNOME3 proxy settings.
  This is regression from Natty+GNOME 2.

  How to reproduce:
   1. set proxy in gnome-control-center
   2. set 'Use system proxy settings' in Firefox settings (default)
   3. open web pages

  Expected:
   4. pages are shown using proxy

  Happened instead:
   4. pages are not shown behind proxy

  WORKAROUND:
   use 'manual proxy configuration' in Firefox settings

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: firefox 7.0.1+build1+nobinonly-0ubuntu2
  ProcVersionSignature: Ubuntu 3.0.0-12.20-generic-pae 3.0.4
  Uname: Linux 3.0.0-12-generic-pae i686
  AddonCompatCheckDisabled: False
  AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
  AplayDevices:
   **** List of PLAYBACK Hardware Devices ****
   card 0: Intel [HDA Intel], device 0: ALC269 Analog [ALC269 Analog]
     Subdevices: 1/1
     Subdevice #0: subdevice #0
  ApportVersion: 1.23-0ubuntu3
  Architecture: i386
  ArecordDevices:
   **** List of CAPTURE Hardware Devices ****
   card 0: Intel [HDA Intel], device 0: ALC269 Analog [ALC269 Analog]
     Subdevices: 1/1
     Subdevice #0: subdevice #0
  AudioDevicesInUse:
   USER        PID ACCESS COMMAND
   /dev/snd/controlC0:  nobuto     1667 F.... pulseaudio
  BuildID: 20111008085056
  CRDA: Error: [Errno 2] そのようなファイルやディレクトリはありません
  Card0.Amixer.info:
   Card hw:0 'Intel'/'HDA Intel at 0xf0a00000 irq 45'
     Mixer name	: 'Realtek ALC269'
     Components	: 'HDA:10ec0269,10cf0000,00100004 HDA:11c11040,10cf14a5,00100200'
     Controls      : 17
     Simple ctrls  : 11
  Channel: release
  CheckboxSubmission: 1d84ca1b2de43c2199974f7b8a6ca9cb
  CheckboxSystem: 0657dd966bc74d2b22e7c94051aa55af
  Date: Sun Oct 16 04:41:44 2011
  EcryptfsInUse: Yes
  ForcedLayersAccel: False
  IfupdownConfig:
   auto lo
   iface lo inet loopback
  InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta i386 (20111007)
  IpRoute:
   default via 192.168.11.1 dev wlan0  proto static 
   169.254.0.0/16 dev wlan0  scope link  metric 1000 
   192.168.11.0/24 dev wlan0  proto kernel  scope link  src 192.168.11.52  metric 2
  Profiles:
   Profile0 (Default) - LastVersion=7.0.1/20111008085056
   Profile1 - LastVersion=7.0.1/20111008085056
   Profile2 - LastVersion=6.0.2/20110905174115 (Out of date)
   Profile3 - LastVersion=6.0/20110812234425 (Out of date)
   Profile4 - LastVersion=5.0/20110622232052 (Out of date)
  RunningIncompatibleAddons: False
  SourcePackage: firefox
  UpgradeStatus: No upgrade log present (probably fresh install)
  dmi.bios.date: 03/30/2009
  dmi.bios.vendor: FUJITSU // Phoenix Technologies Ltd.
  dmi.bios.version: Version 1.22
  dmi.board.name: FJNB1E6
  dmi.board.vendor: FUJITSU
  dmi.chassis.type: 10
  dmi.chassis.vendor: FUJITSU
  dmi.modalias: dmi:bvnFUJITSU//PhoenixTechnologiesLtd.:bvrVersion1.22:bd03/30/2009:svnFUJITSU:pnFMVMGD75P:pvr:rvnFUJITSU:rnFJNB1E6:rvr:cvnFUJITSU:ct10:cvr:
  dmi.product.name: FMVMGD75P
  dmi.sys.vendor: FUJITSU

To manage notifications about this bug go to:
https://bugs.launchpad.net/firefox/+bug/875266/+subscriptions


References