gecko-dev/xpfe/communicator/resources/content/contentAreaContextOverlay.xul

166 строки
7.7 KiB
XML

<?xml version="1.0"?>
<!-- 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):
- Blake Ross <blakeross@telocity.com>
-->
<!DOCTYPE window SYSTEM "chrome://communicator/locale/contentAreaCommands.dtd" >
<overlay id="contentAreaContextOverlay"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!-- Context menu -->
<!-- XXX: Replace strres.js when nsContextMenu.js is converted -->
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
<script type="application/x-javascript">
// Global variable that holds the nsContextMenu instance.
var contextMenu = null;
</script>
<script type="application/x-javascript" src="chrome://communicator/content/nsContextMenu.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaUtils.js"/>
<popupset id="contentAreaContextSet">
<!-- This is a generic context menu for a content area. It contains
each and every possible menu choice. The appropriate items are
hidden/shown upon display, based on what the user has clicked-on.
-->
<popup id="contentAreaContextMenu"
oncreate="contextMenu = new nsContextMenu( this ); return contextMenu.shouldDisplay;"
ondestroy="contextMenu.onDestroy(); contextMenu = null;">
<!-- Open ==================================== -->
<menuitem id="context-openlink"
label="&openLinkCmd.label;"
oncommand="contextMenu.openLink();"/>
<!-- XXX - DEPENDENT ON PRESENCE OF EDITOR!! - XXX -->
<menuitem id="context-editlink"
label="&editLinkCmd.label;"
oncommand="contextMenu.editLink();"/>
<menuitem id="context-openframe"
label="&openFrameCmd.label;"
oncommand="contextMenu.openFrame();"/>
<menuitem id="context-showonlythisframe"
label="&showOnlyThisFrameCmd.label;"
accesskey="&showOnlyThisFrameCmd.accesskey;"
oncommand="contextMenu.showOnlyThisFrame();"/>
<menuseparator id="context-sep-open"/>
<!-- Navigation ============================== -->
<menuitem id="context-back"
label="&goBackCmd.label;"
accesskey="&goBackCmd.accesskey;"
oncommand="BrowserBack()"/>
<menuitem id="context-forward"
label="&goForwardCmd.label;"
accesskey="&goForwardCmd.accesskey;"
oncommand="BrowserForward()"/>
<menuitem id="context-reload"
label="&reloadCmd.label;"
accesskey="&reloadCmd.accesskey;"
oncommand="BrowserReload();"/>
<menuitem id="context-reload-frame"
label="&reloadFrameCmd.label;"
accesskey="&reloadFrameCmd.accesskey;"
oncommand="contextMenu.reloadFrame();"/>
<menuitem id="context-stop"
label="&stopCmd.label;"
oncommand="BrowserStop();"/>
<menuseparator id="context-sep-navigation"/>
<!-- View ==================================== -->
<menuitem id="context-viewsource"
label="&viewPageSourceCmd.label;"
oncommand="BrowserViewSource();"/>
<menuitem id="context-viewframesource"
label="&viewFrameSourceCmd.label;"
oncommand="contextMenu.viewFrameSource();"/>
<menuitem id="context-viewinfo"
label="&viewPageInfoCmd.label;"
oncommand="contextMenu.viewInfo();"/>
<menuitem id="context-viewframeinfo"
label="&viewFrameInfoCmd.label;"
oncommand="contextMenu.viewFrameInfo();"/>
<menuitem id="context-viewimage"
label="&viewImageCmd.label;"
oncommand="contextMenu.viewImage();"/>
<menuseparator id="context-sep-view"/>
<!-- Misc ==================================== -->
<menuitem id="context-bookmarkpage"
label="&bookmarkPageCmd.label;"
accesskey="&bookmarkPageCmd.accesskey;"
oncommand="BookmarksUtils.addBookmarkForBrowser(document.getElementById('content').webNavigation);"/>
<menuitem id="context-bookmarklink"
label="&bookmarkLinkCmd.label;"
accesskey="&bookmarkLinkCmd.accesskey;"
oncommand="BookmarksUtils.addBookmark(contextMenu.linkURL(),
contextMenu.linkText());"/>
<menuseparator id="context-sep-bookmark"/>
<!-- Save ==================================== -->
<menuitem id="context-savepage"
label="&savePageCmd.label;"
accesskey="&savePageCmd.accesskey;"
oncommand="contextMenu.savePage();"/>
<menuitem id="context-saveframe"
label="&saveFrameCmd.label;"
accesskey="&saveFrameCmd.accesskey;"
oncommand="contextMenu.saveFrame();"/>
<menuitem id="context-savelink"
label="&saveLinkCmd.label;"
accesskey="&saveLinkCmd.accesskey;"
oncommand="contextMenu.saveLink();"/>
<menuitem id="context-saveimage"
accesskey="&saveImageCmd.accesskey;"
oncommand="contextMenu.saveImage();"/>
<menuitem id="context-savebgimage"
label="&saveBGImageCmd.label;"
accesskey="&saveBGImageCmd.accesskey;"
oncommand="contextMenu.saveBGImage();"/>
<menuseparator id="context-sep-save"/>
<!-- Clipboard =============================== -->
<menuitem id="context-selectall"
label="&selectAllCmd.label;"
accesskey="&selectAllCmd.accesskey;"
command="cmd_selectAll"/>
<menuitem id="context-cut"
label="&cutCmd.label;"
accesskey="&cutCmd.accesskey;"
command="cmd_cut"/>
<menuitem id="context-copy"
label="&copyCmd.label;"
accesskey="&copyCmd.accesskey;"
command="cmd_copy"/>
<menuitem id="context-paste"
label="&pasteCmd.label;"
accesskey="&pasteCmd.accesskey;"
command="cmd_paste"/>
<menuitem id="context-copylink"
label="&copyLinkCmd.label;"
accesskey="&copyLinkCmd.accesskey;"
oncommand="contextMenu.copyLink();"/>
<menuitem id="context-copyimage"
label="&copyImageCmd.label;"
accesskey="&copyImageCmd.accesskey;"
oncommand="contextMenu.copyImage();"/>
<menuseparator id="context-sep-clip"/>
<!-- Metadata ================================ -->
<menuitem id="context-metadata"
label="&metadataCmd.label;"
oncommand="contextMenu.showMetadata();"/>
</popup>
</popupset>
</overlay>