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