<?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://global/skin/"?>
<?xml-stylesheet href="chrome://browser/skin/engineManager.css"?>

<!DOCTYPE dialog SYSTEM "chrome://browser/locale/engineManager.dtd">

<dialog id="engineManager"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        buttons="accept,cancel,extra2"
        buttonlabelextra2="&restoreDefaults.label;"
        buttonaccesskeyextra2="&restoreDefaults.accesskey;"
        onload="gEngineManagerDialog.init();"
        onunload="gEngineManagerDialog.destroy();"
        ondialogaccept="gEngineManagerDialog.onOK();"
        ondialogextra2="gEngineManagerDialog.onRestoreDefaults();"
        title="&engineManager.title;"
        style="&engineManager.style;"
        persist="screenX screenY width height"
        windowtype="Browser:SearchManager">

  <script type="application/javascript"
          src="chrome://browser/content/search/engineManager.js"/>

  <commandset id="engineManagerCommandSet">
    <command id="cmd_remove"
             oncommand="gEngineManagerDialog.remove();"
             disabled="true"/>
    <command id="cmd_moveup"
             oncommand="gEngineManagerDialog.bump(1);"
             disabled="true"/>
    <command id="cmd_movedown"
             oncommand="gEngineManagerDialog.bump(-1);"
             disabled="true"/>
    <command id="cmd_editkeyword"
             oncommand="gEngineManagerDialog.editKeyword();"
             disabled="true"/>
  </commandset>

  <keyset id="engineManagerKeyset">
    <key id="delete" keycode="VK_DELETE" command="cmd_remove"/>
  </keyset>

  <stringbundleset id="engineManagerBundleset">
    <stringbundle id="engineManagerBundle" src="chrome://browser/locale/engineManager.properties"/>
  </stringbundleset>

  <description>&engineManager.intro;</description>
  <separator class="thin"/>
  <hbox flex="1">
    <tree id="engineList" flex="1" rows="10" hidecolumnpicker="true"
          seltype="single" onselect="gEngineManagerDialog.onSelect();">
      <treechildren id="engineChildren" flex="1"
                    ondragstart="onDragEngineStart(event);"/>
      <treecols>
        <treecol id="engineName" flex="4" label="&columnLabel.name;"/>
        <treecol id="engineKeyword" flex="1" label="&columnLabel.keyword;"/>
      </treecols>
    </tree>
    <vbox>
      <spacer flex="1"/>
      <button id="edit"
              label="&edit.label;"
              accesskey="&edit.accesskey;"
              command="cmd_editkeyword"/>
      <button id="up"
              label="&up.label;"
              accesskey="&up.accesskey;"
              command="cmd_moveup"/>
      <button id="down"
              label="&dn.label;"
              accesskey="&dn.accesskey;"
              command="cmd_movedown"/>
      <spacer flex="1"/>
      <button id="remove"
              label="&remove.label;"
              accesskey="&remove.accesskey;"
              command="cmd_remove"/>
    </vbox>
  </hbox>
  <hbox>
    <checkbox id="enableSuggest"
              label="&enableSuggest.label;"
              accesskey="&enableSuggest.accesskey;"/>
  </hbox>
  <hbox>
    <label id="addEngines" class="text-link" value="&addEngine.label;"
           onclick="if (event.button == 0) { gEngineManagerDialog.loadAddEngines(); }"/>
  </hbox>
</dialog>
