<?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 src="chrome://communicator/content/history/history.js"/>
  <script src="chrome://global/content/strres.js"/>
  <script src="chrome://global/content/globalOverlay.js"/>

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

<commands id="commands">
  <commandset id="selectEditMenuItems"/>
  <commandset id="globalEditMenuItems"/>
  <commandset id="historyEditMenuItems"
              commandupdater="true"
              events="select"
              oncommandupdate="updateHistoryCommands()"/>
</commands>

<broadcasterset id="broadcasterset">
  <!-- File Menu -->
  <broadcaster id="cmd_newNavigator"/>
  <broadcaster id="cmd_newEditor"/>
  <broadcaster id="cmd_close" oncommand="window.close()"/>
  <broadcaster id="cmd_quit"/>
  <broadcaster id="bm_cmd_saveas"/>
  <!-- Edit Menu -->
  <broadcaster id="cmd_undo"/>
  <broadcaster id="cmd_cut"/>
  <broadcaster id="cmd_copy"/>
  <broadcaster id="cmd_delete"/>
  <broadcaster id="cmd_selectAll"/>
  <broadcaster id="cmd_deleteByHostname" oncommand="goDoCommand('cmd_deleteByHostname');"/>
  <broadcaster id="cmd_deleteByDomain" oncommand="goDoCommand('cmd_deleteByDomain');"/>
</broadcasterset>
<keyset id="keyset">
  <!-- 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"/>
</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" observes="cmd_newNavigator"/>
	    <menuitem id="menu_newEditor"    observes="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" observes="cmd_deleteByHostname"/>
      <menuitem id="menu_deleteByDomain" observes="cmd_deleteByDomain"/>
      <menuseparator/>
      <menuitem id="menu_selectAll"/>
      <menuseparator/>
      <menuitem value="&findHisCmd.label;" accesskey="&findHisCmd.accesskey;" oncommand="window.openDialog('chrome://communicator/content/bookmarks/bm-find.xul', 'FindBookmarksWindow', 'dialog=no,close,chrome,resizable', 'history');"/>
    </menupopup>
  </menu>
  <menu id="menu_View">
    <menupopup oncreate="fillViewMenu(this)">
      <menuitem type="radio" name="sort_column" id="unsorted_menuitem"
        value="&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"
        value="&menuitem.view.ascending.label;"
        accesskey="&menuitem.view.ascending.accesskey;"
        oncommand="return SetSortDirection('ascending');"/>
      <menuitem type="radio" name="sort_direction" id="sort_descending"
        value="&menuitem.view.descending.label;"
        accesskey="&menuitem.view.descending.accesskey;"
        oncommand="return SetSortDirection('descending');"/>
      <menuseparator/>
      <menu value="&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>
