mail/base/content/SearchDialog.xul
author Gervase Markham <gerv@gerv.net>
Wed, 30 May 2012 17:48:24 +0100
changeset 12286 84ac3c71109811da751f0ef2d72108075938f094
parent 11972 4b8c1efc5d9f0e3ba7f29eca3224ed0ca9ec817e
child 15245 7eed919c008a26c629e064aa68a378df74bd1602
permissions -rw-r--r--
Bug 757018 - upgrade license to MPL 2.

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

<?xul-overlay href="chrome://messenger/content/searchTermOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>

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

<window id="searchMailWindow"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        onload="searchOnLoad();"
        onunload="onSearchStop(); searchOnUnload();"
        windowtype="mailnews:search"
        title="&searchDialogTitle.label;"
        style="width: 52em; height: 34em;"
        persist="screenX screenY width height sizemode">

  <stringbundle id="bundle_search" src="chrome://messenger/locale/search.properties"/>
  <stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
  <stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>

  <script type="application/javascript" src="chrome://messenger/content/mailWindow.js"/>
  <script type="application/javascript" src="chrome://messenger/content/folderDisplay.js"/>
  <script type="application/javascript" src="chrome://messenger/content/messageDisplay.js"/>
  <script type="application/javascript" src="chrome://messenger/content/threadPane.js"/>
  <script type="application/javascript" src="chrome://messenger/content/msgMail3PaneWindow.js"/>
  <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
  <script type="application/javascript" src="chrome://messenger/content/mailCommands.js"/>
  <script type="application/javascript" src="chrome://messenger/content/mailWindowOverlay.js"/>
  <script type="application/javascript" src="chrome://messenger/content/commandglue.js"/>
  <script type="application/javascript" src="chrome://messenger/content/SearchDialog.js"/>

  <!-- We need this for a SetFolderPicker call, until we de-rdfify this file -->
  <script type="application/javascript" src="chrome://messenger/content/msgFolderPickerOverlay.js"/>
  <script type="application/javascript" src="chrome://messenger/content/widgetglue.js"/>

  <commands id="commands">
    <commandset id="mailSearchItems"
                commandupdater="true"
                events="mail-search"
                oncommandupdate="goUpdateSearchItems(this)">
      <command id="cmd_open" oncommand="goDoCommand('cmd_open')" disabled="true"/>
      <command id="button_delete" oncommand="goDoCommand('button_delete')" disabled="true"/>
      <command id="open_in_folder_button" oncommand="goDoCommand('open_in_folder_button')" disabled="true"/>
      <command id="saveas_vf_button" oncommand="goDoCommand('saveas_vf_button')" disabled="false"/>
      <command id="file_message_button"/>
      <command id="cmd_delete"/>
      <command id="cmd_shiftDelete" oncommand="goDoCommand('cmd_shiftDelete');"/>
    </commandset>
  </commands>

  <keyset id="mailKeys">
    <key id="key_delete" oncommand="goDoCommand('cmd_delete');"/>
    <key key="&closeCmd.key;" modifiers="accel" oncommand="window.close();"/>
    <key keycode="VK_ESCAPE" oncommand="window.close();"/>
#ifdef XP_MACOSX
      <key id="key_delete2" oncommand="goDoCommand('cmd_delete');"/>
      <key id="cmd_shiftDelete" keycode="VK_BACK"
           oncommand="goDoCommand('cmd_shiftDelete');" modifiers="shift"/>
      <key id="cmd_shiftDelete2" keycode="VK_DELETE"
           oncommand="goDoCommand('cmd_shiftDelete');" modifiers="shift"/>
#else
      <key id="cmd_shiftDelete" keycode="VK_DELETE"
           oncommand="goDoCommand('cmd_shiftDelete');" modifiers="shift"/>
