<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
   -
   - The contents of this file are subject to the Mozilla 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/MPL/
   -
   - 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 the Initial Developer are Copyright (C) 1998
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -   Blake Ross <blaker@netscape.com> (original history.xul)
   -   Ben Goodger <beng@google.com> (places organizer)
   -   Annie Sullivan <annie.sullivan@gmail.com> (places organizer)
   -   Asaf Romano <mano@mozilla.com> (places organizer)
   -   Ehsan Akhgari <ehsan.akhgari@gmail.com> (places organizer)
   -   Dietrich Ayala <dietrich@mozilla.com> (places organizer)
   -   Robert Kaiser <kairo@kairo.at> (combining history.xul with places)
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either the GNU General Public License Version 2 or later (the "GPL"), or
   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the LGPL or the GPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   -
   - ***** END LICENSE BLOCK ***** -->

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

<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/history/placesOverlay.xul"?>

<!DOCTYPE window [
<!ENTITY % historyDTD SYSTEM "chrome://communicator/locale/history/history.dtd">
%historyDTD;
<!ENTITY % editMenuOverlayDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
%editMenuOverlayDTD;
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
%globalDTD;
]>

<window title="&historyWindowTitle.label;" id="history-window"
        onload="HistoryCommonInit();"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        width="500" height="400"
        persist="width height screenX screenY sizemode"
        windowtype="history:manager">

  <commandset id="tasksCommands">
    <!-- File Menu -->
    <command id="cmd_close" oncommand="window.close()"/>
    <command id="cmd_quit"/>
    <command id="bm_cmd_saveas"/>
    <!-- Search Box -->
    <command id="cmd_search_focus"
             oncommand="focusElement(gSearchBox);"/>
  </commandset>
  <commandset id="selectEditMenuItems">
    <command id="cmd_cut"/>
    <command id="cmd_copy"/>
    <command id="cmd_delete"/>
    <command id="cmd_selectAll"/>
  </commandset>
  <commandset id="placesCommands"/>

  <broadcaster id="Communicator:WorkMode"/>

  <keyset id="tasksKeys">
    <!-- File Menu -->
    <key id="key_close"/>
    <key id="key_quit"/>
    <!-- Edit Menu -->
    <key id="key_cut"/>
    <key id="key_copy"/>
    <key id="key_delete"/>
    <key id="key_delete2"/>
    <key id="key_selectAll"/>
    <!-- Search Box -->
    <key id="key_search_focus"
         command="cmd_search_focus"
         key="&search.key;"
         modifiers="accel"/>
  </keyset>

  <popupset id="placesPopupset">
    <popup id="placesContext"/>
  </popupset>

  <toolbox id="history-toolbox">
  <menubar id="history-menu"
           grippytooltiptext="&menuBar.tooltip;"
           chromedir="&locale.dir;">
    <menu id="menu_File">
      <menupopup id="menu_FilePopup">
        <menuitem id="menu_close"/>
      </menupopup>
    </menu>

    <menu id="menu_Edit">
      <menupopup>
        <menuitem id="menu_cut"/>
        <menuitem id="menu_copy"/>
        <menuitem id="menu_delete"/>
        <menuitem id="menu_deleteByHostname" command="placesCmd_delete:hostname"/>
        <menuitem id="menu_deleteByDomain" command="placesCmd_delete:domain"/>
        <menuseparator/>
        <menuitem id="menu_selectAll"/>
      </menupopup>
    </menu>
    <menu id="menu_View">
      <menupopup id="viewPopup"/>
    </menu>
    <menu id="tasksMenu"/>
    <menu id="windowMenu"/>
    <menu id="menu_Help"/>
  </menubar>
  <toolbar class="chromeclass-toolbar"
           id="placesToolbar"
           align="center"
           grippytooltiptext="&searchBar.tooltip;"
           chromedir="&locale.dir;">
    <textbox id="search-box"
             clickSelectsAll="true"
             type="search"
             emptytext="&search.emptytext;"
             oncommand="searchHistory(this.value);"/>
  </toolbar>
  </toolbox>

  <tree id="historyTree"
        class="placesTree plain"
        context="placesContext"
        flex="1" type="places"
        enableColumnDrag="true"
        onselect="historyOnSelect();"
        onkeypress="if (event.keyCode == KeyEvent.DOM_VK_RETURN) PlacesUIUtils.openNodeWithEvent(gHistoryTree.selectedNode, event);"
        ondblclick="if (event.button == 0) PlacesUIUtils.openNodeWithEvent(gHistoryTree.selectedNode, event);"
        onclick="if (event.button == 1) PlacesUIUtils.openNodeWithEvent(gHistoryTree.selectedNode, event);">
    <treecols context="">
      <treecol label="&col.title.label;" id="Name" flex="4"
               persist="width hidden ordinal sortActive sortDirection"/>
      <splitter class="tree-splitter"/>
      <treecol label="&col.url.label;" id="URL" flex="4"
               persist="width hidden ordinal sortActive sortDirection"/>
      <splitter class="tree-splitter"/>
      <treecol label="&col.lastvisit.label;" id="Date" flex="1"
               persist="width hidden ordinal sortActive sortDirection"/>
      <splitter class="tree-splitter"/>
      <treecol label="&col.visitcount.label;" id="VisitCount" flex="1" hidden="true"
               persist="width hidden ordinal sortActive sortDirection"/>
    </treecols>
    <treechildren/>
  </tree>
  <statusbar id="status-bar" class="chromeclass-status">
    <statusbarpanel id="statusbar-display" flex="1"/>
    <statusbarpanel class="statusbarpanel-iconic" id="offline-status"/>
  </statusbar>

</window>
