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

483 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"?>
#ifdef XP_MACOSX
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
#else
<?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"?>
#endif
<!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.organizer.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"/>
#ifdef XP_MACOSX
#include ../../../base/content/browserMountPoints.inc
#else
<commandset id="editMenuCommands"/>
<commandset id="placesCommands"/>
#endif
<commandset id="organizerCommandSet">
<command id="OrganizerCommand_find:all"
label="&cmd.findInBookmarks.label;"
accesskey="&cmd.findInBookmarks.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_backup"
oncommand="PlacesOrganizer.backupBookmarks();"/>
<command id="OrganizerCommand_restoreFromFile"
oncommand="PlacesOrganizer.restoreFromFile();"/>
<command id="OrganizerCommand_search:save"
oncommand="PlacesOrganizer.saveSearch();"/>
<command id="OrganizerCommand_search:moreCriteria"
oncommand="PlacesQueryBuilder.addRow();"/>
<command id="OrganizerCommand:Back"
oncommand="PlacesOrganizer.back();"/>
<command id="OrganizerCommand:Forward"
oncommand="PlacesOrganizer.forward();"/>
</commandset>
<broadcasterset id="placesGroupingBroadcasters">
<broadcaster id="placesBC_grouping:off"/>
<broadcaster id="placesBC_grouping:on"/>
<broadcaster id="placesBC_grouping:separator"/>
</broadcasterset>
<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 id="placesToolbox">
<toolbar class="chromeclass-toolbar" id="placesToolbar">
<toolbarbutton id="back-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
command="OrganizerCommand:Back"
tooltiptext="&backButton.tooltip;"
accesskey="&backCmd.accesskey;"
disabled="true"/>
<toolbarbutton id="forward-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
command="OrganizerCommand:Forward"
tooltiptext="&forwardButton.tooltip;"
accesskey="&forwardCmd.accesskey;"
disabled="true"/>
<toolbarbutton id="organizeButton" type="menu" label="&organize.label;">
<menupopup id="organizeButtonPopup">
<menuitem id="newbookmark"
command="placesCmd_new:bookmark"
label="&cmd.new_bookmark.label;"
accesskey="&cmd.new_bookmark.accesskey;"/>
<menuitem id="newfolder"
command="placesCmd_new:folder"
label="&cmd.new_folder.label;"
accesskey="&cmd.new_folder.accesskey;"/>
<menuitem id="newseparator"
command="placesCmd_new:separator"
label="&cmd.new_separator.label;"
accesskey="&cmd.new_separator.accesskey;"/>
<menuseparator id="orgCutSeparator"/>
<menuitem id="orgCut"
command="cmd_cut"
label="&cutCmd.label;"
key="key_cut"
accesskey="&cutCmd.accesskey;"
selection="separator|link|folder|mixed"/>
<menuitem id="orgCopy"
command="cmd_copy"
label="&copyCmd.label;"
key="key_copy"
accesskey="&copyCmd.accesskey;"
selection="separator|link|folder|mixed"/>
<menuitem id="orgPaste"
command="cmd_paste"
label="&pasteCmd.label;"
key="key_paste"
accesskey="&pasteCmd.accesskey;"
selection="mutable"/>
<menuitem id="orgUndo"
command="cmd_undo"
label="&undoCmd.label;"
key="key_undo"
accesskey="&undoCmd.accesskey;"/>
<menuitem id="orgRedo"
command="cmd_redo"
label="&redoCmd.label;"
key="key_redo"
accesskey="&redoCmd.accesskey;"/>
<menuseparator id="selectAllSeparator"/>
<menuitem id="orgSelectAll"
command="cmd_selectAll"
label="&selectAllCmd.label;"
key="key_selectAll"
accesskey="&selectAllCmd.accesskey;"/>
<menuseparator id="orgMoveSeparator"/>
<menuitem id="orgDelete"
command="cmd_delete"
label="&deleteCmd.label;"
key="key_delete"
accesskey="&deleteCmd.accesskey;"/>
<menuitem id="orgRename"
command="placesCmd_rename"
label="&cmd.rename.label;"
accesskey="&cmd.rename.accesskey;"/>
<menuitem id="orgProperties"
command="placesCmd_show:info"
label="&cmd.properties.label;"
key="placesKey_show:info"
accesskey="&cmd.properties.accesskey;"/>
<menuseparator id="orgCloseSeparator"/>
<menuitem id="orgClose"
key="placesKey_close"
label="&file.close.label;"
accesskey="&file.close.accesskey;"
oncommand="close();"/>
</menupopup>
</toolbarbutton>
<toolbarbutton id="viewMenu" type="menu"
label="&views.label;"
accesskey="&view.accesskey;">
<menupopup id="viewMenuPopup">
<menuitem id="viewDetails"
type="radio"
#ifdef MACOSX
label="&view.detailsMacOSX.label;"
#else
label="&view.details.label;"
#endif
accesskey="&view.details.label;">
</menuitem>
<menuseparator id="addonsSeparator"/>
<!--
<menuitem id="viewAddons"
command=""
label="&view.addons.label;"
accesskey="&view.addons.label;"/>
<menuseparator id="sortingSeparator"/>
-->
<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>
<menu id="viewSort" label="&view.sort.label;"
accesskey="&view.sort.accesskey;">
<menupopup onpopupshowing="ViewMenu.populateSortMenu(event);"
oncommand="ViewMenu.setSortColumn(event.target.getAttribute('column'), null);">
<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>
<!--
<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"/>
-->
</menupopup>
</toolbarbutton>
<toolbarbutton id="maintenanceButton" style="min-width:0px !important;"
type="menu" label="&maintenance.label;">
<menupopup id="maintenanceButtonPopup">
<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="backupBookmarks"
command="OrganizerCommand_backup"
label="&cmd.backup.label;"
accesskey="&cmd.backup.accesskey;"/>
<menu id="fileRestoreMenu" label="&cmd.restore.label;"
accesskey="&cmd.restore.accesskey;">
<menupopup id="fileRestorePopup" onpopupshowing="PlacesOrganizer.populateRestoreMenu();">
<menuitem id="restoreFromFile"
command="OrganizerCommand_restoreFromFile"
label="&cmd.restoreFromFile.label;"
accesskey="&cmd.restoreFromFile.accesskey;"/>
</menupopup>
</menu>
</menupopup>
</toolbarbutton>
<spacer flex="1"/>
<textbox id="searchFilter" style="width: 23em;" timeout="500"
oncommand="PlacesSearchBox.search(this.value);"
onreset="PlacesOrganizer.onPlaceSelected(false); return true;"
collection="bookmarks">
</textbox>
</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);"
onclick="PlacesOrganizer.onTreeClick(event);"
seltype="single"
persist="width"
width="160">
<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 id="defaultView" 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);">
<treecols id="placeContentColumns">
<treecol label="&col.name.label;" id="title" flex="5" primary="true"
persist="width hidden ordinal sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol label="&col.tags.label;" id="tags" flex="2"
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" hidden="true"
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>
</window>