#endif
  </keyset>

  <dummy class="usesMailWidgets"/>
    
    <vbox id="searchTerms" flex="3" persist="height">
      <vbox>
         <hbox align="center">
         <label value="&searchHeading.label;" accesskey="&searchHeading.accesskey;"
                control="searchableFolders"/>
         <menulist id="searchableFolders" flex="2">
           <menupopup class="searchPopup" oncommand="updateSearchFolderPicker(this.getAttribute('uri'));"/>
         </menulist>
         <spacer flex="10"/>
         <button id="search-button" oncommand="onSearchButton(event);" default="true"/>
        </hbox>

         <hbox align="center">
           <checkbox id="checkSearchSubFolders"
                     label="&searchSubfolders.label;"
                     accesskey="&searchSubfolders.accesskey;"
                     checked="true"
                     persist="checked"/>
           <spacer flex="10"/>
           <button label="&resetButton.label;" oncommand="onResetSearch(event);" accesskey="&resetButton.accesskey;"/>
         </hbox>
         <hbox align="center">
           <checkbox id="checkSearchOnline"
                     label="&searchOnServer.label;"
                     accesskey="&searchOnServer.accesskey;"
                     oncommand="updateSearchLocalSystem();"
                     persist="checked"/>
         </hbox>
      </vbox>

      <hbox flex="1">
        <vbox id="searchTermListBox" flex="1"/>
      </hbox>
    </vbox>

    <splitter id="gray_horizontal_splitter" persist="state"/>

    <vbox id="searchResults" flex="4" persist="height">
      <vbox id="searchResultListBox" flex="1">
        <tree id="threadTree" class="plain" persist="lastfoldersent" flex="1"
              enableColumnDrag="true" _selectDelay="500" lastfoldersent="false"
              disableKeyNavigation="true"
              context="mailContext"
              onkeypress="ThreadPaneKeyPress(event);"
              onselect="ThreadPaneSelectionChanged();">
          <treecols id="threadCols" pickertooltiptext="&columnChooser.tooltip;">
            <treecol id="threadCol" persist="hidden ordinal" fixed="true" cycler="true"
                     class="treecol-image threadColumnHeader" currentView="unthreaded"
                     label="&threadColumn.label;" tooltiptext="&threadColumn.tooltip;"/>
            <splitter class="tree-splitter"/>
            <treecol id="subjectCol" persist="hidden ordinal width" flex="7" ignoreincolumnpicker="true"
                     label="&subjectColumn.label;" tooltiptext="&subjectColumn.tooltip;"/>
            <splitter class="tree-splitter"/>
            <treecol id="junkStatusCol" persist="hidden ordinal width" fixed="true" cycler="true"
                     class="treecol-image junkStatusHeader"
                     label="&junkStatusColumn.label;" tooltiptext="&junkStatusColumn.tooltip;"/>
            <splitter class="tree-splitter"/>
            <treecol id="senderCol" persist="hidden swappedhidden ordinal width" flex="4" 
                     hidden="false" swappedhidden="true"
                     label="&fromColumn.label;" tooltiptext="&fromColumn.tooltip;"/>
            <splitter class="tree-splitter"/>
            <treecol id="recipientCol" persist="hidden swappedhidden ordinal width" flex="4" 
                     hidden="true" swappedhidden="false"
                     label="&recipientColumn.label;" tooltiptext="&recipientColumn.tooltip;"/>
            <splitter class="tree-splitter"/>
            <treecol id="unreadButtonColHeader" persist="hidden ordinal" fixed="true" cycler="true"
                     class="treecol-image readColumnHeader"
                     label="&readColumn.label;" tooltiptext="&readColumn.tooltip;"/>
            <splitter class="tree-splitter"/>
            <treecol id="dateCol" persist="hidden ordinal width" flex="2"
                     label="&dateColumn.label;" tooltiptext="&dateColumn.tooltip;"/>
            <splitter class="tree-splitter"/>
            <treecol id="statusCol" persist="hidden ordinal width" flex="1" hidden="true"
                     label="&statusColumn.label;" tooltiptext="&statusColumn.tooltip;"/>
            <splitter class="tree-splitter"/>
            <treecol id="sizeCol" persist="hidden ordinal width" flex="1" hidden="true"
                     label="&sizeColumn.label;" tooltiptext="&sizeColumn.tooltip;"/>
            <splitter class="tree-splitter"/>
            <treecol id="flaggedCol" persist="hidden ordinal" fixed="true" cycler="true" hidden="true"
                     class="treecol-image flagColumnHeader"
                     label="&starredColumn.label;" tooltiptext="&starredColumn.tooltip;"/>
            <splitter class="tree-splitter"/>
            <treecol id="tagsCol" persist="hidden ordinal width" flex="1" hidden="true"
                     label="&tagsColumn.label;" tooltiptext="&tagsColumn.tooltip;"/>
            <splitter class="tree-splitter"/>
            <treecol id="priorityCol" persist="hidden ordinal width" flex="1"
                     label="&priorityColumn.label;" tooltiptext="&priorityColumn.tooltip;"/>
            <splitter class="tree-splitter"/>
            <treecol id="unreadCol" persist="hidden ordinal width" flex="1" hidden="true"
                     label="&unreadColumn.label;" tooltiptext="&unreadColumn.tooltip;"/>
            <splitter class="tree-splitter"/>
            <treecol id="totalCol" persist="hidden ordinal width" flex="1" hidden="true"
                     label="&totalColumn.label;" tooltiptext="&totalColumn.tooltip;"/>
            <splitter class="tree-splitter"/>
            <treecol id="locationCol" persist="width" flex="1" hidden="true" ignoreincolumnpicker="true"
                     label="&locationColumn.label;" tooltiptext="&locationColumn.tooltip;"/>
            <splitter class="tree-splitter"/>
            <treecol id="idCol" persist="hidden ordinal width" flex="1" hidden="true"
                     label="&idColumn.label;" tooltiptext="&idColumn.tooltip;"/>
          </treecols>
          <treechildren ondraggesture="ThreadPaneOnDragStart(event);"/>
        </tree>
      </vbox>
      <hbox align="start"> 
        <button label="&openButton.label;" id="openButton" command="cmd_open" accesskey="&openButton.accesskey;"/>
        <button id="fileMessageButton" type="menu" label="&fileButton.label;"
                accesskey="&fileButton.accesskey;"
                observes="file_message_button"
                oncommand="MoveMessageInSearch(event.target)">
        <menupopup type="folder" showFileHereLabel="true" mode="filing"
                   fileHereLabel="&fileHereMenu.label;"
                   fileHereAccessKey="&fileHereMenu.accesskey;"/>
      </button>

      <button label="&deleteButton.label;" id="deleteButton" command="button_delete" accesskey="&deleteButton.accesskey;"/>
      <button label="&openInFolder.label;" id="openInFolderButton" command="open_in_folder_button" accesskey="&openInFolder.accesskey;" />
      <button label="&saveAsVFButton.label;" id="saveAsVFButton" command="saveas_vf_button" accesskey="&saveAsVFButton.accesskey;" />
      <spacer flex="1" />
    </hbox>      
  </vbox>

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

</window>