gecko-dev/suite/browser/navigator.xul

366 lines
16 KiB
Plaintext
Raw Normal View History

<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
<!-- 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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s): ______________________________________. -->
2006-09-14 05:49:41 +00:00
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
<?xul-overlay href="chrome://navigator/content/navigatorOverlay.xul"?>
<?xul-overlay href="chrome://global/content/tasksOverlay.xul"?>
2006-09-14 05:49:27 +00:00
<?xul-overlay href="chrome://communicator/content/sidebar/sidebarOverlay.xul"?>
2006-09-14 05:47:36 +00:00
<?xul-overlay href="chrome://navigator/content/NavSecurityOverlay.xul"?>
1999-07-01 22:56:04 +00:00
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % navigatorDTD SYSTEM "chrome://navigator/locale/navigator.dtd" >
%navigatorDTD;
]>
<window id="main-window" xmlns:html="http://www.w3.org/TR/REC-html40"
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()"
contenttitlesettting="true"
title="&mainWindow.title;"
titlemodifier="&mainWindow.titlemodifier;"
titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
viewsourcetitlepreface="&viewsourcetitle.preface;"
windowtype="navigator:browser"
align="vertical"
width="640" height="480"
screenX="10" screenY="10"
persist="screenX screenY width height sizemode"
ondraggesture="return GeneralDrag(event);">
2006-09-14 05:49:41 +00:00
<script language="javascript" src="chrome://global/content/strres.js"></script>
<script language="javascript" src="chrome://navigator/content/navigator.js"></script>
<script language="javascript" src="nsContextMenu.js"></script>
<script language="javascript" src="tooltip.js"></script>
<script language="javascript" src="navigatorDD.js"></script>
1999-07-01 22:56:04 +00:00
<commands id="commands">
<commandset id="globalEditMenuItems"/>
<commandset id="selectEditMenuItems"/>
<commandset id="undoEditMenuItems"/>
</commands>
<!-- broadcasters are appended from the overlay -->
<broadcasterset id="broadcasterset">
1999-10-26 00:39:19 +00:00
<broadcaster id="canReload" oncommand="BrowserReallyReload(0);"/>
<broadcaster id="canPrint"/>
<broadcaster id="args" value=""/>
</broadcasterset>
<!-- keys are appended from the overlay -->
<keyset id="keyset"/>
<!-- This needs to go into a xul fragment, but since those don't work now, this stays here !-->
2006-09-14 05:49:41 +00:00
<popupset>
<popup id="aTooltip" oncreate="return FillInTooltip(document.tooltipNode);">
<text id="replaceMe" crop="right"/>
</popup>
</popupset>
1999-09-22 07:20:06 +00:00
<!-- Context menu -->
2006-09-14 05:49:41 +00:00
<script language="javascript">
1999-10-01 04:43:45 +00:00
// Global variable that holds the nsContextMenu instance.
var contextMenu = null;
2006-09-14 05:49:41 +00:00
</script>
1999-09-16 04:15:40 +00:00
<popupset>
<!-- This is the context menu for the content-area of the navigator
window. It contains each and every possible menu choice. The
appropriate items are hidden/shown upon display, based on what
the user has clicked-on.
1999-09-16 04:15:40 +00:00
-->
<popup id="context"
oncreate="contextMenu = new nsContextMenu( this );"
ondestroy="contextMenu.onDestroy(); contextMenu = null;">
1999-09-16 04:15:40 +00:00
1999-09-17 23:53:20 +00:00
<!-- Open ==================================== -->
<menuitem id="context-openlink"
1999-09-17 23:53:20 +00:00
value="&openLinkCmd.label;"
accesskey=""
1999-10-01 04:43:45 +00:00
oncommand="contextMenu.openLink();"/>
<menuitem id="context-editlink"
1999-09-17 23:53:20 +00:00
value="&editLinkCmd.label;"
accesskey=""
1999-10-01 04:43:45 +00:00
oncommand="contextMenu.editLink();"/>
<menuitem id="context-openframe"
1999-09-17 23:53:20 +00:00
value="&openFrameCmd.label;"
accesskey=""
1999-10-01 04:43:45 +00:00
oncommand="contextMenu.openFrame();"/>
1999-09-22 07:20:06 +00:00
<menuseparator id="context-sep-open"/>
1999-09-17 23:53:20 +00:00
<!-- Navigation ============================== -->
<menuitem id="context-back"
1999-09-16 04:15:40 +00:00
value="&goBackCmd.label;"
accesskey="&goBackCmd.accesskey;"
oncommand="BrowserBack()"/>
<menuitem id="context-forward"
1999-09-16 04:15:40 +00:00
value="&goForwardCmd.label;"
accesskey="&goForwardCmd.accesskey;"
oncommand="BrowserForward()"/>
<menuitem id="context-reload"
1999-09-16 04:15:40 +00:00
value="&reloadCmd.label;"
1999-09-17 23:53:20 +00:00
accesskey=""
1999-09-16 04:15:40 +00:00
oncommand="BrowserReallyReload(0);"/>
<menuitem id="context-stop"
1999-09-16 04:15:40 +00:00
value="&stopCmd.label;"
1999-09-17 23:53:20 +00:00
accesskey=""
1999-09-16 04:15:40 +00:00
oncommand="BrowserStop();"/>
<menuseparator/>
1999-09-17 23:53:20 +00:00
<!-- View ==================================== -->
<menuitem id="context-viewsource"
1999-09-17 23:53:20 +00:00
value="&viewPageSourceCmd.label;"
accesskey=""
1999-09-16 04:15:40 +00:00
oncommand="BrowserViewSource();"/>
<menuitem id="context-viewframesource"
1999-09-17 23:53:20 +00:00
value="&viewFrameSourceCmd.label;"
accesskey=""
1999-10-01 04:43:45 +00:00
oncommand="contextMenu.viewFrameSource();"/>
<menuitem id="context-viewinfo"
1999-09-17 23:53:20 +00:00
value="&viewPageInfoCmd.label;"
accesskey=""
1999-10-01 04:43:45 +00:00
oncommand="contextMenu.viewInfo();"/>
<menuitem id="context-viewframeinfo"
1999-09-17 23:53:20 +00:00
value="&viewFrameInfoCmd.label;"
accesskey=""
1999-10-01 04:43:45 +00:00
oncommand="contextMenu.viewFrameInfo();"/>
<menuitem id="context-viewimage"
1999-09-17 23:53:20 +00:00
value="&viewImageCmd.label;"
accesskey=""
1999-10-01 04:43:45 +00:00
oncommand="contextMenu.viewImage();"/>
<menuitem id="context-blockimage"
value="&blockImageCmd.label;"
accesskey=""
oncommand="contextMenu.blockImage();"/>
1999-09-17 23:53:20 +00:00
<menuseparator/>
<!-- Misc ==================================== -->
<menuitem id="context-bookmarkpage"
1999-09-17 23:53:20 +00:00
value="&bookmarkPageCmd.label;"
accesskey="&bookmarkPageCmd.accesskey;"
oncommand="BrowserAddBookmark( window.content.location.href,
window.content.document.title )"/>
<menuseparator/>
1999-09-17 23:53:20 +00:00
<!-- Save ==================================== -->
<menuitem id="context-savepage"
1999-09-17 23:53:20 +00:00
value="&savePageCmd.label;"
accesskey="&savePageCmd.accesskey;"
1999-10-01 04:43:45 +00:00
oncommand="contextMenu.savePage();"/>
<menuitem id="context-saveframe"
1999-09-17 23:53:20 +00:00
value="&saveFrameCmd.label;"
accesskey="&saveFrameCmd.accesskey;"
1999-10-01 04:43:45 +00:00
oncommand="contextMenu.saveFrame();"/>
<menuitem id="context-savelink"
1999-09-17 23:53:20 +00:00
value="&saveLinkCmd.label;"
accesskey="&saveLinkCmd.accesskey;"
1999-10-01 04:43:45 +00:00
oncommand="contextMenu.saveLink();"/>
<menuitem id="context-saveimage"
1999-09-17 23:53:20 +00:00
value="&saveImageCmd.label;"
accesskey="&saveImageCmd.accesskey;"
1999-10-01 04:43:45 +00:00
oncommand="contextMenu.saveImage();"/>
<menuitem id="context-savebgimage"
1999-09-17 23:53:20 +00:00
value="&saveBGImageCmd.label;"
accesskey="&saveBGImageCmd.accesskey;"
1999-10-01 04:43:45 +00:00
oncommand="contextMenu.saveBGImage();"/>
1999-09-17 23:53:20 +00:00
<menuseparator/>
<!-- Clipboard =============================== -->
<menuitem id="context-selectall"
1999-09-17 23:53:20 +00:00
value="&selectAllCmd.label;"
accesskey="&selectAllCmd.accesskey;"
observes="cmd_selectAll"/>
<menuitem id="context-cut"
value="&cutCmd.label;"
accesskey="&cutCmd.accesskey;"
observes="cmd_cut"/>
<menuitem id="context-copy"
1999-09-17 23:53:20 +00:00
value="&copyCmd.label;"
accesskey="&copyCmd.accesskey;"
observes="cmd_copy"/>
<menuitem id="context-paste"
value="&pasteCmd.label;"
accesskey="&pasteCmd.accesskey;"
observes="cmd_paste"/>
<menuitem id="context-copylink"
1999-09-17 23:53:20 +00:00
value="&copyLinkCmd.label;"
accesskey="&copyLinkCmd.accesskey;"
1999-10-01 04:43:45 +00:00
oncommand="contextMenu.copyLink();"/>
<menuitem id="context-copyimage"
1999-09-17 23:53:20 +00:00
value="&copyImageCmd.label;"
accesskey="&copyImageCmd.accesskey;"
1999-10-01 04:43:45 +00:00
oncommand="contextMenu.copyImage();"/>
1999-09-16 04:15:40 +00:00
</popup>
</popupset>
2006-09-14 05:49:41 +00:00
<script language="javascript">
var gBookmarkPopup = null;
2006-09-14 05:49:41 +00:00
</script>
2006-09-14 05:49:41 +00:00
<toolbox>
<!-- Menu -->
<menubar id="main-menubar"/>
1999-10-26 00:39:19 +00:00
2006-09-14 05:49:41 +00:00
<toolbar id="nav-bar" class="toolbar-primary chromeclass-toolbar" persist="collapsed">
<box id="nav-bar-inner" autostretch="never" flex="1">
<!--
2006-09-14 05:49:41 +00:00
<button class="button-toolbar-1 top" id="back-button" crop="right" observes="canGoBack"/>
<button class="button-toolbar-1 top" id="forward-button" crop="right" observes="canGoForward"/>
-->
<menubutton class="menubutton-dual" id="back-button" crop="right" orient="vertical" observes="canGoBack" oncommand="gotoHistoryIndex(event);">
2006-09-14 05:49:41 +00:00
<menupopup oncreate="BrowserBackMenu(event);">
</menupopup>
</menubutton>
<menubutton class="menubutton-dual" id="forward-button" crop="right" orient="vertical" observes="canGoForward" oncommand="gotoHistoryIndex(event);">
2006-09-14 05:49:41 +00:00
<menupopup oncreate="BrowserForwardMenu(event);">
</menupopup>
</menubutton>
<button class="button-toolbar-1 top" id="reload-button" crop="right" observes="canReload" />
<button class="button-toolbar-1 top" id="stop-button" crop="right" observes="canStop" onclick="BrowserStop()"/>
2006-09-14 05:49:47 +00:00
<box class="box-toolbar-group" flex="1">
<menubutton class="menubutton-icon button-toolbar-3" id="ubhist-keyword-popup">
<menupopup class="button-toolbar-3" oncreate="CreateUBHistoryMenu(event);" oncommand="ExecuteUBCommand(event);">
<menuitem class="button-toolbar-3 menuitem-non-iconic" value="&quoteKeyword.label;" keyword="quote"/>
<menuitem class="button-toolbar-3 menuitem-non-iconic" value="&localKeyword.label;" keyword="local"/>
<menuitem class="button-toolbar-3 menuitem-non-iconic" value="&shopKeyword.label;" keyword="shop"/>
<menuitem class="button-toolbar-3 menuitem-non-iconic" value="&careerKeyword.label;" keyword="career"/>
<menuitem class="button-toolbar-3 menuitem-non-iconic" value="&webmailKeyword.label;" keyword="webmail"/>
<menuitem class="button-toolbar-3 menuitem-non-iconic" value="&listKeywords.label;" keyword="list"/>
<menuseparator/>
</menupopup>
</menubutton>
2006-09-14 05:49:41 +00:00
<box autostretch="never" valign="middle" flex="1">
<image id="page-proxy-button" ondraggesture="DragProxyIcon(event);"/>
2006-09-14 05:49:47 +00:00
<textfield class="plain chromeclass-location" id="urlbar" onkeypress="if( event.which == 13 ) { AddToUrlbarHistory(); BrowserLoadURL(); }" flex="1"/>
<!--<autocomplete class="plain chromeclass-location" searchSessionType="urlbar" id="urlbar" onkeypress="if( event.which == 13 ) { AddToUrlbarHistory(); BrowserLoadURL(); }" flex="1"/> -->
2006-09-14 05:49:41 +00:00
<button class="button-toolbar-3" id="search-button" value="&searchButton.label;" oncommand="OpenSearch('internet',false, document.getElementById('urlbar').value);" />
<button class="button-toolbar-3" id="go-button" value="&goButton.label;" oncommand="BrowserLoadURL();" />
</box>
</box>
</box>
<button class="plain" id="navigator-throbber" oncommand="goClickThrobber('browser.throbber.url')"/>
</toolbar>
<toolbar id="PersonalToolbar" class="chromeclass-directories" persist="collapsed" dragdroparea="innermostBox"
ondraggesture="return BeginDragPersonalToolbar(event);"
ondragdrop="return DropPersonalToolbar(event);"
ondragover="return DragOverPersonalToolbar(event);">
2006-09-14 05:49:41 +00:00
<menubutton class="button-toolbar bookmarkfolder" id="PersonalMenu" datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch rdf:httpindex"
ref="NC:BookmarksRoot" container="true" value="&bookmarksButton.label;"
oncommand="OpenBookmarkURL(event.target, document.getElementById('PersonalMenu').database)">
<template>
<rule iscontainer="true">
<menupopup>
2006-09-14 05:49:46 +00:00
<menu class="menu-iconic bookmarkfolder" uri="rdf:*" value="rdf:http://home.netscape.com/NC-rdf#Name" >
2006-09-14 05:49:38 +00:00
<menupopup/>
</menu>
</menupopup>
</rule>
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
<menupopup>
2006-09-14 05:49:38 +00:00
<menuseparator uri="rdf:*"/>
</menupopup>
</rule>
<rule>
<menupopup>
2006-09-14 05:49:41 +00:00
<menuitem class="menuitem-iconic bookmarkitem" uri="rdf:*" value="rdf:http://home.netscape.com/NC-rdf#Name" />
</menupopup>
</rule>
</template>
1999-10-26 00:39:19 +00:00
2006-09-14 05:49:41 +00:00
<menupopup/>
</menubutton>
2006-09-14 05:44:21 +00:00
<box id="innermostBox" flex="1" style="min-width: 1px;" datasources="rdf:bookmarks" ref="NC:PersonalToolbarFolder">
2006-09-14 05:49:41 +00:00
<template>
<rule parent="box" iscontainer="true">
<menubutton class="button-toolbar bookmarkfolder" uri="..." value="rdf:http://home.netscape.com/NC-rdf#Name">
<menupopup/>
</menubutton>
</rule>
2006-09-14 05:49:08 +00:00
2006-09-14 05:49:41 +00:00
<rule parent="box">
<button class="button-toolbar bookmarkitem" uri="rdf:*" value="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="OpenBookmarkURL(event.target, document.getElementById('innermostBox').database);"/>
</rule>
<rule iscontainer="true">
<menupopup>
<menu class="menu-iconic bookmarkfolder" uri="rdf:*" value="rdf:http://home.netscape.com/NC-rdf#Name">
<menupopup/>
</menu>
</menupopup>
</rule>
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
<menupopup>
<menuseparator uri="rdf:*" />
</menupopup>
</rule>
<rule>
<menupopup>
<menuitem class="menuitem-iconic bookmarkitem" uri="..." value="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="OpenBookmarkURL(event.target, document.getElementById('innermostBox').database)"/>
</menupopup>
</rule>
</template>
<button class="button-toolbar" id="homebutton" value="&homeButton.label;" oncommand="BrowserHome(); event.preventBubble();"/>
</box>
2006-09-14 05:49:41 +00:00
</toolbar>
2006-09-14 05:44:21 +00:00
2006-09-14 05:49:41 +00:00
</toolbox>
<box flex="1">
<box id="sidebar-box" class="chromeclass-extrachrome"/>
<splitter id="sidebar-splitter" class="chromeclass-extrachrome" />
1999-10-26 00:39:19 +00:00
2006-09-14 05:49:41 +00:00
<box id="appcontent" align="vertical" flex="100%"
onclick="if (event.button==2) browserHandleMiddleClick(event);"
ondragover="return DragOverContentArea(event);"
ondragdrop="return DropOnContentArea(event);"
ondraggesture="DragContentLink(event);">
<!-- type attribute is used by frame construction to locate iframes
intended to hold (html) content -->
<browser context="context" type="content-primary" id="content" src="about:blank" flex="100%"/>
1999-10-26 00:39:19 +00:00
2006-09-14 05:49:41 +00:00
<box id="status-bar" class="chromeclass-status"/>
1999-10-26 00:39:19 +00:00
</box>
2006-09-14 05:49:41 +00:00
</box>
2006-09-14 05:49:41 +00:00
<toolbar id="taskbar" class="chromeclass-extrachrome" />
1999-07-01 22:56:04 +00:00
</window>