--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sunbird-system-proxy.patch Tue Feb 09 11:16:29 2010 +0100
@@ -0,0 +1,88 @@
+diff --git a/calendar/base/content/preferences/connection.js b/calendar/base/content/preferences/connection.js
+--- a/calendar/base/content/preferences/connection.js
++++ b/calendar/base/content/preferences/connection.js
+@@ -69,17 +69,22 @@ var gConnectionsDialog = {
+ }
+ }
+
+ var noProxiesPref = document.getElementById("network.proxy.no_proxies_on");
+ noProxiesPref.value = noProxiesPref.value.replace(/[;]/g,',');
+
+ return true;
+ },
+-
++
++ checkForSystemProxy: function ()
++ {
++ if ("@mozilla.org/system-proxy-settings;1" in Components.classes)
++ document.getElementById("systemPref").removeAttribute("hidden");
++ },
+
+ /**
+ * Handler function to be called when the network.proxy.type preference has
+ * changed while the connection preferences dialog is open.
+ */
+ proxyTypeChanged: function gCD_proxyTypeChanged() {
+ var proxyTypePref = document.getElementById("network.proxy.type");
+
+diff --git a/calendar/base/content/preferences/connection.xul b/calendar/base/content/preferences/connection.xul
+--- a/calendar/base/content/preferences/connection.xul
++++ b/calendar/base/content/preferences/connection.xul
+@@ -40,16 +40,17 @@
+
+ <?xml-stylesheet href="chrome://global/skin/"?>
+
+ <prefwindow id="ConnectionsDialog" type="child"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ title="&connectionsDialog.title;"
+ dlgbuttons="accept,cancel"
+ onbeforeaccept="return gConnectionsDialog.beforeAccept();"
++ onload="gConnectionsDialog.checkForSystemProxy();"
+ #ifdef XP_MACOSX
+ style="width: &window.macWidth; !important;">
+ #else
+ style="width: &window.width; !important;">
+ #endif
+
+ <prefpane id="ConnectionsDialogPane">
+
+@@ -88,16 +89,17 @@
+
+ <groupbox>
+ <caption label="&proxyTitle.label;"/>
+
+ <radiogroup id="networkProxyType" preference="network.proxy.type"
+ onsyncfrompreference="return gConnectionsDialog.readProxyType();">
+ <radio value="0" label="&directTypeRadio.label;" accesskey="&directTypeRadio.accesskey;"/>
+ <radio value="4" label="&WPADTypeRadio.label;" accesskey="&WPADTypeRadio.accesskey;"/>
++ <radio value="5" label="&systemTypeRadio.label;" accesskey="&systemTypeRadio.accesskey;" id="systemPref" hidden="true"/>
+ <radio value="1" label="&manualTypeRadio.label;" accesskey="&manualTypeRadio.accesskey;"/>
+ <grid class="indent" flex="1">
+ <columns>
+ <column/>
+ <column flex="1"/>
+ </columns>
+ <rows>
+ <row align="center">
+diff --git a/calendar/locales/en-US/chrome/calendar/preferences/connection.dtd b/calendar/locales/en-US/chrome/calendar/preferences/connection.dtd
+--- a/calendar/locales/en-US/chrome/calendar/preferences/connection.dtd
++++ b/calendar/locales/en-US/chrome/calendar/preferences/connection.dtd
+@@ -43,16 +43,18 @@
+ <!ENTITY window.width "37em">
+ <!ENTITY window.macWidth "39em">
+
+ <!ENTITY proxyTitle.label "Configure Proxies to Access the Internet">
+ <!ENTITY directTypeRadio.label "Direct connection to the Internet">
+ <!ENTITY directTypeRadio.accesskey "d">
+ <!ENTITY WPADTypeRadio.label "Auto-detect proxy settings for this network">
+ <!ENTITY WPADTypeRadio.accesskey "w">
++<!ENTITY systemTypeRadio.label "Use system proxy settings">
++<!ENTITY systemTypeRadio.accesskey "u">
+ <!ENTITY manualTypeRadio.label "Manual proxy configuration:">
+ <!ENTITY manualTypeRadio.accesskey "m">
+ <!ENTITY autoTypeRadio.label "Automatic proxy configuration URL:">
+ <!ENTITY autoTypeRadio.accesskey "A">
+ <!ENTITY reload.label "Reload">
+ <!ENTITY reload.accesskey "e">
+ <!ENTITY ftp.label "FTP Proxy:">
+ <!ENTITY ftp.accesskey "F">