<?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/. -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>

<!DOCTYPE prefwindow SYSTEM "chrome://communicator/locale/pref/pref-proxies-advanced.dtd" >

<prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
            id="advancedProxyPreferences"
            type="child"
            onload="AdvancedInit();"
            title="&pref.proxies.advanced.title;"
            persist="screenX screenY">

  <script type="application/javascript"
          src="chrome://communicator/content/pref/pref-proxies.js"/>
  <script type="application/javascript"
          src="chrome://communicator/content/pref/preferences.js"/>

  <prefpane helpTopic="nav-prefs-advanced-proxy-advanced"
            helpURI="chrome://communicator/locale/help/suitehelp.rdf">
    <preferences>
      <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="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"
                  onchange="DoProxyCopy(this.value);"/>
      <preference id="network.proxy.socks"
                  name="network.proxy.socks"
                  type="string"/>
      <preference id="network.proxy.socks_port"
                  name="network.proxy.socks_port"
                  type="int"/>
      <preference id="network.proxy.socks_version"
                  name="network.proxy.socks_version"
                  type="int"/>
      <preference id="network.proxy.socks_remote_dns"
                  name="network.proxy.socks_remote_dns"
                  type="bool"/>
    </preferences>

    <groupbox>
      <caption label="&protocols.caption;"/>
      <description style="width: 1px;">&protocols.description;</description>

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

        <rows>
          <row>
            <hbox align="center" pack="end">
              <label value="&http.label;"
                     accesskey="&http.accesskey;"
                     control="networkProxyHTTP"/>
            </hbox>
            <hbox align="center">
              <textbox id="networkProxyHTTP"
                       preference="network.proxy.http"
                       flex="1"
                       class="uri-element"/>
              <label value="&port.label;"
                     accesskey="&HTTPPort.accesskey;"
                     control="networkProxyHTTP_Port"/>
              <textbox id="networkProxyHTTP_Port"
                       preference="network.proxy.http_port"
                       type="number"
                       max="65535"
                       size="5"/>
            </hbox>
          </row>

          <row>
            <spacer/>
            <hbox>
              <checkbox id="networkProxyShareSettings"
                        label="&reuseProxy.label;"
                        accesskey="&reuseProxy.accesskey;"
                        preference="network.proxy.share_proxy_settings"/>
            </hbox>
          </row>

          <row>
            <hbox align="center" pack="end">
              <label value="&ssl.label;"
                     accesskey="&ssl.accesskey;"
                     control="networkProxySSL"/>
            </hbox>
            <hbox align="center">
              <textbox id="networkProxySSL"
                       preference="network.proxy.ssl"
                       flex="1"
                       class="uri-element"/>
              <label value="&port.label;"
                     accesskey="&SSLPort.accesskey;"
                     control="networkProxySSL_Port"/>
              <textbox id="networkProxySSL_Port"
                       preference="network.proxy.ssl_port"
                       type="number"
                       max="65535"
                       size="5"/>
            </hbox>
          </row>

          <row>
            <hbox align="center" pack="end">
              <label value="&ftp.label;" accesskey="&ftp.accesskey;"
                     control="networkProxyFTP"/>
            </hbox>
            <hbox align="center">
              <textbox id="networkProxyFTP"
                       preference="network.proxy.ftp"
                       flex="1"
                       class="uri-element"/>
              <label value="&port.label;"
                     accesskey="&FTPPort.accesskey;"
                     control="networkProxyFTP_Port"/>
              <textbox id="networkProxyFTP_Port"
                       preference="network.proxy.ftp_port"
                       type="number"
                       max="65535"
                       size="5"/>
            </hbox>
          </row>

        </rows>
      </grid>
    </groupbox>

    <groupbox>
      <caption label="&socks.caption;"/>
      <description style="width: 1px;">&socks.description;</description>

      <hbox align="center" pack="end">
        <label value="&socks.label;"
               accesskey="&socks.accesskey;"
               control="networkProxySOCKS"/>
        <textbox id="networkProxySOCKS"
                 preference="network.proxy.socks"
                 flex="1"
                 class="uri-element"/>
        <label value="&port.label;"
               accesskey="&SOCKSport.accesskey;"
               control="networkProxySOCKS_Port"/>
        <textbox id="networkProxySOCKS_Port"
                 type="number"
                 preference="network.proxy.socks_port"
                 max="65535"
                 size="5"/>
      </hbox>

      <radiogroup id="networkProxySOCKSVersion"
                  orient="horizontal"
                  preference="network.proxy.socks_version">
        <radio id="networkProxySOCKSVersion4"
               value="4"
               label="&socks4.label;"
               accesskey="&socks4.accesskey;"/>
        <radio id="networkProxySOCKSVersion5"
               value="5"
               label="&socks5.label;"
               accesskey="&socks5.accesskey;"/>
      </radiogroup>

      <hbox align="left">
        <checkbox id="networkProxySOCKSRemoteDNS"
                  label="&socksRemoteDNS.label;"
                  accesskey="&socksRemoteDNS.accesskey;"
                  preference="network.proxy.socks_remote_dns"/>
      </hbox>

    </groupbox>
  </prefpane>
</prefwindow>
