<?xml version="1.0"?> <!-- -*- Mode: SGML; 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): 

-->

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

<!DOCTYPE window SYSTEM "chrome://bookmarks/locale/bookmarks.dtd">
<window title="&bookmarksWindowTitle.label;" id="bookmark-window" onunload="doUnload()"
  xmlns:html="http://www.w3.org/TR/REC-html40"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:web="http://home.netscape.com/WEB-rdf#"
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  width="500" height="400" x="20" y="20" persist="width height x y" align="vertical"
  ondraggesture="return TopLevelDrag(event);"
  windowtype="bookmarks:manager"
  >

  <html:script src="chrome://bookmarks/content/bookmarks.js"/>

  <menubar>
    <menu value="&menu.file.label;">
	  <menupopup>
      <menuitem value="&menuitem.newBookmark.label;" oncommand="return doContextCmd('http://home.netscape.com/NC-rdf#bookmarkcommand?newbookmark');" />
      <menuitem value="&menuitem.newFolder.label;" oncommand="return doContextCmd('http://home.netscape.com/NC-rdf#bookmarkcommand?newfolder');"/>
      <menuitem value="&menuitem.newSeparator.label;" oncommand="return doContextCmd('http://home.netscape.com/NC-rdf#bookmarkcommand?newseparator');"/>
      <menuseparator/>
      <menuitem value="&menuitem.close.label;"
                oncommand="window.close()" />
	  </menupopup>
    </menu>
    <menu value="&menu.edit.label;">
	  <menupopup>
      <menuitem value="&menuitem.undo.label;" disabled="true" />
      <menuitem value="&menuitem.redo.label;" disabled="true" />
      <menuseparator/>
      <menuitem value="&menuitem.cut.label;" oncommand="return doCut()" />
      <menuitem value="&menuitem.copy.label;" oncommand="return doCopy()" />
      <menuitem value="&menuitem.paste.label;" oncommand="return doPaste()" />
      <menuitem value="&menuitem.delete.label;" oncommand="return doDelete(true)" />
      <menuitem value="&menuitem.selectAll.label;" oncommand="return doSelectAll()" />
      <menuseparator/>
      <menuitem value="&menuitem.find.label;" oncommand="return OpenSearch('find');"/>
      <menuseparator/>
      <menuitem value="&menuitem.properties.label;" oncommand="return BookmarkProperties();"/>
	  </menupopup>
    </menu>
  </menubar>

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

