<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/

Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.

The Original Code is Mozilla Communicator client code, released
March 31, 1998.

The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
 Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.

Contributor(s):
  Håkan Waara <hwaara@chello.se>

-->

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

<!DOCTYPE window SYSTEM "chrome://messenger/locale/FilterEditor.dtd">

<window class="dialog"
  id="FilterEditor"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  title="&window.title;"
  orient="vertical"
  windowtype="mailnews:filtereditor"
  width="510" height="360"
  persist="width height screenX screenY"
  onload="filterEditorOnLoad('msgFccFolderPicker');">

  <dummy class="usesMailWidgets"/>
  <stringbundleset id="stringbundleset">
    <stringbundle id="bundle_filter" src="chrome://messenger/locale/filter.properties"/>
  </stringbundleset>
  <!-- XXX: only mailWidgets.xml requires strres.js (<script> isn't valid in XBL yet - see hyatt)-->
  <script type="application/x-javascript" src="chrome://global/content/strres.js"/>
  <script type="application/x-javascript" src="chrome://messenger/content/mailWindowOverlay.js"/>
  <script type="application/x-javascript" src="chrome://messenger/content/mailCommands.js"/>
  <script type="application/x-javascript" src="chrome://messenger/content/FilterEditor.js"/>

  <keyset id="dialogKeys"/>
  
  <hbox autostretch="never">
    <text class="label" value="&filterName.label;"/>
    <textbox flex="50%" id="filterName"/>
    <spring flex="50%"/>
  </hbox>

  <separator/>

  <vbox flex="1">
    <text class="label" value="&conditionDesc.label;"/>
    <vbox id="searchTermListBox" flex="1"/>
  </vbox>

  <separator/>

  <vbox>
    <text class="label" value="&filterActionDesc.label;" autostretch="never"/>
    <hbox autostretch="never">
      <menulist class="indent" id="actionMenu" oncommand="onActionChanged(event)">
        <menupopup>
          <menuitem value="1" actionvalueindex="0" label="&moveToFolder.label;"/>
          <menuitem value="2" actionvalueindex="1" label="&changePriority.label;"/>
          <menuitem value="3" actionvalueindex="2" label="&delete.label;"/>
          <menuitem value="4" actionvalueindex="2" label="&markRead.label;"/>
          <menuitem value="7" actionvalueindex="2" label="&markFlagged.label;"/>
        </menupopup>
      </menulist>
      <!-- JS stuff depends on this deck being present, don't remove! -->
      <deck id="actionValueDeck">
        <menulist id="actionTargetFolder"/>
        <menulist id="actionValuePriority">
          <menupopup>
            <!-- see MailNewsTypes2.idl -->
            <menuitem value="6" label="&highestPriorityCmd.label;"/>
            <menuitem value="5" label="&highPriorityCmd.label;"/>
            <menuitem value="4" label="&normalPriorityCmd.label;"/>
            <menuitem value="3" label="&lowPriorityCmd.label;"/>
            <menuitem value="2" label="&lowestPriorityCmd.label;"/>
          </menupopup>
        </menulist>
        <text id="actionValueNone"/>
      </deck>
      <spring flex="100%"/>
      <button id="newFolderButton" label="&newFolderButton.label;" 
              oncommand="MsgNewFolder(SearchNewFolderOkCallback);"/>
    </hbox>
  </vbox>

  <separator/>

  <hbox id="okCancelButtonsRight"/>

</window>
