releases-comm-central/suite/browser/navigator.xul

466 строки
24 KiB
Plaintext
Исходник Обычный вид История

<?xml version="1.0"?> <!-- -*- Mode: HTML; indent-tabs-mode: nil -*- -->
<!-- ***** 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 Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-2000
the Initial Developer. All Rights Reserved.
Contributor(s):
Dean Tessman <dean_tessman@hotmail.com>
Alternatively, the contents of this file may be used under the terms of
either of 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://navigator/skin/" type="text/css"?>
<?xul-overlay href="chrome://navigator/content/navigatorOverlay.xul"?>
<?xul-overlay href="chrome://navigator/content/mailNavigatorOverlay.xul"?>
<?xul-overlay href="chrome://navigator/content/linkToolbarOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/contentAreaContextOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/sidebar/sidebarOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/bookmarks/bookmarksOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
<!ENTITY % navigatorDTD SYSTEM "chrome://navigator/locale/navigator.dtd" >
%navigatorDTD;
]>
<window id="main-window"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="Startup()" onunload="Shutdown()"
onclose="return WindowIsClosing();"
contenttitlesetting="true"
title="&mainWindow.title;"
titlemodifier="&mainWindow.titlemodifier;"
titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
windowtype="navigator:browser"
persist="screenX screenY width height sizemode">
<!-- Generic Utility -->
<script type="application/x-javascript" src="chrome://global/content/nsUserSettings.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsClipboard.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<!-- Content Area -->
<script type="application/x-javascript" src="chrome://navigator/content/nsBrowserStatusHandler.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/nsBrowserContentListener.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaClick.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaDD.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/findUtils.js"/>
<script type="application/x-javascript" src="chrome://global/content/printUtils.js"/>
<!-- Shared Bookmarks Utility Library -->
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bookmarks.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bookmarksMenu.js"/>
<!-- Navigator -->
<script type="application/x-javascript" src="chrome://navigator/content/fullScreen.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/browser.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/navigator.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/navigatorDD.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/sessionHistoryUI.js"/>
<!-- hook for stringbundle overlays -->
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_navigator" src="chrome://navigator/locale/navigator.properties"/>
<stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>
<stringbundle id="bundle_navigator_region" src="chrome://navigator-region/locale/region.properties"/>
<stringbundle id="findBundle" src="chrome://global/locale/finddialog.properties"/>
</stringbundleset>
<commandset id="commands">
<commandset id="findTypeMenuItems"/>
<commandset id="globalEditMenuItems"/>
<commandset id="selectEditMenuItems"/>
<commandset id="undoEditMenuItems"/>
<commandset id="clipboardEditMenuItems"/>
<!-- <command id="cmd_pageSetup"/> -->
<command id="toggleSidebar"/>
</commandset>
<commandset id="mainCommandSet"/> <!-- Firefox extension compatibility -->
<!-- broadcasters are appended from the overlay -->
<broadcasterset id="navBroadcasters"/>
<broadcasterset id="mainBroadcasterSet"/> <!-- Firefox extension compatibility -->
<!-- keys are appended from the overlay -->
<keyset id="navKeys">
<key id="showHideSidebar"/>
</keyset>
<keyset id="mainKeyset"/> <!-- Firefox extension compatibility -->
<popup id="backMenu" position="after_start" onpopupshowing="return BrowserBackMenu(event);" oncommand="gotoHistoryIndex(event);"/>
<popup id="forwardMenu" position="after_start" onpopupshowing="return BrowserForwardMenu(event);" oncommand="gotoHistoryIndex(event);"/>
<tooltip id="aHTMLTooltip" onpopupshowing="return FillInHTMLTooltip(document.tooltipNode);"/>
<popup id="sidebarPopup"/>
<popupset id="bookmarksPopupset"/>
<tooltip id="btTooltip"/>
<template id="bookmarksMenuTemplate"/>
<tooltip id="home-button-tooltip" noautohide="true">
<vbox id="home-button-tooltip-inner" flex="1"/>
</tooltip>
<popupset id="mainPopupSet"/> <!-- Firefox extension compatibility -->
<popup id="toolbar-context-menu"/>
<!-- context menu -->
<popupset id="contentAreaContextSet"/>
<popup id="feedsPopup" popupanchor="bottomright" popupalign="topright"
onpopupshowing="window.XULBrowserWindow.populateFeeds(this);"
oncommand="subscribeToFeed(event.target.statusText, event);"
onclick="checkForMiddleClick(this, event);"/>
<panel type="autocomplete" id="PopupAutoComplete" level="top"/>
<toolbox id="navigator-toolbox" class="toolbox-top" deferattached="true"
mode="full" defaultmode="full">
<!-- Menu -->
<toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar"
persist="collapsed" grippytooltiptext="&menuBar.tooltip;" customizable="true"
defaultset="menubar-items"
mode="icons" iconsize="small"
defaultmode="icons" defaulticonsize="small"
context="toolbar-context-menu">
<toolbaritem id="menubar-items" class="menubar-items" align="center">
<menubar id="main-menubar"/>
</toolbaritem>
</toolbar>
<toolbar class="toolbar-primary chromeclass-toolbar" id="nav-bar" persist="collapsed"
grippytooltiptext="&navigationToolbar.tooltip;"
fullscreentoolbar="true" customizable="true"
toolbarname="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;"
togglemenuitem="cmd_viewnavbar"
defaultset="back-button,forward-button,reload-button,stop-button,nav-bar-inner,print-button,throbber-box,window-controls"
context="toolbar-context-menu">
<hbox id="window-controls" hidden="true" fullscreencontrol="true">
<toolbarbutton id="minimize-button"
tooltiptext="&minimizeButton.tooltip;"
oncommand="window.minimize();"/>
<toolbarbutton id="restore-button"
tooltiptext="&restoreButton.tooltip;"
oncommand="BrowserFullScreen();"/>
<toolbarbutton id="close-button"
tooltiptext="&closeWindow.label;"
oncommand="BrowserTryToCloseWindow();"/>
</hbox>
</toolbar>
<toolbarset id="customToolbars" context="toolbar-context-menu"/>
<toolbar id="PersonalToolbar" class="chromeclass-directories" persist="collapsed"
grippytooltiptext="&personalToolbar.tooltip;"
toolbarname="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;"
togglemenuitem="cmd_viewpersonaltoolbar"
customizable="true"
defaultset="home-button,separator,bookmarks-button,personal-bookmarks"
mode="full" iconsize="small" labelalign="end"
defaultmode="full" defaulticonsize="small" defaultlabelalign="end"
context="toolbar-context-menu">
</toolbar>
<toolbarpalette id="BrowserToolbarPalette">
<!-- Nav bar buttons -->
<toolbarbutton id="back-button" type="menu-button"
class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&backButton.label;"
oncommand="if (event.target==this) BrowserBack(); else gotoHistoryIndex(event);"
context="backMenu"
tooltiptext="&backButton.tooltip;">
<observes element="canGoBack" attribute="disabled"/>
<menupopup context="" onpopupshowing="BrowserBackMenu(event);"/>
</toolbarbutton>
<toolbarbutton id="forward-button" type="menu-button"
class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&forwardButton.label;"
oncommand="if (event.target==this) BrowserForward(); else gotoHistoryIndex(event);"
context="forwardMenu"
tooltiptext="&forwardButton.tooltip;">
<observes element="canGoForward" attribute="disabled"/>
<menupopup context="" onpopupshowing="BrowserForwardMenu(event);"/>
</toolbarbutton>
<toolbarbutton id="reload-button"
class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&reloadButton.label;"
oncommand="if (event.shiftKey) BrowserReloadSkipCache(); else BrowserReload();"
tooltiptext="&reloadButton.tooltip;"/>
<toolbarbutton id="stop-button"
class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&stopButton.label;"
oncommand="BrowserStop();" observes="canStop"
tooltiptext="&stopButton.tooltip;">
</toolbarbutton>
<!-- XXXRatty ? class="toolbarbutton-1 chromeclass-toolbar-additional" ? -->
<toolbarbutton id="home-button"
class="toolbarbutton-1"
label="&homeButton.label;"
oncommand="BrowserHome(event);"
onclick="if (event.button == 1) BrowserHome(event);"
tooltip="home-button-tooltip"
ondraggesture="nsDragAndDrop.startDrag(event, homeButtonObserver)"
ondragdrop="nsDragAndDrop.drop(event, homeButtonObserver); event.stopPropagation()"
ondragenter="event.stopPropagation()"
ondragexit="nsDragAndDrop.dragExit(event, homeButtonObserver); event.stopPropagation()"
ondragover="nsDragAndDrop.dragOver(event, homeButtonObserver); event.stopPropagation()"/>
<toolbaritem id="nav-bar-inner" align="center" flex="1" persist="width"
class="chromeclass-location"
title="&locationBar.title;">
<!-- Need hidden label on textbox for accessibility, because what
receives focus needs a text name -->
<label control="urlbar" hidden="true" value="&locationBar.title;"/>
<textbox id="urlbar" class="chromeclass-location uri-element" flex="1"
type="autocomplete" autocompletesearch="history file"
timeout="50" maxrows="6"
disablehistory="false" accesskey="&locationBar.accesskey;"
defaultSearchEngine="true" tabscrolling="true"
showcommentcolumn="true"
inputtooltiptext="&locationBar.tooltip;"
newlines="stripsurroundingwhitespace"
oninput="gBrowser.userTypedValue = this.value;"
ontextentered="return handleURLBarCommand(eventParam, domEvent);"
ontextreverted="return handleURLBarRevert();"
onfocus="URLBarFocusHandler(event);"
onmousedown="URLBarMouseDownHandler(event);"
onclick="URLBarClickHandler(event);">
<deck id="page-proxy-deck"
class="urlbar-icons"
onclick="handlePageProxyClick(event);">
<image id="page-proxy-button"
ondraggesture="PageProxyDragGesture(event);"
tooltiptext="&proxyIcon.tooltip;"/>
<image id="page-proxy-favicon" validate="never"
ondraggesture="PageProxyDragGesture(event);"
onload="this.parentNode.selectedIndex = 1;
event.stopPropagation();
HandleBookmarkIcon(this.src, true);"
onerror="gBrowser.addToMissedIconCache(this.src); HandleBookmarkIcon(this.src, false);"
tooltiptext="&proxyIcon.tooltip;"/>
</deck>
<hbox id="urlbar-icons"
class="urlbar-icons">
<image id="feedsButton" hidden="true" popup="feedsPopup"/>
</hbox>
<menupopup id="ubhist-popup" class="autocomplete-history-popup"
popupalign="topleft" popupanchor="bottomleft"
onpopupshowing="createUBHistoryMenu(event.target);"
oncommand="executeUrlBarHistoryCommand(event.target);"/>
</textbox>
<button id="go-button" class="button-toolbar chromeclass-location"
label="&goButton.label;" hidden="true"
oncommand="addToUrlbarHistory(gURLBar.value); BrowserLoadURL(event);"
ondragover="nsDragAndDrop.dragOver(event, goButtonObserver);"
ondragdrop="nsDragAndDrop.drop(event, goButtonObserver);"
ondragexit="nsDragAndDrop.dragExit(event, goButtonObserver);"
tooltiptext="&goButton.tooltip;" default="true"/>
<button id="search-button" class="button-toolbar chromeclass-location"
label="&searchButton.label;"
oncommand="OpenSearch('internet', QualifySearchTerm());"
ondragover="nsDragAndDrop.dragOver(event, searchButtonObserver);"
ondragdrop="nsDragAndDrop.drop(event, searchButtonObserver);"
ondragexit="nsDragAndDrop.dragExit(event, searchButtonObserver);"
tooltiptext="&searchButton.tooltip;"/>
</toolbaritem>
<toolbarbutton id="print-button" type="menu-button"
class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&printButton.label;"
oncommand="if (event.target==this) PrintUtils.print();"
tooltiptext="&printButton.tooltip;">
<menupopup id="printMenu">
<menuitem id="printMenuItemToolbar" label="&printCmd.label;" accesskey="&printCmd.accesskey;"
default="true" oncommand="PrintUtils.print()"/>
<menuitem id="printPreviewMenuItemToolbar" label="&printPreviewCmd.label;" accesskey="&printPreviewCmd.accesskey;"
oncommand="setTimeout(BrowserPrintPreview, 0);"/>
</menupopup>
</toolbarbutton>
<toolbaritem id="throbber-box" align="center">
<button id="navigator-throbber" oncommand="goClickThrobber('browser.throbber.url')"
tooltiptext="&throbber.tooltip;"/>
</toolbaritem>
<!-- "Bookmarks" button on personal toolbar -->
<toolbarbutton type="menu" id="bookmarks-button" class="bookmark-item"
label="&bookmarksButton.label;"
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch"
ref="NC:BookmarksRoot" container="true" flags="dont-test-empty"
tooltip="btTooltip"
oncommand="BookmarksMenu.loadBookmark(event, this.database);"
onclick="BookmarksMenu.loadBookmarkMiddleClick(event, this.database)"
template="bookmarksMenuTemplate"
onmouseover="BookmarksToolbar.autoOpenMenu(event.target);"
onpopupshowing="BookmarksToolbar.onMenuOpen(event.target);"
onpopuphidden="BookmarksToolbar.onMenuClose(event.target);"
ondraggesture="if (event.target.id!='bookmarks-button') nsDragAndDrop.startDrag(event, BookmarksMenuDNDObserver); event.stopPropagation()"
ondragdrop="nsDragAndDrop.drop(event, BookmarksMenuDNDObserver); event.stopPropagation()"
ondragenter="nsDragAndDrop.dragEnter(event, BookmarksMenuDNDObserver); event.stopPropagation()"
ondragexit="nsDragAndDrop.dragExit(event, BookmarksMenuDNDObserver); event.stopPropagation()"
ondragover="nsDragAndDrop.dragOver(event, BookmarksMenuDNDObserver); event.stopPropagation()">
<menupopup context="bookmarks-context-menu"
onpopupshowing="updateGroupmarkCommand();">
<menuitem command="Browser:AddBookmark"/>
<menuitem command="Browser:AddBookmarkAs"/>
<menuitem command="Browser:AddGroupmarkAs"/>
<menuitem command="Browser:ManageBookmark"/>
<menuseparator id="lastStaticSeparator"/>
</menupopup>
</toolbarbutton>
<toolbaritem id="personal-bookmarks"
flex="1"
style="min-width:0px; width:0px;"
class="chromeclass-directories"
onmouseover="BookmarksToolbar.autoOpenMenu(event.target);"
onpopupshowing="BookmarksToolbar.onMenuOpen(event.target);"
onpopuphidden="BookmarksToolbar.onMenuClose(event.target);"
ondraggesture="nsDragAndDrop.startDrag(event, BookmarksMenuDNDObserver)"
ondragdrop="nsDragAndDrop.drop(event, BookmarksMenuDNDObserver); event.stopPropagation()"
ondragenter="nsDragAndDrop.dragEnter(event, BookmarksMenuDNDObserver); event.stopPropagation()"
ondragexit="nsDragAndDrop.dragExit(event, BookmarksMenuDNDObserver); event.stopPropagation()"
ondragover="nsDragAndDrop.dragOver(event, BookmarksMenuDNDObserver); event.stopPropagation()">
<toolbarbutton class="bookmark-item bookmarks-toolbar-customize" mousethrough="never"
label="&bookmarksToolbarItem.label;"/>
<!-- Personal toolbar items -->
<hbox id="bookmarks-ptf" flex="1" style="min-width: 1px;"
class="bookmarks-toolbar-items"
context="bookmarks-context-menu"
template="bookmarksMenuTemplate"
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch"
ref="NC:PersonalToolbarFolder" flags="dont-test-empty"
rdf:type="http://home.netscape.com/NC-rdf#Folder"
tooltip="btTooltip"
oncommand="BookmarksUtils.loadBookmarkBrowser(event, this.database)"
onclick="BookmarksMenu.loadBookmarkMiddleClick(event, this.database)"
onmouseover="BookmarksToolbar.autoOpenMenu(event.target);"
onpopupshowing="BookmarksToolbar.onMenuOpen(event.target);"
onpopuphidden="BookmarksToolbar.onMenuClose(event.target);">
</hbox>
<hbox class="bookmarks-toolbar-overflow-items" mousethrough="always">
<hbox mousethrough="always" id="overflow-padder" flex="1"/>
<toolbarbutton id="bookmarks-chevron" type="menu" class="chevron"
mousethrough="never" collapsed="true"
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch"
template="bookmarksMenuTemplate"
ref="NC:PersonalToolbarFolder" flags="dont-test-empty"
tooltip="btTooltip"
oncommand="BookmarksUtils.loadBookmarkBrowser(event, this.database)"
onclick="BookmarksMenu.loadBookmarkMiddleClick(event, this.database)"
onmouseover="BookmarksToolbar.autoOpenMenu(event.target);"
onpopupshowing="BookmarksToolbar.onMenuOpen(event.target);"
onpopuphidden="BookmarksToolbar.onMenuClose(event.target);">
<menupopup id="bookmarks-chevron-popup"
context="bookmarks-context-menu"
onpopupshowing="if (event.target == this) BookmarksToolbar.updateOverflowMenu(this);"/>
</toolbarbutton>
</hbox>
</toolbaritem>
</toolbarpalette>
</toolbox>
<hbox flex="1">
<vbox id="sidebar-box" class="chromeclass-extrachrome"/>
<splitter id="sidebar-splitter" class="chromeclass-extrachrome" />
<!-- we only need to handle |ondragdrop| because everything else is
taken care of by the builtin behavior inside the tabbrowser -->
<vbox id="appcontent" flex="1"
ondragdrop="nsDragAndDrop.drop(event, contentAreaDNDObserver);">
<!-- this box is temporary, pending XBLified <browser> -->
<hbox id="browser" flex="1">
<tabbrowser id="content"
flex="1" contenttooltip="aHTMLTooltip"
contentcontextmenu="contentAreaContextMenu"
onnewtab="BrowserOpenTab();"
autocompletepopup="PopupAutoComplete"
onbookmarkgroup="addGroupmarkAs();"
onclick="return contentAreaClick(event);"
oncommand="BrowserOnCommand(event);"/>
<!-- The oncommand listener above lets us fix bugs like 401575 which
require error page UI to do privileged things, without letting
error pages have any privilege themselves. -->
</hbox>
</vbox>
</hbox>
<panel id="customizeToolbarSheetPopup"/>
<statusbar id="status-bar" class="chromeclass-status"
ondragdrop="nsDragAndDrop.drop(event, contentAreaDNDObserver);">
<statusbarpanel id="component-bar"/>
<statusbarpanel id="statusbar-display" label="&statusText.label;" flex="1"/>
<statusbarpanel class="statusbarpanel-progress" id="statusbar-progresspanel" collapsed="true">
<progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0"/>
</statusbarpanel>
<statusbarpanel id="popupIcon" class="statusbarpanel-iconic" hidden="true"
oncommand="StatusbarViewPopupManager()"
tooltiptext="&popupIcon.tooltiptext;"
context="popupBlockerMenu"/>
<statusbarpanel class="statusbarpanel-iconic" id="offline-status"/>
<statusbarpanel class="statusbarpanel-iconic-text"
id="security-button" dir="reverse"
oncommand="BrowserPageInfo(null, 'securityTab')"/>
</statusbar>
<popupset>
<menupopup id="popupBlockerMenu"
oncommand="popupBlockerMenuCommand(event.target);"
onpopupshowing="return popupBlockerMenuShowing(event)"/>
<!-- Items are generated, see popupBlockerMenuShowing() -->
</popupset>
<popup id="popupNotificationMenu"/>
<popupset>
<popup id="networkProperties"/>
</popupset>
</window>