<html:div style="width: 100px; height: 100px;" flex="1">
<tree  id="bookmarksTree" ref="NC:BookmarksRoot" context="contextual"
       datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch"
       onkeyup="if (event.keyCode == 8)	return doDelete(false);"
       style="width:100%;height:100%"
       ondragover="return DragOverTree(event);"
       ondraggesture="return BeginDragTree(event);"
       ondragdrop="return DropOnTree(event);">

  <template>
    <rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
      <treechildren>
       <treeitem uri="..." rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type" loading="rdf:http://home.netscape.com/NC-rdf#loading">
         <treerow>
           <treecell><html:hr width="100%" align="center" size="1" /></treecell>
           <treecell><html:hr width="100%" align="center" size="1" /></treecell>
           <treecell><html:hr width="100%" align="center" size="1" /></treecell>
           <treecell><html:hr width="100%" align="center" size="1" /></treecell>
           <treecell><html:hr width="100%" align="center" size="1" /></treecell>
           <treecell><html:hr width="100%" align="center" size="1" /></treecell>
           <treecell><html:hr width="100%" align="center" size="1" /></treecell>
         </treerow>
       </treeitem>  		
      </treechildren>
     </rule>

     <rule>
      <treechildren>
       <treeitem uri="..." persist="open" web:status="rdf:http://home.netscape.com/WEB-rdf#status" rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type" loading="rdf:http://home.netscape.com/NC-rdf#loading">
         <treerow>
           <treecell indent="true" value="rdf:http://home.netscape.com/NC-rdf#Name" src="rdf:http://home.netscape.com/NC-rdf#Icon" />
           <treecell value="rdf:http://home.netscape.com/NC-rdf#URL"/>
           <treecell value="rdf:http://home.netscape.com/NC-rdf#ShortcutURL"/>
           <treecell value="rdf:http://home.netscape.com/NC-rdf#Description"/>
           <treecell value="rdf:http://home.netscape.com/WEB-rdf#LastVisitDate"/>
           <treecell value="rdf:http://home.netscape.com/NC-rdf#BookmarkAddDate"/>
           <treecell value="rdf:http://home.netscape.com/WEB-rdf#LastModifiedDate"/>
         </treerow>
       </treeitem>
      </treechildren>
     </rule>
  </template>

  <treecol persist="width" id="NameColumn" sortSeparators="true" rdf:resource="http://home.netscape.com/NC-rdf#Name"/>
  <treecol persist="width" id="URLColumn" sortSeparators="true" rdf:resource="http://home.netscape.com/NC-rdf#URL" rdf:resource2="http://home.netscape.com/NC-rdf#Name"/>
  <treecol persist="width" id="ShortcutURLColumn" sortSeparators="true" rdf:resource="http://home.netscape.com/NC-rdf#ShortcutURL" rdf:resource2="http://home.netscape.com/NC-rdf#Name"/>
  <treecol persist="width" id="DescriptionColumn" sortSeparators="true" rdf:resource="http://home.netscape.com/NC-rdf#Description" rdf:resource2="http://home.netscape.com/NC-rdf#Name"/>
  <treecol persist="width" id="LastVisitColumn" sortSeparators="true" rdf:resource="http://home.netscape.com/WEB-rdf#LastVisitDate" rdf:resource2="http://home.netscape.com/NC-rdf#Name"/>
  <treecol persist="width" id="AddedOnColumn" sortSeparators="true" rdf:resource="http://home.netscape.com/NC-rdf#BookmarkAddDate" rdf:resource2="http://home.netscape.com/NC-rdf#Name"/>
  <treecol persist="width" id="LastModColumn" sortSeparators="true" rdf:resource="http://home.netscape.com/WEB-rdf#LastModifiedDate" rdf:resource2="http://home.netscape.com/NC-rdf#Name"/>

  <treehead>
    <treerow>
      <treecell value="&tree.header.name.label;" onclick="return doSort('NameColumn');" observes="NameColumn" />
      <treecell value="&tree.header.url.label;" onclick="return doSort('URLColumn');" observes="URLColumn" />
      <treecell value="&tree.header.shortcut.label;" onclick="return doSort('ShortcutURLColumn');" observes="ShortcutURLColumn" />
      <treecell value="&tree.header.description.label;" onclick="return doSort('DescriptionColumn');" observes="DescriptionColumn" />
      <treecell value="&tree.header.lastvisit.label;" onclick="return doSort('LastVisitColumn');" observes="LastVisitColumn" />
      <treecell value="&tree.header.addedon.label;" onclick="return doSort('AddedOnColumn');" observes="AddedOnColumn" />
      <treecell value="&tree.header.lastmod.label;" onclick="return doSort('LastModColumn');" observes="LastModColumn" />
    </treerow>
  </treehead>
  <treechildren onclick="return OpenURL(event, event.target.parentNode.parentNode, 'bookmarksTree');"/>
</tree>
</html:div>

<!--
pinkerton
This extra "status" bar is necessary because the bottom right corner of the window on MacOS is
taken up by the growBox. If this window had a horizontal scrollbar, we'd be alright, but since
it doesn't the bottom arrow on the vertical scrollbar was being hidden by this growBox. To
combat this, we can just stick in a 16px high bar to bump up the bottom of the tree so that
the scrollbar is visible. Yes, I know this is not necessary for win32 or gtk, but we can
use this area for information (maybe full URL of selected item or the like) in the future.
-->
<box id="status-bar" style="min-height:16px; max-height:16px;">
  <titledbutton class="status-bar" align="left" value=""/>
</box>

</window>
