<?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 <BlakeR1234@aol.com>

-->

<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/bookmarks/bookmarks.css" 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/utilityOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/communicatorOverlay.xul"?>

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

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

  <script type="application/x-javascript" src="chrome://communicator/content/history/history.js"/>
  <script type="application/x-javascript" src="chrome://global/content/strres.js"/>
  <script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>

  <stringbundle id="historyBundle"
                src="chrome://communicator/locale/history/history.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/bookmarks/bm-find.xul', 'FindBookmarksWindow', 'dialog=no,close,chrome,resizable', 'history');"/>

  <!-- File Menu -->
  <command id="cmd_newNavigator"/>
  <command id="cmd_newEditor"/>
  <command id="cmd_close" oncommand="window.close()"/>
  <command id="cmd_quit"/>
  <command id="bm_cmd_saveas"/>
  <!-- Edit Menu -->
  <command id="cmd_undo"/>
  <command id="cmd_cut"/>
  <command id="cmd_copy"/>
  <command id="cmd_delete"/>
  <command id="cmd_selectAll"/>
  <command id="cmd_deleteByHostname" oncommand="goDoCommand('cmd_deleteByHostname');"/>
  <command id="cmd_deleteByDomain" oncommand="goDoCommand('cmd_deleteByDomain');"/>

</commandset>

<keyset id="tasksKeys">
  <!-- File Menu -->
  <key id="key_newNavigator"/>
  <key id="key_newEditor"/>
  <key id="key_close"/>
  <key id="key_quit"/>
  <!-- Edit Menu -->
  <key id="key_undo"/>
  <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>

<toolbox id="history-toolbox">
<menubar id="history-menu">
  <menu id="menu_File">
    <menupopup id="menu_FilePopup">
      <menu id="menu_New">
        <menupopup id="menu_NewPopup">
      <menuitem id="menu_newNavigator" command="cmd_newNavigator"/>
      <menuitem id="menu_newEditor"    command="cmd_newEditor"/>
        </menupopup>
      </menu>
      <menuseparator/>
      <menuitem id="menu_close"/>
    </menupopup>
  </menu>

  <menu id="menu_Edit">
    <menupopup>
      <menuitem id="menu_undo" disabled="true" />
      <menuseparator/>
      <menuitem id="menu_cut"/>
      <menuitem id="menu_copy"/>
      <menuitem id="menu_delete"/>
      <menuitem id="menu_deleteByHostname" command="cmd_deleteByHostname"/>
      <menuitem id="menu_deleteByDomain" command="cmd_deleteByDomain"/>
      <menuseparator/>
      <menuitem id="menu_selectAll"/>
      <menuseparator/>
      <menuitem id="menu_searchHistory" label="&findHisCmd.label;" key="key_searchHistory" accesskey="&findHisCmd.accesskey;" command="cmd_searchHistory"/>
    </menupopup>
  </menu>
  <menu id="menu_View">
    <menupopup oncreate="fillViewMenu(this)">
      <menuitem type="radio" name="sort_column" id="unsorted_menuitem"
        label="&menuitem.view.unsorted.label;"
        accesskey="&menuitem.view.unsorted.accesskey;"
        oncommand="return SetSortDirection('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 SetSortDirection('ascending');"/>
      <menuitem type="radio" name="sort_direction" id="sort_descending"
        label="&menuitem.view.descending.label;"
        accesskey="&menuitem.view.descending.accesskey;"
        oncommand="return SetSortDirection('descending');"/>
      <menuseparator/>
      <menu label="&menuitem.view.show_columns.label;"
                 accesskey="&menuitem.view.show_columns.accesskey;">
        <menupopup
          oncreate="BuildTreePopup(document.getElementById('theColumns'), 
                                   document.getElementById('headRow'), this,
                                   document.getElementById('popupCell'))"/>
      </menu>
    </menupopup>
  </menu>
  <menu id="tasksMenu" accesskey="t" />
  <menu id="menu_Help" accesskey="h" />
</menubar>
</toolbox>

<popupset>
  <popup id="contextual" oncreate="return fillContextMenu('contextual', 'historyTree');" >
    <menu />
  </popup>
</popupset>

  <tree id="historyTree"/>
  <statusbar id="status-bar">
    <statusbarpanel class="statusbarpanel-icononly" id="offline-status"/>
    <statusbarpanel id="statusbar-display" crop="right" flex="1"/>
  </statusbar>

</window>
