<?xml version="1.0"?> <!-- -*- Mode: xml; 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.
 
  Contributor(s): 
       Blake Ross <blaker@netscape.com>

-->

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

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

<!DOCTYPE window SYSTEM "chrome://communicator/locale/history/history.dtd" >

<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">

  <stringbundle id="historyBundle"
                src="chrome://communicator/locale/history/history.properties"/>
  <stringbundle id="sortBundle" src="chrome://global/locale/nsTreeSorting.properties"/>

<commandset id="tasksCommands">
  <commandset id="selectEditMenuItems"/>
  <commandset id="globalEditMenuItems"/>
  <commandset id="historyEditMenuItems"
              commandupdater="true"
              events="select"
              oncommandupdate="updateHistoryCommands()"/>
  <command id="cmd_searchHistory" oncommand="window.openDialog('chrome://communicator/content/history/findHistory.xul', 'FindHistoryWindow', 'dialog=no,centerscreen,resizable=no,chrome,dependent');"/>

  <!-- File Menu -->
  <command id="cmd_close" oncommand="window.close()"/>
  <command id="cmd_quit"/>
  <command id="bm_cmd_saveas"/>
  <!-- Edit Menu -->
  <command id="cmd_deleteByHostname" oncommand="goDoCommand('cmd_deleteByHostname');"/>
  <command id="cmd_deleteByDomain" oncommand="goDoCommand('cmd_deleteByDomain');"/>

</commandset>

<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_selectAll"/>
  <key id="key_searchHistory" key="&findHisCmd.commandkey;" command="cmd_searchHistory" modifiers="accel"/>
</keyset>

<popupset id="historyContextMenu"/>

<toolbox id="history-toolbox">
<menubar id="history-menu" grippytooltiptext="&menuBar.tooltip;">
  <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="cmd_deleteByHostname"
                accesskey="&deleteHostnameCmd.accesskey;"/>
      <menuitem id="menu_deleteByDomain" command="cmd_deleteByDomain"
                accesskey="&deleteDomainCmd.accesskey;"/>
      <menuseparator/>
      <menuitem id="menu_selectAll"/>
    </menupopup>
  </menu>
  <menu id="menu_View">
    <menupopup onpopupshowing="fillViewMenu(this)">
      <menu id="groupingMenu" label="&groupBy.label;" accesskey="&groupBy.accesskey;">
        <menupopup>
          <menuitem id="groupByDay" label="&groupByDay.label;" accesskey="&groupByDay.accesskey;" type="radio" oncommand="GroupBy('day');"/>
          <menuitem id="groupBySite" label="&groupBySite.label;" accesskey="&groupBySite.accesskey;" type="radio" oncommand="GroupBy('site');"/>
          <menuitem id="groupByNone" label="&groupByNone.label;" accesskey="&groupByNone.accesskey;" type="radio" oncommand="GroupBy('none');"/>
        </menupopup>
      </menu>
      <menuitem type="radio" name="sort_column" id="unsorted_menuitem"
        label="&menuitem.view.unsorted.label;"
        accesskey="&menuitem.view.unsorted.accesskey;"
        oncommand="return SortInNewDirection('natural');"/>
      <menuseparator id="fill_after_this_node"/>
      <menuseparator id="fill_before_this_node"/>
      <menuitem type="radio" name="sort_direction" id="sort_ascending"
        label="&menuitem.view.ascending.label;"
        accesskey="&menuitem.view.ascending.accesskey;"
        oncommand="return SortInNewDirection('ascending');"/>
      <menuitem type="radio" name="sort_direction" id="sort_descending"
        label="&menuitem.view.descending.label;"
        accesskey="&menuitem.view.descending.accesskey;"
        oncommand="return SortInNewDirection('descending');"/>
    </menupopup>
  </menu>
  <menu id="tasksMenu">
    <menupopup id="taskPopup">
      <menuitem id="menu_searchHistory" label="&findHisCmd.label;" key="key_searchHistory"
                accesskey="&findHisCmd.accesskey;" command="cmd_searchHistory"/>
      <menuseparator/>
    </menupopup>
  </menu>
  <menu id="windowMenu"/>
  <menu id="menu_Help"/>
</menubar>
</toolbox>

  <tree id="historyTree"/>
  <statusbar id="status-bar" class="chromeclass-status">
    <statusbarpanel id="statusbar-display" flex="1"/>
    <statusbarpanel class="statusbarpanel-iconic" id="offline-status"/>
  </statusbar>

</window>
