webapprt/content/webapp.xul

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <?xml version="1.0"?>
     3 <!-- This Source Code Form is subject to the terms of the Mozilla Public
     4    - License, v. 2.0. If a copy of the MPL was not distributed with this file,
     5    - You can obtain one at http://mozilla.org/MPL/2.0/.  -->
     7 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
     9 <?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
    11 <!DOCTYPE window [
    12 <!ENTITY % webappDTD SYSTEM "chrome://webapprt/locale/webapp.dtd">
    13 %webappDTD;
    14 ]>
    16 <window windowtype="webapprt:webapp"
    17         id="default"
    18         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    19         width="1024" height="768"
    20         fullscreenbutton="true"
    21         persist="screenX screenY width height sizemode"
    22         >
    24 <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
    25 <script type="application/javascript" src="chrome://webapprt/content/webapp.js"/>
    27 <commandset id="mainCommandSet">
    28   <command id="cmd_quitApplication" oncommand="goQuitApplication()"/>
    29   <commandset id="editMenuCommands"/>
    30 </commandset>
    32 <keyset id="mainKeyset">
    33   <key id="key_undo"
    34        key="&undoCmd.key;"
    35        modifiers="accel"/>
    36   <key id="key_redo" key="&undoCmd.key;" modifiers="accel,shift"/>
    37   <key id="key_cut"
    38        key="&cutCmd.key;"
    39        modifiers="accel"/>
    40   <key id="key_copy"
    41        key="&copyCmd.key;"
    42        modifiers="accel"/>
    43   <key id="key_paste"
    44        key="&pasteCmd.key;"
    45        modifiers="accel"/>
    46   <key id="key_delete" keycode="VK_DELETE" command="cmd_delete"/>
    47   <key id="key_selectAll" key="&selectAllCmd.key;" modifiers="accel"/>
    48   <key id="key_quitApplication"
    49        key="&quitApplicationCmdUnix.key;"
    50        command="cmd_quitApplication"
    51        modifiers="accel"/>
    52   <key id="key_hideThisAppCmdMac"
    53        key="&hideThisAppCmdMac.key;"
    54        modifiers="accel"/>
    55   <key id="key_hideOtherAppsCmdMac"
    56        key="&hideOtherAppsCmdMac.key;"
    57        modifiers="accel,alt"/>
    58 </keyset>
    60   <menubar id="main-menubar">
    62 #ifndef XP_MACOSX
    63     <!-- On Mac, the Quit item gets moved to the Application menu by nsMenuBarX.
    64        - And right now it's the only item in the File menu.  So if we put it
    65        - into that menu on Mac, the File menu shows up empty on that OS.
    66        - To work around that problem, we put the item into the Edit menu on Mac
    67        - (from which nsMenuBarX still moves it properly), and we don't create
    68        - the File menu in the first place on that OS.
    69        -
    70        - But if you are adding a persistent item to the File menu on Mac,
    71        - then that workaround is no longer necessary, and you can move the Quit
    72        - item up here. -->
    73     <menu id="file-menu" label="&fileMenu.label;"
    74           accesskey="&fileMenu.accesskey;">
    75       <menupopup id="menu_FilePopup">
    76         <menuitem id="menu_FileQuitItem"
    77 #ifdef XP_WIN
    78                   label="&quitApplicationCmdWin.label;"
    79                   accesskey="&quitApplicationCmdWin.accesskey;"
    80 #else
    81                   label="&quitApplicationCmd.label;"
    82                   accesskey="&quitApplicationCmd.accesskey;"
    83 #endif
    84 #ifdef XP_UNIX
    85                   key="key_quitApplication"
    86 #endif
    87                   command="cmd_quitApplication"/>
    88       </menupopup>
    89     </menu>
    90 #endif
    92     <menu id="edit-menu" label="&editMenu.label;"
    93           accesskey="&editMenu.accesskey;">
    94       <menupopup id="menu_EditPopup"
    95                  onpopupshowing="updateEditUIVisibility()"
    96                  onpopuphidden="updateEditUIVisibility()">
    98 #ifdef XP_MACOSX
    99         <!-- These items get moved to the Application menu by nsMenuBarX.
   100            - They can live in any menu.
   101            -
   102            - See the comment on the File menu above for why the Quit item is
   103            - here, and note that JavaScript code dynamically updates the labels
   104            - of the Quit and Hide items, which include the name of the app. -->
   105         <menuitem id="menu_FileQuitItem"
   106                   label="&quitApplicationCmd.label;"
   107                   key="key_quitApplication"
   108                   command="cmd_quitApplication"/>
   109         <menuitem id="menu_mac_hide_app"
   110                   key="key_hideThisAppCmdMac"/>
   111         <menuitem id="menu_mac_hide_others"
   112                   label="&hideOtherAppsCmdMac.label;"
   113                   key="key_hideOtherAppsCmdMac"/>
   114         <menuitem id="menu_mac_show_all" label="&showAllAppsCmdMac.label;"/>
   115 #endif
   117         <menuitem id="menu_undo"
   118                   label="&undoCmd.label;"
   119                   key="key_undo"
   120                   accesskey="&undoCmd.accesskey;"
   121                   command="cmd_undo"/>
   122         <menuitem id="menu_redo"
   123                   label="&redoCmd.label;"
   124                   key="key_redo"
   125                   accesskey="&redoCmd.accesskey;"
   126                   command="cmd_redo"/>
   127         <menuseparator/>
   128         <menuitem id="menu_cut"
   129                   label="&cutCmd.label;"
   130                   key="key_cut"
   131                   accesskey="&cutCmd.accesskey;"
   132                   command="cmd_cut"/>
   133         <menuitem id="menu_copy"
   134                   label="&copyCmd.label;"
   135                   key="key_copy"
   136                   accesskey="&copyCmd.accesskey;"
   137                   command="cmd_copy"/>
   138         <menuitem id="menu_paste"
   139                   label="&pasteCmd.label;"
   140                   key="key_paste"
   141                   accesskey="&pasteCmd.accesskey;"
   142                   command="cmd_paste"/>
   143         <menuitem id="menu_delete"
   144                   label="&deleteCmd.label;"
   145                   key="key_delete"
   146                   accesskey="&deleteCmd.accesskey;"
   147                   command="cmd_delete"/>
   148         <menuseparator/>
   149         <menuitem id="menu_selectAll"
   150                   label="&selectAllCmd.label;"
   151                   key="key_selectAll"
   152                   accesskey="&selectAllCmd.accesskey;"
   153                   command="cmd_selectAll"/>
   154       </menupopup>
   155     </menu>
   156   </menubar>
   158   <browser type="content-primary" id="content" flex="1" context="contentAreaContextMenu" tooltip="contentAreaTooltip" />
   160   <popupset>
   161     <menupopup id="contentAreaContextMenu" pagemenu="start"
   162                onpopupshowing="return showContextMenu(event, this)"
   163                onpopuphiding="hideContextMenu(event, this)">
   164     </menupopup>
   165     <tooltip id="contentAreaTooltip" page="true" />
   166   </popupset>
   168 </window>

mercurial