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

<!DOCTYPE window [
<!ENTITY % filtersDTD SYSTEM "chrome://messenger/locale/FilterListDialog.dtd">%filtersDTD;
]>

<window id="filterListDialog"
  xmlns:nc="http://home.netscape.com/NC-rdf#"
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  windowtype="mailnews:filterlist"
  style="width: 45em; height: 31em;"
  onload="onLoad();"
  onunload="onFilterUnload();"
  onclose="return onFilterClose();"
  persist="width height screenX screenY"
  title="&window.title;">

  <script type="application/javascript" src="chrome://messenger/content/FilterListDialog.js"/>
  <stringbundleset id="stringbundleset">
    <stringbundle id="bundle_filter" src="chrome://messenger/locale/filter.properties"/>
  </stringbundleset>

  <keyset>
    <key key="&closeCmd.key;" modifiers="accel" oncommand="if (onFilterClose()) window.close();"/>
    <key keycode="VK_ESCAPE" oncommand="if (onFilterClose()) window.close();"/>
  </keyset>

  <hbox align="center">
    <label value="&filtersForPrefix.label;"
           accesskey="&filtersForPrefix.accesskey;" control="serverMenu"/>

    <menulist id="serverMenu"
              class="folderMenuItem">
      <menupopup id="serverMenuPopup" type="folder" mode="filters"
                 class="menulist-menupopup"
                 expandFolders="nntp"
                 showFileHereLabel="true"
                 showAccountsFileHere="true"
                 oncommand="onFilterFolderClick(event.target._folder);"/>
    </menulist>
    <textbox id="searchBox"
             flex="1"
             type="search"
             oncommand="rebuildFilterList();"
             emptytext="&searchBox.emptyText;"
             isempty="true"/>
  </hbox>

  <grid flex="1">
    <columns>
      <column flex="1"/>
      <column/>
    </columns>
    <rows>
      <row>
        <separator class="thin"/>
      </row>
      <row>
        <hbox>
          <label id="filterListLabel"
                 control="filterList"
                 flex="1">
            &filterHeader.label;
          </label>
          <label id="countBox"/>
        </hbox>
      </row>

      <row flex="1">
        <vbox>
          <listbox id="filterList" flex="1" onselect="updateButtons();"
                   seltype="multiple"
                   onkeypress="onFilterListKeyPress(event);">
            <listhead>
              <listheader id="nameColumn" label="&nameColumn.label;" flex="1"/>
              <listheader id="activeColumn" label="&activeColumn.label;" minwidth="40px"/>
            </listhead>
          </listbox>
        </vbox>

        <vbox>
          <button id="newButton"
                  label="&newButton.label;"
                  accesskey="&newButton.accesskey;"
                  oncommand="onNewFilter(null);"/>
          <button id="editButton" label="&editButton.label;"
                  accesskey="&editButton.accesskey;"
                  oncommand="onEditFilter();"/>
          <button id="deleteButton"
                  label="&deleteButton.label;"
                  accesskey="&deleteButton.accesskey;"
                  oncommand="onDeleteFilter();"/>
          <spacer flex="1"/>
          <button id="reorderTopButton"
                  label="&reorderTopButton;"
                  accesskey="&reorderTopButton.accessKey;"
                  tooltiptext="&reorderTopButton.toolTip;"
                  oncommand="onTop(event);"/>
          <button id="reorderUpButton"
                  label="&reorderUpButton.label;"
                  accesskey="&reorderUpButton.accesskey;"
                  class="up"
                  oncommand="onUp(event);"/>
          <button id="reorderDownButton"
                  label="&reorderDownButton.label;"
                  accesskey="&reorderDownButton.accesskey;"
                  class="down"
                  oncommand="onDown(event);"/>
          <button id="reorderBottomButton"
                  label="&reorderBottomButton;"
                  accesskey="&reorderBottomButton.accessKey;"
                  tooltiptext="&reorderBottomButton.toolTip;"
                  oncommand="onBottom(event);"/>
          <spacer flex="1"/>
        </vbox>
      </row>
      <row>
        <vbox>
          <separator class="thin"/>
          <hbox align="center">
            <label id="folderPickerPrefix" value="&folderPickerPrefix.label;"
                   accesskey="&folderPickerPrefix.accesskey;"
                   disabled="true" control="runFiltersFolder"/>
            <menulist id="runFiltersFolder" disabled="true" flex="1"
                      class="folderMenuItem"
                      displayformat="verbose">
              <menupopup id="runFiltersPopup"
                         class="menulist-menupopup"
                         type="folder"
                         showFileHereLabel="true"
                         showAccountsFileHere="false"
                         oncommand="onTargetSelect(event);"/>
            </menulist>
          <button id="runFiltersButton"
                  label="&runFilters.label;"
                  accesskey="&runFilters.accesskey;"
                  runlabel="&runFilters.label;"
                  runaccesskey="&runFilters.accesskey;"
                  stoplabel="&stopFilters.label;"
                  stopaccesskey="&stopFilters.accesskey;"
                  oncommand="runSelectedFilters();" disabled="true"/>
          </hbox>
        </vbox>
        <vbox>
          <separator class="thin"/>
            <button label="&viewLogButton.label;"
                    accesskey="&viewLogButton.accesskey;"
                    oncommand="viewLog();"/>

        </vbox>
      </row>
    </rows>
  </grid>

  <separator class="thin"/>

  <statusbar class="chromeclass-status" id="status-bar">
    <statusbarpanel id="statusText" flex="1" crop="right"/>
    <statusbarpanel class="statusbarpanel-progress" collapsed="true" id="statusbar-progresspanel">
      <progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0"/>
    </statusbarpanel>
  </statusbar>

</window>

