<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
<!--

 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://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/preferences/preferences.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/content/charsetList.css" type="text/css"?>

<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/folderProps.dtd">

<dialog
  id="folderPropertiesDialog"
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  title="&folderProps.windowtitle.label;"
  buttons="accept,cancel"
  onload="folderPropsOnLoad();" style="width: 56ch;"
  ondialogaccept="return folderPropsOKButton();">

  <stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
  <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
  <script type="application/javascript" src="chrome://messenger/content/retention.js"/>
  <script type="application/javascript" src="chrome://messenger/content/folderProps.js"/>
  <script type="application/javascript">
  <![CDATA[
    Components.utils.import("resource://gre/modules/Services.jsm");
    Services.obs.notifyObservers(null, "charsetmenu-selected", "other");
  ]]>
  </script>

<tabbox id="folderPropTabBox">
  <tabs id="folderPropTabs">
    <tab id="GeneralTab" label="&generalInfo.label;"/>
    <tab id="Retention" label="&retention.label;"/>
    <tab id="SynchronizationTab" hidefor="movemail,pop3,rss,none" label="&folderSynchronizationTab.label;"/>
    <tab id="SharingTab" hidefor="movemail,pop3,rss,none,nntp" label="&folderSharingTab.label;"/>
    <tab id="QuotaTab" hidefor="movemail,pop3,rss,none,nntp" label="&folderQuotaTab.label;"/>
  </tabs>
  <tabpanels id="folderPropTabPanels">

    <vbox id="GeneralPanel">
      <hbox id="nameBox" align="center">
        <label value="&folderProps.name.label;" control="name"
               accesskey="&folderProps.name.accesskey;"/>
        <textbox id="name" readonly="true" oninput="doEnabling();" flex="1"/>
      </hbox>
      <hbox align="center">
        <label value="&folderProps.location.label;" control="location"
               accesskey="&folderProps.location.accesskey;"/>
        <textbox id="location" readonly="true" flex="1"  class="uri-element"/>
      </hbox>
      <vbox>
        <spacer height="2"/>
        <hbox align="center">
          <label value="&numberOfMessages.label;"/>
          <label id="numberOfMessages" value="&numberUnknown.label;"/>
          <spacer flex="1"/>
          <label value="&sizeOnDisk.label;"/>
          <label id="sizeOnDisk" value="&sizeUnknown.label;"/>
        </hbox>
        <spacer height="2"/>
      </vbox>
      <checkbox id="folderIncludeInGlobalSearch" hidefor="nntp"
                label="&folderIncludeInGlobalSearch.label;"
                accesskey="&folderIncludeInGlobalSearch.accesskey;"/>
      <checkbox hidefor="movemail,pop3,none,nntp"
                id="folderCheckForNewMessages"
                label="&folderCheckForNewMessages2.label;"
                accesskey="&folderCheckForNewMessages2.accesskey;"/>
      <vbox>
        <hbox align="center" valign="middle">
          <label value="&folderCharsetFallback.label;"
                 accesskey="&folderCharsetFallback.accesskey;"
                 control="folderCharsetList"/>
          <menulist id="folderCharsetList" type="charset"/>
        </hbox>
        <checkbox class="indent" id="folderCharsetOverride"
                  label="&folderCharsetEnforce.label;"
                  accesskey="&folderCharsetEnforce.accesskey;"/>
      </vbox>
      <groupbox id="folderRebuildSummaryGroupBox" align="baseline">
        <grid>
          <columns>
            <column flex="1"/>
            <column/>
          </columns>
          <rows>
            <row>
              <description id="folderRebuildSummaryExplanation">&folderRebuildSummaryFile.explanation;</description>
              <vbox>
                <button id="folderRebuildSummaryButton"
                        label="&folderRebuildSummaryFile2.label;"
                        oncommand="RebuildSummaryInformation();"
                        accesskey="&folderRebuildSummaryFile2.accesskey;"
                        tooltiptext="&folderRebuildSummaryFileTip2.label;"
                        align="center"/>
              </vbox>
            </row>
          </rows>
        </grid>
      </groupbox>
    </vbox>

    <vbox id="RetentionPanel" align="start">
    <description hidefor="imap,pop3" class="desc">&retentionCleanup.label;</description>
    <description hidefor="movemail,pop3,rss,none,nntp" class="desc">&retentionCleanupImap.label;</description>
    <description hidefor="movemail,imap,rss,none,nntp" class="desc">&retentionCleanupPop.label;</description>

        <hbox align="center" class="indent">
          <checkbox wsm_persist="true" id="retention.useDefault" accesskey="&retentionUseAccount.accesskey;"
              label="&retentionUseAccount.label;" checked="true" oncommand="onUseDefaultRetentionSettings()"/>
        </hbox>
        <vbox class="indent">
          <hbox class="indent">
            <radiogroup wsm_persist="true" id="retention.keepMsg" aria-labelledby="retention.useDefault">
              <radio wsm_persist="true" value="1" accesskey="&retentionKeepAll.accesskey;"
                      label="&retentionKeepAll.label;" oncommand="onCheckKeepMsg();"/>
              <hbox flex="1" align="center">
                <radio wsm_persist="true" id="keepNewMsg" accesskey="&retentionKeepRecent.accesskey;"
                        value="3" label="&retentionKeepRecent.label;" oncommand="onCheckKeepMsg();"/>
                <textbox wsm_persist="true" id="retention.keepNewMsgMin"
                         type="number" min="1" increment="10" size="4" value="2000"
                         aria-labelledby="keepNewMsg retention.keepNewMsgMin retention.keepNewMsgMinLabel"/>
                <label value="&message.label;" control="retention.keepNewMsgMin" id="retention.keepNewMsgMinLabel"/>
              </hbox>
              <hbox flex="1" align="center">
                <radio wsm_persist="true" id="keepMsg" accesskey="&retentionDeleteMsg.accesskey;"
                        value="2" label="&retentionDeleteMsg.label;" oncommand="onCheckKeepMsg();"/>
                <textbox wsm_persist="true" id="retention.keepOldMsgMin"
                         type="number" min="1" size="2" value="30"
                         aria-labelledby="keepMsg retention.keepOldMsgMin retention.keepOldMsgMinLabel"/>
                <label value="&daysOld.label;" control="retention.keepOldMsgMin" id="retention.keepOldMsgMinLabel"/>
              </hbox>
            </radiogroup>
          </hbox>
          <hbox class="indent">
            <vbox>
              <checkbox id="retention.keepUnread" wsm_persist="true"
                        label="&retentionKeepUnreadHidden.label;"
                        class="keepUnreadOnly" hidden="true"
                        observes="retention.keepMsg" checked="false"/>
              <checkbox id="retention.applyToFlagged" wsm_persist="true"
                        label="&retentionApplyToFlagged.label;"
                        accesskey="&retentionApplyToFlagged.accesskey;"
                        observes="retention.keepMsg" checked="true"/>
            </vbox>
          </hbox>
        </vbox>
    </vbox>

    <vbox id="SyncPanel" valign="top" align="start">
      <vbox>
        <checkbox hidefor="nntp"
                  wsm_persist="true" id="offline.selectForOfflineFolder"
                  label="&offlineFolder.check.label;"
                  accesskey="&offlineFolder.check.accesskey;"/>
        <checkbox hidefor="imap"
                  wsm_persist="true" id="offline.selectForOfflineNewsgroup"
                  label="&selectofflineNewsgroup.check.label;"
                  accesskey="&selectofflineNewsgroup.check.accesskey;"/>
      </vbox>
      <button hidefor="nntp" label="&offlineFolder.button.label;"
              oncommand="onOfflineFolderDownload();" accesskey="&offlineFolder.button.accesskey;"
              id="offline.offlineFolderDownloadButton" orient="right"/>
      <button hidefor="imap" label="&offlineNewsgroup.button.label;"
              oncommand="onOfflineFolderDownload();" accesskey="&offlineNewsgroup.button.accesskey;"
              id="offline.offlineNewsgroupDownloadButton" orient="right"/>
    </vbox>

    <vbox id="SharingPanel" valign="top">
      <hbox align="start">
        <label value="&folderType.label;" id="folderTypeLabel"/>
        <label value="" id="folderType.text"/>
      </hbox>
      <vbox align="start">
        <label value="" id="folderDescription.text"/>
        <label value=" "/>
        <label value="&permissionsDesc.label;" id="permissionsDescLabel"/>

        <description id="folderPermissions.text"></description>
      </vbox>
      <spacer flex="100%"/>
      <vbox align="start">
        <button hidefor="movemail,pop3,none,rss,nntp" label="&privileges.button.label;"
                oncommand="onFolderPrivileges();" accesskey="&privileges.button.accesskey;"
                id="imap.FolderPrivileges" orient="right"/>
      </vbox>
    </vbox>

    <vbox id="QuotaPanel" valign="top">
      <label id="folderQuotaStatus" flex="1"/>

      <grid id="folderQuotaData" hidden="true" flex="1">
        <columns>
          <column/>
          <column flex="1"/>
        </columns>
        <rows>
          <row align="center">
            <label value="&folderQuotaRoot.label;" control="quotaRoot"/>
            <textbox id="quotaRoot" readonly="true"/>
          </row>
          <row>
            <label value="&folderQuotaUsage.label;"/>
            <description id="quotaUsedFree"/>
          </row>
          <row align="center">
            <label value="&folderQuotaStatus.label;"/>
            <hbox align="center">
              <progressmeter id="quotaPercentageBar" mode="determined" value="0%"/>
              <label id="quotaPercentUsed"/>
            </hbox>
          </row>
        </rows>
      </grid>
     </vbox>
  </tabpanels>
</tabbox>

</dialog>
