home *** CD-ROM | disk | FTP | other *** search
/ ftp.swcp.com / ftp.swcp.com.zip / ftp.swcp.com / mac / mozilla-macos9-1.3.1.sea.bin / Mozilla1.3.1 / Chrome / comm.jar / content / communicator / contentAreaContextOverlay.xul < prev    next >
Extensible Markup Language  |  2003-06-08  |  11KB  |  233 lines

  1. <?xml version="1.0"?> 
  2. <!-- The contents of this file are subject to the Netscape Public
  3.    - License Version 1.1 (the "License"); you may not use this file
  4.    - except in compliance with the License. You may obtain a copy of
  5.    - the License at http://www.mozilla.org/NPL/
  6.    - 
  7.    - Software distributed under the License is distributed on an "AS
  8.    - IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  9.    - implied. See the License for the specific language governing
  10.    - rights and limitations under the License.
  11.    - 
  12.    - The Original Code is Mozilla Communicator client code, released
  13.    - March 31, 1998.
  14.    - 
  15.    - The Initial Developer of the Original Code is Netscape
  16.    - Communications Corporation. Portions created by Netscape are
  17.    - Copyright (C) 1998-1999 Netscape Communications Corporation. All
  18.    - Rights Reserved.
  19.    - 
  20.    - Contributor(s):
  21.    -   Blake Ross <blakeross@telocity.com>
  22.    -->
  23. <!DOCTYPE overlay SYSTEM "chrome://communicator/locale/contentAreaCommands.dtd" >
  24. <overlay id="contentAreaContextOverlay"
  25.          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  26.  
  27.   <!-- Context menu -->
  28.   <!-- XXX: Replace strres.js when nsContextMenu.js is converted -->
  29.   <script type="application/x-javascript" src="chrome://global/content/strres.js"/>
  30.   <script type="application/x-javascript">
  31.     // Global variable that holds the nsContextMenu instance.
  32.     var gContextMenu = null;
  33.     
  34.     // Global variable that caches the default search engine info
  35.     var gDefaultEngine = null;
  36.   </script>
  37.   <script type="application/x-javascript" src="chrome://communicator/content/nsContextMenu.js"/>
  38.   <script type="application/x-javascript" src="chrome://communicator/content/contentAreaUtils.js"/>
  39.  
  40.   <popupset id="contentAreaContextSet">
  41.     <!-- This is a generic context menu for a content area. It contains 
  42.          each and every possible menu choice.  The appropriate items are
  43.          hidden/shown upon display, based on what the user has clicked-on.
  44.      -->
  45.     <popup id="contentAreaContextMenu"
  46.            onpopupshowing="gContextMenu = new nsContextMenu( this ); return gContextMenu.shouldDisplay;"
  47.            onpopuphiding="gContextMenu = null;">
  48.       <menuitem id="popupwindow-reject"
  49.                 label="&popupWindowRejectCmd.label;"
  50.                 accesskey="&popupWindowRejectCmd.accesskey;"
  51.                 oncommand="gContextMenu.rejectPopupWindows(event.shiftKey);"/>
  52.       <menuitem id="popupwindow-allow"
  53.                 label="&popupWindowAllowCmd.label;"
  54.                 accesskey="&popupWindowAllowCmd.accesskey;"
  55.                 oncommand="gContextMenu.allowPopupWindows();"/>
  56.       <menuseparator id="context-sep-popup"/>
  57.  
  58.       <menuitem id="context-openlink"
  59.                 label="&openLinkCmd.label;"
  60.                 accesskey="&openLinkCmd.accesskey;"
  61.                 oncommand="gContextMenu.openLink();"/>
  62.       <menuitem id="context-openlinkintab"
  63.                 label="&openLinkCmdInTab.label;"
  64.                 accesskey="&openLinkCmdInTab.accesskey;"
  65.                 oncommand="gContextMenu.openLinkInTab();"/>
  66.       <menuseparator id="context-sep-open"/>
  67.       <menuitem id="context-bookmarklink"
  68.                 label="&bookmarkLinkCmd.label;"
  69.                 accesskey="&bookmarkLinkCmd.accesskey;"
  70.                 oncommand="BookmarksUtils.addBookmark(gContextMenu.linkURL(),
  71.                                                       gContextMenu.linkText(), 
  72.                                                       undefined, false);"/>
  73.       <menuitem id="context-savelink"
  74.                 label="&saveLinkCmd.label;"
  75.                 accesskey="&saveLinkCmd.accesskey;"
  76.                 oncommand="gContextMenu.saveLink();"/>
  77.       <menuitem id="context-copyemail"
  78.                 label="©EmailCmd.label;"
  79.                 accesskey="©EmailCmd.accesskey;"
  80.                 oncommand="gContextMenu.copyEmail();"/>
  81.       <menuitem id="context-copylink"
  82.                 label="©LinkCmd.label;"
  83.                 accesskey="©LinkCmd.accesskey;"
  84.                 command="cmd_copyLink"/>
  85.       <menuseparator id="context-sep-copylink"/>
  86.       <menuitem id="context-fitimage"
  87.                 type="checkbox"
  88.                 label="&fitImageCmd.label;"
  89.                 accesskey="&fitImageCmd.accesskey;"
  90.                 oncommand="gContextMenu.toggleImageSize();"/>
  91.       <menuitem id="context-viewimage"
  92.                 label="&viewImageCmd.label;"
  93.                 accesskey="&viewImageCmd.accesskey;"
  94.                 oncommand="gContextMenu.viewImage();"/>
  95.       <menuitem id="context-copyimage"
  96.                 label="©ImageCmd.label;"
  97.                 accesskey="©ImageCmd.accesskey;"
  98.                 command="cmd_copyImageLocation"/>
  99.       <menuseparator id="context-sep-copyimage"/>
  100.       <menuitem id="context-saveimage"
  101.                 label="&saveImageCmd.label;"
  102.                 accesskey="&saveImageCmd.accesskey;"
  103.                 oncommand="gContextMenu.saveImage();"/>
  104.       <menuitem id="context-setWallpaper"
  105.                 label="&setWallpaperCmd.label;"
  106.                 accesskey="&setWallpaperCmd.accesskey;"
  107.                 oncommand="gContextMenu.setWallpaper();"/>
  108.       <menuseparator id="context-sep-image"/>
  109.       <menuitem id="context-back"
  110.                 label="&goBackCmd.label;"
  111.                 accesskey="&goBackCmd.accesskey;"
  112.                 oncommand="BrowserBack()"/>
  113.       <menuitem id="context-forward"
  114.                 label="&goForwardCmd.label;"
  115.                 accesskey="&goForwardCmd.accesskey;"
  116.                 oncommand="BrowserForward()"/>
  117.       <menuitem id="context-reload"
  118.                 label="&reloadCmd.label;"
  119.                 accesskey="&reloadCmd.accesskey;"
  120.                 oncommand="BrowserReload();"/>
  121.       <menuitem id="context-stop"
  122.                 label="&stopCmd.label;"
  123.                 accesskey="&stopCmd.accesskey;"
  124.                 disabled="true"
  125.                 oncommand="BrowserStop();"/>
  126.       <menuseparator id="context-sep-stop"/>
  127.       <menuitem id="context-bookmarkpage"
  128.                 label="&bookmarkPageCmd.label;"
  129.                 accesskey="&bookmarkPageCmd.accesskey;"
  130.                 oncommand="gContextMenu.addBookmark();"/>
  131.       <menuitem id="context-savepage"
  132.                 label="&savePageCmd.label;"
  133.                 accesskey="&savePageCmd.accesskey;"
  134.                 oncommand="saveDocument(window._content.document);"/>
  135.       <menuseparator id="context-sep-viewbgimage"/>
  136.       <menuitem id="context-viewbgimage"
  137.                 label="&viewBGImageCmd.label;"
  138.                 accesskey="&viewBGImageCmd.accesskey;"
  139.                 oncommand="gContextMenu.viewBGImage();"/>
  140.       <menuitem id="context-undo"
  141.                 label="&undoCmd.label;"
  142.                 accesskey="&undoCmd.accesskey;"
  143.                 command="cmd_undo"/>
  144.       <menuitem id="context-redo"
  145.                 label="&redoCmd.label;"
  146.                 accesskey="&redoCmd.accesskey;"
  147.                 command="cmd_redo"/>
  148.       <menuseparator id="context-sep-undo"/>
  149.       <menuitem id="context-cut"
  150.                 label="&cutCmd.label;"
  151.                 accesskey="&cutCmd.accesskey;"
  152.                 command="cmd_cut"/>
  153.       <menuitem id="context-copy"
  154.                 label="©Cmd.label;"
  155.                 accesskey="©Cmd.accesskey;"
  156.                 command="cmd_copy"/>
  157.       <menuitem id="context-paste"
  158.                 label="&pasteCmd.label;"
  159.                 accesskey="&pasteCmd.accesskey;"
  160.                 command="cmd_paste"/>
  161.       <menuitem id="context-delete"
  162.                 label="&deleteCmd.label;"
  163.                 accesskey="&deleteCmd.accesskey;"
  164.                 command="cmd_delete"/>
  165.       <menuseparator id="context-sep-paste"/>
  166.       <menuitem id="context-selectall"
  167.                 label="&selectAllCmd.label;"
  168.                 accesskey="&selectAllCmd.accesskey;"
  169.                 command="cmd_selectAll"/>      
  170.       <menuseparator id="context-sep-selectall"/>
  171.       <menuitem id="context-searchselect"
  172.                 accesskey="&search.accesskey;"
  173.                 oncommand="OpenSearch('internet', false, gContextMenu.searchSelected(), true);"/>
  174.       <menuseparator id="frame-sep"/>
  175.       <menu id="frame" label="&thisFrameMenu.label;" accesskey="&thisFrameMenu.accesskey;">
  176.         <menupopup id="frame_popup">
  177.           <menuitem label="&showOnlyThisFrameCmd.label;"
  178.                     accesskey="&showOnlyThisFrameCmd.accesskey;"
  179.                     oncommand="gContextMenu.showOnlyThisFrame();"/>
  180.           <menuitem label="&openFrameCmd.label;"
  181.                     accesskey="&openFrameCmd.accesskey;"
  182.                     oncommand="gContextMenu.openFrame();"/>
  183.           <menuitem label="&openFrameCmdInTab.label;"
  184.                     accesskey="&openFrameCmdInTab.accesskey;"
  185.                     oncommand="gContextMenu.openFrameInTab();"/>
  186.           <menuseparator/>
  187.           <menuitem id="context-reload-frame"
  188.                     label="&reloadFrameCmd.label;"
  189.                     accesskey="&reloadFrameCmd.accesskey;"
  190.                     oncommand="gContextMenu.reloadFrame();"/>
  191.           <menuseparator/>
  192.           <menuitem label="&bookmarkFrameCmd.label;"
  193.                     accesskey="&bookmarkFrameCmd.accesskey;"
  194.                     oncommand="gContextMenu.addBookmarkForFrame();"/>
  195.           <menuitem id="saveframeas"
  196.                     label="&saveFrameCmd.label;"
  197.                     accesskey="&saveFrameCmd.accesskey;"
  198.                     oncommand="saveDocument(gContextMenu.target.ownerDocument);"/>
  199.           <menuseparator/>
  200.           <menuitem label="&viewFrameSourceCmd.label;"
  201.                     accesskey="&viewFrameSourceCmd.accesskey;"
  202.                     oncommand="gContextMenu.viewFrameSource();"/>
  203.           <menuitem label="&viewFrameInfoCmd.label;"
  204.                     accesskey="&viewFrameInfoCmd.accesskey;"
  205.                     oncommand="gContextMenu.viewFrameInfo();"/>        
  206.         </menupopup>
  207.       </menu>
  208.       <menuseparator id="context-sep-properties"/>
  209.       <menuitem id="context-viewpartialsource-selection"
  210.                 label="&viewPartialSourceForSelectionCmd.label;"
  211.                 accesskey="&viewPartialSourceCmd.accesskey;"
  212.                 oncommand="gContextMenu.viewPartialSource('selection');"/>
  213.       <menuitem id="context-viewpartialsource-mathml"
  214.                 label="&viewPartialSourceForMathMLCmd.label;"
  215.                 accesskey="&viewPartialSourceCmd.accesskey;"
  216.                 oncommand="gContextMenu.viewPartialSource('mathml');"/>
  217.       <menuitem id="context-viewsource"
  218.                 label="&viewPageSourceCmd.label;"
  219.                 accesskey="&viewPageSourceCmd.accesskey;"
  220.                 observes="isImage"
  221.                 oncommand="BrowserViewSourceOfDocument(content.document);"/>
  222.       <menuitem id="context-viewinfo"
  223.                 label="&viewPageInfoCmd.label;"
  224.                 accesskey="&viewPageInfoCmd.accesskey;"
  225.                 oncommand="gContextMenu.viewInfo();"/>
  226.       <menuitem id="context-metadata"
  227.                 label="&metadataCmd.label;"
  228.                 accesskey="&metadataCmd.accesskey;"
  229.                 oncommand="gContextMenu.showMetadata();"/>
  230.     </popup>
  231.   </popupset>
  232. </overlay>
  233.