<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE overlay SYSTEM "chrome://communicator/locale/pref/pref-proxies.dtd">
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <prefpane id="proxies_pane"
            label="&pref.proxies.title;"
            script="chrome://communicator/content/pref/pref-proxies.js">
    <preferences id="proxies_preferences">
      <preference id="network.proxy.type"
                  name="network.proxy.type"
                  type="int"
                  onchange="DoEnabling();"/>
      <preference id="network.proxy.autoconfig_url"
                  name="network.proxy.autoconfig_url"
                  type="string"/>
      <preference id="pref.advanced.proxies.disable_button.reload"
                  name="pref.advanced.proxies.disable_button.reload"
                  type="bool"/>
      <preference id="network.proxy.http"
                  name="network.proxy.http"
                  type="string"
                  onchange="DoProxyHostCopy(this.value);"/>
      <preference id="network.proxy.http_port"
                  name="network.proxy.http_port"
                  type="int"
                  onchange="DoProxyPortCopy(this.value);"/>
      <preference id="pref.advanced.proxies.disable_button.advanced"
                  name="pref.advanced.proxies.disable_button.advanced"
                  type="bool"/>
      <preference id="network.proxy.no_proxies_on"
                  name="network.proxy.no_proxies_on"
                  type="string"/>
      <preference id="network.proxy.ssl"
                  name="network.proxy.ssl"
                  type="string"/>
      <preference id="network.proxy.ssl_port"
                  name="network.proxy.ssl_port"
                  type="int"/>
      <preference id="network.proxy.ftp"
                  name="network.proxy.ftp"
                  type="string"/>
      <preference id="network.proxy.ftp_port"
                  name="network.proxy.ftp_port"
                  type="int"/>
      <preference id="network.proxy.share_proxy_settings"
                  name="network.proxy.share_proxy_settings"
                  type="bool"/>
    </preferences>

    <description>&pref.proxies.desc;</description>
    <groupbox>
      <caption label="&proxyTitle.label;"/>
      <radiogroup id="networkProxyType"
                  preference="network.proxy.type"
                  align="stretch">
        <vbox align="start">
          <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="2"
                 label="&autoTypeRadio.label;"
                 accesskey="&autoTypeRadio.accesskey;"/>
        </vbox>

        <hbox class="indent" align="center">
         <textbox id="networkProxyAutoconfigURL"
                  flex="1"
                  class="uri-element"
                  onchange="FixProxyURL(this);"
                  preference="network.proxy.autoconfig_url"/>
         <button id="autoReload"
                 label="&reload.label;"
                 accesskey="&reload.accesskey;"
                 oncommand="ReloadPAC();"
                 preference="pref.advanced.proxies.disable_button.reload"/>
        </hbox>

        <vbox align="start">
          <radio value="1"
                 label="&manualTypeRadio.label;"
                 accesskey="&manualTypeRadio.accesskey;"/>
        </vbox>

        <grid class="indent">
          <columns>
            <column/>
            <column flex="1"/>
          </columns>

          <rows>
            <row align="center">
              <hbox align="center" pack="end">
                <label value="&http.label;"
                       accesskey="&http.accesskey;"
                       control="networkProxyHTTP"/>
              </hbox>
              <textbox id="networkProxyHTTP"
                       preference="network.proxy.http"
                       class="uri-element"/>
            </row>

            <row>
              <hbox align="center" pack="end">
                <label value="&port.label;"
                       accesskey="&HTTPPort.accesskey;"
                       control="networkProxyHTTP_Port"/>
              </hbox>
              <hbox align="center">
                <textbox id="networkProxyHTTP_Port"
                         preference="network.proxy.http_port"
                         type="number"
                         max="65535"
                         size="5"/>
                <spacer flex="1"/>
                <button id="advancedButton"
                        label="&advanced.label;"
                        accesskey="&advanced.accesskey;"
                        align="end"
                        oncommand="OpenAdvancedDialog();"
                        preference="pref.advanced.proxies.disable_button.advanced"/>
              </hbox>
            </row>

            <row align="baseline">
              <hbox align="center" pack="end">
                <label value="&noproxy.label;"
                       accesskey="&noproxy.accesskey;"
                       control="networkProxyNone"/>
              </hbox>
              <textbox id="networkProxyNone"
                       multiline="true"
                       preference="network.proxy.no_proxies_on"
                       class="uri-element"
                       onchange="UpdateProxies();"/>
            </row>
            <row>
              <spacer/>
              <description control="networkProxyNone">&noproxyExplain.label;
              </description>
            </row>
          </rows>
        </grid>
      </radiogroup>
    </groupbox>
  </prefpane>
</overlay>
