RetroZilla/xpfe/browser/resources/content/navigator.xul
2016-04-14 23:02:37 -04:00

392 lines
20 KiB
XML

<?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/navExtraOverlay.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/communicatorOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/bookmarks/bookmarksOverlay.xul"?>
<!-- Extension-specific overlays -->
<?xul-overlay href="chrome://global/content/extensions/sessionmanager/sessionmanager.xul"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
<!ENTITY % buildDTD SYSTEM "chrome://global/content/build.dtd" >
%buildDTD;
<!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"
width="610" height="450"
screenX="4" screenY="4"
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/nsTransferable.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsClipboard.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
<script type="application/x-javascript" src="chrome://global/content/fullScreen.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://communicator/content/printing.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/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="bundle_brand_region" src="chrome://global-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>
<!-- broadcasters are appended from the overlay -->
<broadcasterset id="navBroadcasters"/>
<!-- keys are appended from the overlay -->
<keyset id="navKeys">
<key id="showHideSidebar"/>
</keyset>
<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);">
<hbox>
<label flex="1" class="htmltooltip-label"/>
</hbox>
</tooltip>
<popup id="sidebarPopup"/>
<popupset id="bookmarksPopupset"/>
<tooltip id="btTooltip"/>
<template id="bookmarksMenuTemplate"/>
<!-- context menu -->
<popupset id="contentAreaContextSet"/>
<toolbox id="navigator-toolbox" class="toolbox-top" deferattached="true">
<!-- Menu -->
<menubar id="main-menubar" persist="collapsed" grippytooltiptext="&menuBar.tooltip;"/>
<toolbar class="toolbar-primary chromeclass-toolbar" id="nav-bar" persist="collapsed"
grippytooltiptext="&navigationToolbar.tooltip;"
tbalign="stretch" fullscreentoolbar="true">
<hbox id="nav-bar-buttons">
<toolbarbutton id="back-button" type="menu-button" class="toolbarbutton-1"
label="&backButton.label;"
oncommand="if (event.target==this) BrowserBack(); else gotoHistoryIndex(event);"
observes="canGoBack" context="backMenu"
tooltiptext="&backButton.tooltip;">
<menupopup context="" onpopupshowing="BrowserBackMenu(event);"/>
</toolbarbutton>
<toolbarbutton id="forward-button" type="menu-button" class="toolbarbutton-1"
label="&forwardButton.label;"
oncommand="if (event.target==this) BrowserForward(); else gotoHistoryIndex(event);"
observes="canGoForward" context="forwardMenu"
tooltiptext="&forwardButton.tooltip;">
<menupopup context="" onpopupshowing="BrowserForwardMenu(event);"/>
</toolbarbutton>
<toolbarbutton id="reload-button" class="toolbarbutton-1"
label="&reloadButton.label;"
oncommand="if (event.shiftKey) BrowserReloadSkipCache(); else BrowserReload();"
tooltiptext="&reloadButton.tooltip;"/>
<toolbarbutton id="stop-button" class="toolbarbutton-1"
label="&stopButton.label;"
oncommand="BrowserStop();" observes="canStop"
tooltiptext="&stopButton.tooltip;"/>
</hbox>
<hbox id="nav-bar-inner" flex="1">
<observes element="nav-bar" attribute="buttonstyle"/>
<!-- 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" searchSessions="history"
timeout="50" maxrows="6" alwaysopenpopup="true"
disablehistory="false" accesskey="&locationBar.accesskey;"
defaultSearchEngine="true" tabScrolling="true"
showCommentColumn="true"
inputtooltiptext="&locationBar.tooltip;"
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" 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>
<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;"/>
</hbox>
<toolbarbutton id="print-button" type="menu-button" class="toolbarbutton-1"
label="&printButton.label;"
oncommand="if (event.target==this) NSPrint();"
tooltiptext="&printButton.tooltip;">
<menupopup id="printMenu">
<menuitem id="printMenuItemToolbar" label="&printCmd.label;" accesskey="&printCmd.accesskey;"
default="true" oncommand="NSPrint()"/>
<menuitem id="printPreviewMenuItemToolbar" label="&printPreviewCmd.label;" accesskey="&printPreviewCmd.accesskey;"
oncommand="setTimeout(BrowserPrintPreview, 0);"/>
</menupopup>
</toolbarbutton>
<hbox id="throbber-box" align="center">
<button id="navigator-throbber" oncommand="goClickThrobber('browser.throbber.url')"
tooltiptext="&throbber.tooltip;"/>
</hbox>
<hbox id="window-controls" hidden="true" fullscreencontrol="true">
<toolbarbutton id="minimize-button" class="toolbarbutton-1"
tooltiptext="&minimizeButton.tooltip;"
oncommand="window.minimize();"/>
<toolbarbutton id="restore-button" class="toolbarbutton-1"
tooltiptext="&restoreButton.tooltip;"
oncommand="BrowserFullScreen();"/>
<toolbarbutton id="close-button" class="toolbarbutton-1"
tooltiptext="&closeWindow.label;"
oncommand="BrowserTryToCloseWindow();"/>
</hbox>
</toolbar>
<toolbar id="PersonalToolbar" class="chromeclass-directories" persist="collapsed"
grippytooltiptext="&personalToolbar.tooltip;" tbalign="stretch" prefixhidden="true"
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()">
<tooltip id="home-button-tooltip" noautohide="true">
<vbox id="home-button-tooltip-inner" flex="1"/>
</tooltip>
<toolbarbutton id="home-button" class="bookmark-item"
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()"/>
<toolbarseparator id="home-bm-separator"/>
<!-- "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"
ondraggesture="if (event.target.id=='bookmarks-button') 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>
<!-- Personal toolbar items -->
<hbox id="bookmarks-ptf" flex="1" style="min-width: 1px;"
context="bookmarks-context-menu" template="bookmarksMenuTemplate"
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch"
ref="NC:PersonalToolbarFolder" flags="dont-test-empty"
tooltip="btTooltip"
oncommand="BookmarksUtils.loadBookmarkBrowser(event, this.database)"
onclick="BookmarksMenu.loadBookmarkMiddleClick(event, this.database)"
rdf:type="http://home.netscape.com/NC-rdf#Folder">
</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)">
<menupopup id="bookmarks-chevron-popup"
context="bookmarks-context-menu"
onpopupshowing="if (event.target == this) BookmarksToolbar.updateOverflowMenu(this);"/>
</toolbarbutton>
</hbox>
</toolbar>
</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();"
onbookmarkgroup="addGroupmarkAs();"
onmousedown="return contentAreaMouseDown(event);"
onclick="return contentAreaClick(event);"/>
</hbox>
</vbox>
</hbox>
<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="progress-panel" hidden="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" id="security-button"
oncommand="BrowserPageInfo(null, 'securityTab')"/>
</statusbar>
<popupset>
<menupopup id="popupBlockerMenu"
oncommand="popupBlockerMenuCommand(event.target);"
onpopupshowing="return popupBlockerMenuShowing(event)"/>
<!-- Items are generated, see popupBlockerMenuShowing() -->
</popupset>
<popupset>
<popup id="networkProperties"/>
</popupset>
</window>