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

  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.org code.
 
  The Initial Developer of the Original Code is Netscape
  Communications Corporation.  Portions created by Netscape are
  Copyright (C) 1998 Netscape Communications Corporation. All
  Rights Reserved.

  Original Author(s):
    Robert John Churchill    <rjc@netscape.com>

  Contributor(s): 

-->

<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/search/search.css" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/search/search-editor.css" type="text/css"?>

<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>

<!DOCTYPE window SYSTEM "chrome://communicator/locale/search/search-editor.dtd">

<window title="&window.title.label;" id="search-editor-window"
	xmlns:html="http://www.w3.org/1999/xhtml"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:web="http://home.netscape.com/WEB-rdf#"
	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
	width="540" height="340" x="20" y="20" persist="width height x y" orient="vertical"
	windowtype="internetsearch:editor" class="dialog"
	onload="doLoad()" onunload="doUnload()">

	<script language="Javascript" src="chrome://global/content/strres.js"></script>
	<script language="Javascript" src="chrome://communicator/content/search/search-editor.js"></script>

  <keyset id="keyset"/>
  
  <box flex="1">
  
    <box orient="vertical" flex="1">
      <tree multiple="true" flex="1" class="inset" id="allengines" ref="NC:SearchEngineRoot" datasources="rdf:internetsearch">
        <template>
          <treechildren>
            <treeitem uri="..." loading="rdf:http://home.netscape.com/NC-rdf#loading">
              <treerow>
                <treecell class="treecell-indent" crop="right" 
                          src="rdf:http://home.netscape.com/NC-rdf#Icon"
                          value="rdf:http://home.netscape.com/NC-rdf#Name" />
              </treerow>
            </treeitem>
          </treechildren>
        </template>
    
        <treecolgroup>
          <treecol id="NameColumn" resource="http://home.netscape.com/NC-rdf#Name" sortActive="true" sortDirection="ascending" flex="1"/>
        </treecolgroup>
    
        <treehead>
          <treerow>
            <treecell class="treecell-header sortDirectionIndicator outset" observes="NameColumn"
                      value="&allengines.label;" resource="http://home.netscape.com/NC-rdf#Name"
                      sortActive="true" sortDirection="ascending"
                      onclick="return doSort('NameColumn', null);" />
          </treerow>
        </treehead>

        <treechildren flex="1"/>
      </tree>
      <box>
        <button class="dialog" id="add-button" oncommand="return AddEngine()" value="&add.label;" />
      </box>
    </box>
    
    <separator class="groove" orient="vertical" style="width: 0px;"/>
        
  	<box orient="vertical" flex="1">
      <box autostretch="never">
        <text class="label" value="&category.label;"/>
      	<menulist id="categoryList" ref="NC:SearchCategoryRoot" datasources="rdf:null" flex="1">
          <template>
            <menupopup>
              <menuitem uri="rdf:*" oncommand="return chooseCategory(this);"
                        data="rdf:http://home.netscape.com/NC-rdf#category"
                        value="rdf:http://home.netscape.com/NC-rdf#title"/>
            </menupopup>
          </template>
          <menupopup id="categoryPopup"/>
        </menulist>
      </box>
      
      <box>
        <button class="dialog" id="new-category-button" oncommand="NewCategory()" value="&new.category.label;" flex="1"/>
        <button class="dialog" id="rename-category-button" oncommand="RenameCategory()" value="&rename.category.label;" flex="1"/>
        <button class="dialog" id="remove-category.buttom" oncommand="RemoveCategory()" value="&remove.category.label;" flex="1"/>
      </box>
      
      <separator class="thin"/>

      <box flex="1">
    		<tree class="inset" multiple="true" flex="1" id="engineList" style="height: 0px;"
              datasources="rdf:internetsearch" onselect="doMoveDirectionEnabling()">
          <template>
            <treechildren>
              <treeitem uri="...">
                <treerow>
                  <treecell class="treecell-iconic" crop="right" 
                            src="rdf:http://home.netscape.com/NC-rdf#Icon"
                            value="rdf:http://home.netscape.com/NC-rdf#Name" flex="1" />
                </treerow>
              </treeitem>
            </treechildren>
          </template>
          
          <treecol id="EngineColumn" resource="http://home.netscape.com/NC-rdf#Name" flex="1" />
          <treehead>
            <treerow>
              <treecell class="treecell-header sortDirectionIndicator outset" observes="EngineColumn"
                        value="&engine.column.label;" onclick="return doSort('EngineColumn', null);"
                        resource="http://home.netscape.com/NC-rdf#Name" />
            </treerow>
          </treehead>
          
          <treechildren flex="1"/>
          
        </tree>
        <box orient="vertical">
          <spring flex="1"/>
       	  <button class="up" oncommand="MoveUp();" id="up" disabled="true"/>
      		<button class="down" oncommand="MoveDown();" id="down" disabled="true"/>
          <spring flex="1"/>
        </box>
      </box>          
      <box>
        <button class="dialog" id="remove-button" oncommand="return RemoveEngine()" value="&remove.label;" />
      </box>		
      
    </box>
  
  </box>

  <separator/>
  <box id="okCancelButtonsRight"/>

</window>
