<?xml version="1.0"?>
<?xml-stylesheet href="chrome://messenger/skin/messenger.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>

<!DOCTYPE window SYSTEM "chrome://messenger/locale/am-server-top.dtd" >

<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        xmlns:html="http://www.w3.org/TR/REC-html40"
        class="dialog"
        onload="parent.onPanelLoaded('am-server.xul');"
        orient="vertical">

  <script src="chrome://messenger/content/am-server.js"/>
  <script src="chrome://global/content/strres.js"/>

  <text hidden="true" wsm_persist="true" id="server.type"/>
  <text hidden="true" wsm_persist="true" id="server.hostName"/>
  <text hidden="true" wsm_persist="true" id="server.username"/>

  <box class="box-smallheader" title="&serverSettings.label;"/>

  <grid>
    <columns>
      <column/>
      <column/>
    </columns>
    <rows>      
      <row>
        <text class="label" value="&serverType.label;"/>
        <text class="label" id="servertype.verbose"/>
      </row>
      <row>
        <text class="label" value="&serverName.label;"/>
        <text class="label" id="servername.verbose"/>
      </row>
      <row>
        <text class="label" value="&userName.label;"/>
        <text class="label" id="username.verbose"/>
      </row>
      <row>
        <text class="label" value="&port.label;"/>
        <textfield wsm_persist="true" size="3" id="server.port"/>
      </row>
    </rows>
  </grid>
  <spring class="spacer"/>
  <box id="serverPrefContainer" orient="vertical">

  <checkbox wsm_persist="true" id="server.isSecure" value="&isSecure.label;"/>

  <checkbox wsm_persist="true" id="server.rememberPassword" hidefor="nntp"
            value="&savePassword.label;"/>

  <box orient="horizontal">
    <checkbox wsm_persist="true" id="server.doBiff" value="&biffStart.label;"/>
    <textfield wsm_persist="true" id="server.biffMinutes" size="3"/>
    <text class="label" for="server.biffMinutes" value="&biffEnd.label;"/>
  </box>
  <checkbox style="margin-left: 2em" hidefor="nntp"
            wsm_persist="true" id="server.downloadOnBiff"
            value="&downloadOnBiff.label;"/>
  <checkbox wsm_persist="true" id="pop3.leaveMessagesOnServer"
            value="&leaveOnServer.label;"/>

  <checkbox wsm_persist="true" id="pop3.deleteMailLeftOnServer"
            value="&deleteOnServer.label;"/>
  <checkbox wsm_persist="true" id="pop3.emptyTrashOnExit"
            value="&emptyTrashOnExit.label;"/>
  <box>
    <checkbox wsm_persist="true" value="&maxMessageSizePrefix.label;" id="pop3.limitMessageSize"/>
    <textfield wsm_persist="true" id="pop3.maxMessageSize" size="3"/>
    <text value="&maxMessageSizePostfix.label;" for="pop3.limitMessageSize" class="label"/>
  </box>
  <!-- IMAP -->
  <box iscontrolcontainer="true">
    <text class="label" value="&deleteMessagePrefix.label;"/>
    <menulist wsm_persist="true" id="imap.deleteModel">
      <menupopup>
        <menuitem data="1" value="&modelMoveToTrash.label;"/>
        <menuitem data="0" value="&modelMarkDeleted.label;"/>
        <menuitem data="2" value="&modelDeleteImmediately.label;"/>
      </menupopup>
    </menulist>
  </box>

  <checkbox wsm_persist="true" id="imap.cleanupInboxOnExit"
            value="&expungeOnExit.label;"/>
  <checkbox wsm_persist="true" id="imap.emptyTrashOnExit" iscontrolcontainer="true"
            value="&emptyTrashOnExit.label;"/>

  <box iscontrolcontainer="true">
    <box orient="horizontal">
      <spring flex="100%"/>
      <button value="&advancedButton.label;"
                    onclick="openImapAdvanced(event);"/>
    </box>

    <checkbox hidden="true" wsm_persist="true" id="imap.dualUseFolders"/>
    <checkbox hidden="true" wsm_persist="true" id="imap.usingSubscription"/>
    <text hidden="true" wsm_persist="true" id="imap.personalNamespace"/>
    <text hidden="true" wsm_persist="true" id="imap.publicNamespace"/>
    <text hidden="true" wsm_persist="true" id="imap.otherUsersNamespace"/>
    <text hidden="true" wsm_persist="true" id="imap.serverDirectory"/>
    <checkbox hidden="true" wsm_persist="true" id="imap.overrideNamespaces"/>
  </box>

  <!-- News -->
  <box orient="horizontal">
    <checkbox wsm_persist="true" id="nntp.notifyOn"
                value="&maxMessagesStart.label;"/>
    <box iscontrolcontainer="true">
      <textfield wsm_persist="true" id="nntp.maxArticles" size="6"/>
      <text class="label" for="nntp.maxArticles" value="&maxMessagesEnd.label;"/>
    </box>
  </box>
    <box iscontrolcontainer="true" flex="100%">
      <titledbox orient="vertical">
         <title><text value="&abbreviate.label;"/></title>

         <radiogroup orient="vertical" wsm_persist="true" id="nntp.abbreviate">
           <radio group="nntp.abbreviate" wsm_persist="true" data="true" value="&abbreviateOn.label;"/>
           <radio group="nntp.abbreviate" wsm_persist="true" data="false" value="&abbreviateOff.label;"/>
         </radiogroup>
      </titledbox>
  </box>

  <box orient="vertical" iscontrolcontainer="true">
    <text value="&newsrcFilePath.label;" for="nntp.newsrcFilePath"/>
    <textfield wsm_persist="true" size="60" id="nntp.newsrcFilePath"
               datatype="nsIFileSpec"/>
  </box>
  </box>
  <spring flex="100%"/>
  <box orient="vertical">
    <text value="&localPath.label;" for="server.localPath"/>
    <textfield wsm_persist="true" size="60" id="server.localPath"
            datatype="nsIFileSpec"/>
  </box>
</window>
