gecko/browser/components/places/content/places.xul

456 lines
20 KiB
XML
Executable File

<?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 the Places Organizer.
#
# The Initial Developer of the Original Code is Google Inc.
# Portions created by the Initial Developer are Copyright (C) 2005-2006
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Ben Goodger <beng@google.com>
# Annie Sullivan <annie.sullivan@gmail.com>
# Asaf Romano <mano@mozilla.com>
#
# 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 GPL or the LGPL. 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://browser/content/places/places.css"?>
<?xml-stylesheet href="chrome://browser/content/places/organizer.css"?>
<?xml-stylesheet href="chrome://global/skin/"?>
<?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
<?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
<?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
%placesDTD;
<!ENTITY % editMenuOverlayDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
%editMenuOverlayDTD;
]>
<window id="places"
title="&places.title;"
windowtype="Places:Organizer"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="PlacesOrganizer.init();"
onunload="PlacesOrganizer.destroy();"
width="700" height="500" screenX="10" screenY="10"
persist="width height screenX screenY sizemode">
<script type="application/x-javascript"
src="chrome://browser/content/places/places.js"/>
<stringbundleset id="stringbundleset"/>
<commandset id="editMenuCommands"/>
<commandset id="baseMenuCommandSet"/>
<commandset id="placesCommands"/>
<commandset id="organizerCommandSet">
<command id="OrganizerCommand_find:all"
label="&cmd.find.label;" accesskey="&cmd.find.accesskey;"
oncommand="PlacesSearchBox.findAll();"/>
<command id="OrganizerCommand_find:current"
label="&cmd.findCurrent.label;"
accesskey="&cmd.findCurrent.accesskey;"
oncommand="PlacesSearchBox.findCurrent();"/>
<command id="OrganizerCommand_export"
oncommand="PlacesOrganizer.exportBookmarks();"/>
<command id="OrganizerCommand_import"
oncommand="PlacesOrganizer.importBookmarks();"/>
<command id="OrganizerCommand_search:save"/>
<command id="OrganizerCommand_search:moreCriteria"
oncommand="PlacesQueryBuilder.addRow();"/>
</commandset>
<broadcasterset id="placesGroupingBroadcasters">
<broadcaster id="placesBC_grouping:off"/>
<broadcaster id="placesBC_grouping:on"/>
<broadcaster id="placesBC_grouping:separator"/>
</broadcasterset>
<keyset id="baseMenuKeyset"/>
<keyset id="placesOrganizerKeyset">
<!-- Instantiation Keys -->
<key id="placesKey_close" key="&cmd.close.key;" modifiers="accel"
oncommand="close();"/>
<key id="placesKey_show:debug"
key="d" modifiers="accel,shift"
oncommand="PlacesOrganizer.toggleDebugPanel();"/>
<!-- Command Keys -->
<key id="placesKey_find:all"
command="OrganizerCommand_find:all"
key="&cmd.find.key;"
modifiers="accel"/>
<key id="placesKey_find:current"
command="OrganizerCommand_find:current"
key="&cmd.find.key;"
modifiers="accel,shift"/>
<key id="placesKey_open"
command="placesCmd_open"
keycode="VK_ENTER"/>
<key id="placesKey_open"
command="placesCmd_open"
keycode="VK_RETURN"/>
<key id="placesKey_open:window"
command="placesCmd_open:window"
keycode="VK_ENTER"
modifiers="shift"/>
<key id="placesKey_open:window"
command="placesCmd_open:window"
keycode="VK_RETURN"
modifiers="shift"/>
<key id="placesKey_open:tab"
command="placesCmd_open:tab"
keycode="VK_ENTER"
modifiers="accel"/>
<key id="placesKey_open:tab"
command="placesCmd_open:tab"
keycode="VK_RETURN"
modifiers="accel"/>
<key id="placesKey_show:info"
command="placesCmd_show:info"
key="&cmd.show_info.key;"
modifiers="accel"/>
<key id="placesKey_rename"
command="placesCmd_rename"
keycode="VK_F2"/>
</keyset>
<keyset id="editMenuKeys">
#ifdef XP_MACOSX
<key id="key_delete2" keycode="VK_BACK" command="cmd_delete"/>
#endif
</keyset>
<popupset id="placesPopupset">
<popup id="placesContext"/>
</popupset>
<toolbox>
<menubar id="placesMenubar">
<menu id="fileMenu" label="&file.label;" accesskey="&file.accesskey;">
<menupopup>
<menuitem id="fileNewBookmark"
command="placesCmd_new:bookmark"
label="&cmd.new_bookmark.label;"
accesskey="&cmd.new_bookmark.accesskey;"/>
<menuitem id="fileNewLivemark"
command="placesCmd_new:livemark"
label="&cmd.new_livemark.label;"
accesskey="&cmd.new_livemark.accesskey;"/>
<menuitem id="fileNewFolder"
command="placesCmd_new:folder"
label="&cmd.new_folder.label;"
accesskey="&cmd.new_folder.accesskey;"/>
<menuitem id="fileNewSeparator"
command="placesCmd_new:separator"
label="&cmd.new_separator.label;"
accesskey="&cmd.new_separator.accesskey;"/>
<menuseparator/>
<menuitem id="fileImport"
command="OrganizerCommand_import"
label="&cmd.import.label;"
accesskey="&cmd.import.accesskey;"/>
<menuitem id="fileExport"
command="OrganizerCommand_export"
label="&cmd.export.label;"
accesskey="&cmd.export.accesskey;"/>
<menuseparator/>
<menuitem id="fileClose"
key="placesKey_close"
label="&file.close.label;"
accesskey="&file.close.accesskey;"
oncommand="close();"/>
</menupopup>
</menu>
<menu id="editMenu" label="&edit.label;" accesskey="&edit.accesskey;">
<menupopup>
<menuitem id="menu_undo"/>
<menuitem id="menu_redo"/>
<menuseparator/>
<menuitem id="menu_cut"/>
<menuitem id="menu_copy"/>
<menuitem id="menu_paste"/>
<menuitem id="menu_delete"/>
<menuseparator/>
<menuitem id="menu_selectAll"/>
<menuseparator/>
<menuitem id="editFindAll"
command="OrganizerCommand_find:all"
key="placesKey_find:all"/>
<menuitem id="editFindCurrent"
command="OrganizerCommand_find:current"
key="placesKey_find:current"/>
<menuseparator/>
<menuitem command="placesCmd_moveBookmarks"
label="&cmd.moveBookmarks.menuLabel;"
accesskey="&cmd.moveBookmarks.menuAccesskey;"/>
<menuitem command="placesCmd_setAsBookmarksToolbarFolder"
label="&cmd.personalToolbarFolder.menuLabel;"
accesskey="&cmd.personalToolbarFolder.menuAccesskey;"/>
<menuseparator/>
<menuitem id="editReload"
command="placesCmd_reload"
label="&cmd.reloadLivebookmark.label;"
accesskey="&cmd.reloadLivebookmark.accesskey;"/>
<menuitem id="editReloadMicrosummary"
command="placesCmd_reloadMicrosummary"
label="&cmd.reloadMicrosummary.label;"
accesskey="&cmd.reloadMicrosummary.accesskey;"/>
<menuseparator/>
<menuitem id="properties"
command="placesCmd_show:info"
key="placesKey_show:info"
label="&cmd.properties.label;"
accesskey="&cmd.properties.accesskey;"/>
</menupopup>
</menu>
<menu id="viewMenu" label="&view.label;" accesskey="&view.accesskey;"
onpopupshowing="ViewMenu.populate(event);"
oncommand="ViewMenu.setSortColumn(event.target.getAttribute('column'), null);">
<menupopup>
<menuitem id="viewToolbar"
type="checkbox"
label="&view.toolbar.label;"
accesskey="&view.toolbar.accesskey;"
oncommand="goToggleToolbar('mainToolbar', 'viewToolbar'); event.stopPropagation();"
checked="true"/>/>
<menu id="viewColumns"
label="&view.columns.label;" accesskey="&view.columns.accesskey;">
<menupopup onpopupshowing="ViewMenu.fillWithColumns(event, null, null, 'checkbox', null);"
oncommand="ViewMenu.showHideColumn(event.target); event.stopPropagation();"/>
</menu>
<menuseparator id="groupingSeparator" observes="placesBC_grouping:separator"/>
<menuitem id="viewGroupNone" type="radio" name="group"
observes="placesBC_grouping:off"/>
<menuitem id="viewGroupGroup" type="radio" name="group"
observes="placesBC_grouping:on"/>
<menuseparator id="columnSeparator"/>
<menuitem id="viewUnsorted" type="radio" name="columns"
label="&view.unsorted.label;" accesskey="&view.unsorted.accesskey;"
oncommand="ViewMenu.setSortColumn(null, null);"/>
<menuseparator id="directionSeparator"/>
<menuitem id="viewSortAscending" type="radio" name="direction"
label="&view.sortAscending.label;" accesskey="&view.sortAscending.accesskey;"
oncommand="ViewMenu.setSortColumn(null, 'ascending'); event.stopPropagation();"/>
<menuitem id="viewSortDescending" type="radio" name="direction"
label="&view.sortDescending.label;" accesskey="&view.sortDescending.accesskey;"
oncommand="ViewMenu.setSortColumn(null, 'descending'); event.stopPropagation();"/>
</menupopup>
</menu>
#ifdef XP_MACOSX
<menu id="windowMenu"/>
<menupopup id="menu_ToolsPopup"/>
#endif
<menu id="helpMenu"/>
</menubar>
<toolbar id="mainToolbar" class="chromeclass-toolbar">
<toolbarbutton id="newbookmark"
command="placesCmd_new:bookmark"
label="&cmd.new_bookmark.label;"
accesskey="&cmd.new_bookmark.accesskey;"/>
<toolbarbutton id="newfolder"
command="placesCmd_new:folder"
label="&cmd.new_folder.label;"
accesskey="&cmd.new_folder.accesskey;"/>
<toolbarbutton id="newseparator"
command="placesCmd_new:separator"
label="&cmd.new_separator.label;"
accesskey="&cmd.new_separator.accesskey;"/>
<toolbarseparator/>
<toolbarbutton id="moveBookmark"
command="placesCmd_moveBookmarks"
label="&cmd.moveBookmarks.label;"
accesskey="&cmd.moveBookmarks.accesskey;"/>
<toolbarseparator/>
<toolbarbutton id="properties"
command="placesCmd_show:info"
label="&cmd.properties.label;"
accesskey="&cmd.properties.accesskey;"/>
<toolbarbutton id="rename"
command="placesCmd_rename"
label="&cmd.rename.label;"
accesskey="&cmd.rename.accesskey;"/>
<toolbarbutton id="delete"
command="cmd_delete"
label="&deleteCmd.label;"
accesskey="&deleteCmd.accesskey;" />
</toolbar>
<toolbar class="chromeclass-toolbar">
<textbox id="searchFilter" style="width: 23em;" timeout="500"
oncommand="PlacesSearchBox.search(this.value);"
onreset="PlacesOrganizer.onPlaceSelected(false); return true;"
collection="bookmarks">
<button type="menu" class="filterList" id="filterList_history">
<menupopup>
<menuitem label="&search.all.label;" accesskey="&search.all.accesskey;"
type="radio" name="collection" value="all"
checked="true" default="true"/>
<menuitem label="&search.collection.label;" accesskey="&search.collection.accesskey;"
type="radio" name="collection" value="collection"/>
</menupopup>
</button>
</textbox>
<spacer flex="1"/>
<toolbarbutton id="toolbarGroupOff" type="radio" group="grouping"
observes="placesBC_grouping:off"/>
<toolbarbutton id="toolbarGroupOn" type="radio" group="grouping"
observes="placesBC_grouping:on" />
</toolbar>
</toolbox>
<hbox flex="1" id="placesView">
<tree id="placesList"
class="placesTree"
type="places"
showRoot="true"
place="place:folder=2&amp;group=3&amp;excludeItems=1&amp;queryType=1"
hidecolumnpicker="true" context="placesContext"
onselect="PlacesOrganizer.onPlaceSelected(true);
PlacesOrganizer.updateStatusBarForView(this);"
onclick="PlacesOrganizer.onTreeClick(event);"
seltype="single"
persist="width">
<treecols>
<treecol id="title" flex="1" primary="true" hideheader="true"/>
</treecols>
<treechildren id="placesListChildren" view="placesList" flex="1"/>
</tree>
<splitter id="splitter" collapse="before" persist="state">
<grippy/>
</splitter>
<vbox id="contentView" flex="4">
<deck id="contentDeck" flex="1">
<vbox flex="1">
<hbox id="titlebar" align="center">
<label id="showingPrefix"/>
<deck id="titleDeck" flex="1">
<label id="contentTitle" flex="1" crop="right"/>
<hbox align="center" id="titlebarMatch" hidden="true">
<label value="&advancedSearch.match.label;"/>
<menulist id="advancedSearchType"
oncommand="PlacesQueryBuilder.doSearch();">
<menupopup>
<menuitem value="and" label="&advancedSearch.all.label;"/>
<menuitem value="or" label="&advancedSearch.any.label;"/>
</menupopup>
</menulist>
<label value="&advancedSearch.rules.label;"/>
</hbox>
</deck>
<hbox id="searchModifiers" hidden="true" align="center">
<button id="saveSearch" class="small"
label="&saveSearch.label;" accesskey="&saveSearch.accesskey;"
command="OrganizerCommand_search:save"/>
<button id="moreCriteria"
class="small"
label="&moreCriteria.label;"
command="OrganizerCommand_search:moreCriteria"/>
</hbox>
</hbox>
#include advancedSearch.inc
<tree id="placeContent" class="placesTree" context="placesContext"
flex="1" type="places"
ondblclick="this.controller.openSelectedNodeWithEvent(event);"
onclick="PlacesOrganizer.onTreeClick(event);"
onselect="PlacesOrganizer.updateStatusBarForView(this);">
<treecols id="placeContentColumns">
<treecol label="&col.title.label;" id="title" flex="5" primary="true"
persist="width hidden ordinal sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol label="&col.url.label;" id="url" flex="5"
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"/>
<splitter class="tree-splitter"/>
<treecol label="&col.keyword.label;" id="keyword" flex="1" hidden="true"
persist="width hidden ordinal sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol label="&col.description.label;" id="description" flex="1" hidden="true"
persist="width hidden ordinal sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol label="&col.dateadded.label;" id="dateAdded" flex="1" hidden="true"
persist="width hidden ordinal sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol label="&col.lastmodified.label;" id="lastModified" flex="1" hidden="true"
persist="width hidden ordinal sortActive sortDirection"/>
</treecols>
<treechildren id="placeContentChildren" view="placeContent" flex="1"/>
</tree>
<vbox id="debugPanel" hidden="true">
<grid>
<columns>
<column/>
<column flex="1"/>
<column/>
</columns>
<rows>
<row align="center">
<label value="Debug:"/>
<textbox id="placeURI" flex="1"
onkeypress="PlacesOrganizer.onPlaceURIKeypress(event);"/>
<button label="Load" oncommand="PlacesOrganizer.loadPlaceURI();"/>
</row>
<row>
<spacer/>
<hbox>
<checkbox id="autoFilterResults"
label="Apply user filtering of results"
checked="true"/>
</hbox>
<spacer/>
</row>
<separator class="thin"/>
<row align="center">
<label value="Loaded:"/>
<textbox id="loadedURI" flex="1" readonly="true"/>
<spacer/>
</row>
</rows>
</grid>
<separator class="thin"/>
</vbox>
</vbox>
</deck>
</vbox>
</hbox>
<statusbar>
<statusbarpanel id="status" flex="1"/>
</statusbar>
</window>