<?xml version="1.0"?>
<?xml-stylesheet href="findfile.css" type="text/css"?>

<window
    id="findfile-window"
    title="Find Files"
    persist="screenX screenY width height"
    orient="horizontal"
    onload="initSearchList()"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

<script src="findfile.js"/>

<popupset>
  <popup id="editpopup">
    <menuitem label="Cut" accesskey="t"/>
    <menuitem label="Copy" accesskey="c"/>
    <menuitem label="Paste" accesskey="p" disabled="true"/>
  </popup>
</popupset>

<keyset>
  <key id="cut_cmd" modifiers="accel" key="X"/>
  <key id="copy_cmd" modifiers="accel" key="C"/>
  <key id="paste_cmd" modifiers="accel" key="V"/>
  <key id="close_cmd" keycode="VK_ESCAPE" oncommand="window.close();"/>
</keyset>

<vbox flex="1">

<toolbox>
<menubar id="findfiles-menubar">
  <menu id="file-menu" label="File" accesskey="f">
    <menupopup id="file-popup">
      <menuitem label="Open Search..." accesskey="o"/>
      <menuitem label="Save Search..." accesskey="s"/>  
      <menuseparator/>
      <menuitem label="Close" accesskey="c" key="close_cmd" oncommand="window.close();"/>
    </menupopup>
  </menu>
  <menu id="edit-menu" label="Edit" accesskey="e">
    <menupopup id="edit-popup">
       <menuitem label="Cut" accesskey="t" key="cut_cmd"/>
       <menuitem label="Copy" accesskey="c" key="copy_cmd"/>
       <menuitem label="Paste" accesskey="p" key="paste_cmd" disabled="true"/>
    </menupopup>
  </menu>
 </menubar>

    <toolbar id="findfiles-toolbar">
      <toolbarbutton id="opensearch" label="Open"/>
      <toolbarbutton id="savesearch" label="Save"/>
    </toolbar>
  </toolbox>

<tabbox>
  <tabs>
    <tab label="Search" selected="true"/>
    <tab label="Options"/>
  </tabs>

  <tabpanels>
   <tabpanel id="searchpanel" orient="vertical" context="editpopup">

  <description>
    Enter your search criteria below and select the Find button to begin
    the search.
  </description>

<spacer class="titlespace"/>

<groupbox orient="horizontal">
  <caption label="Search Criteria"/>
    <menulist id="searchtype">
      <menupopup>
        <menuitem label="Name"/>
        <menuitem label="Size"/>
        <menuitem label="Date Modified"/>
      </menupopup>
    </menulist>
    <spacer class="springspace"/>
    <menulist id="searchmode">
      <menupopup>
        <menuitem label="Is"/>
        <menuitem label="Is Not"/>
      </menupopup>
    </menulist>
    <spacer class="springspace"/>

    <menulist id="find-text" flex="1"
              editable="true"
              datasources="file:///mozilla/recents.rdf"
              ref="urn:findfile:recent">
      <template>
        <menupopup>
          <menuitem label="rdf:http://www.example.com/recent#Label" uri="rdf:*"/>
        </menupopup>
      </template>
    </menulist>
  </groupbox>
</tabpanel>
   <tabpanel id="optionspanel" orient="vertical">
    <checkbox id="casecheck" label="Case Sensitive Search"/>
    <checkbox id="wordscheck" label="Match Entire Filename"/>
   </tabpanel>

 </tabpanels>
</tabbox>

<tree id="results" style="display: none;" flex="1">
  <treecols>
    <treecol id="name" label="Filename" flex="1"/>
    <treecol id="location" label="Location" flex="2"/>
    <treecol id="size" label="Size" flex="1"/>
  </treecols>

  <treechildren>
   <treeitem>
     <treerow>
       <treecell label="mozilla"/>
       <treecell label="/usr/local"/>
       <treecell label="2520 bytes"/>
     </treerow>
   </treeitem>
  </treechildren>
</tree>
 <splitter id="splitbar" resizeafter="grow" style="display:none;"/>

  <spacer style="height: 10px"/>

  <hbox>
    <progressmeter id="progmeter" value="50%" style="display: none;"/>
    <spacer flex="1"/>
    <button id="find-button" label="Find" default="true" oncommand="doFind();"/>
    <button id="cancel-button" label="Cancel" oncommand="window.close();"/>
  </hbox>

</vbox>

</window>

