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"?>
12 <!ENTITY % webappDTD SYSTEM
"chrome://webapprt/locale/webapp.dtd">
16 <window windowtype=
"webapprt:webapp"
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"
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"/>
32 <keyset id=
"mainKeyset">
36 <key id=
"key_redo" key=
"&undoCmd.key;" modifiers=
"accel,shift"/>
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"
52 <key id=
"key_hideThisAppCmdMac"
53 key=
"&hideThisAppCmdMac.key;"
55 <key id=
"key_hideOtherAppsCmdMac"
56 key=
"&hideOtherAppsCmdMac.key;"
57 modifiers=
"accel,alt"/>
60 <menubar id=
"main-menubar">
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.
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
73 <menu id=
"file-menu" label=
"&fileMenu.label;"
74 accesskey=
"&fileMenu.accesskey;">
75 <menupopup id=
"menu_FilePopup">
76 <menuitem id=
"menu_FileQuitItem"
78 label=
"&quitApplicationCmdWin.label;"
79 accesskey=
"&quitApplicationCmdWin.accesskey;"
81 label=
"&quitApplicationCmd.label;"
82 accesskey=
"&quitApplicationCmd.accesskey;"
85 key=
"key_quitApplication"
87 command=
"cmd_quitApplication"/>
92 <menu id=
"edit-menu" label=
"&editMenu.label;"
93 accesskey=
"&editMenu.accesskey;">
94 <menupopup id=
"menu_EditPopup"
95 onpopupshowing=
"updateEditUIVisibility()"
96 onpopuphidden=
"updateEditUIVisibility()">
99 <!-- These items get moved to the Application menu by nsMenuBarX.
100 - They can live in any menu.
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;"/>
117 <menuitem id=
"menu_undo"
118 label=
"&undoCmd.label;"
120 accesskey=
"&undoCmd.accesskey;"
122 <menuitem id=
"menu_redo"
123 label=
"&redoCmd.label;"
125 accesskey=
"&redoCmd.accesskey;"
128 <menuitem id=
"menu_cut"
129 label=
"&cutCmd.label;"
131 accesskey=
"&cutCmd.accesskey;"
133 <menuitem id=
"menu_copy"
134 label=
"©Cmd.label;"
136 accesskey=
"©Cmd.accesskey;"
138 <menuitem id=
"menu_paste"
139 label=
"&pasteCmd.label;"
141 accesskey=
"&pasteCmd.accesskey;"
142 command=
"cmd_paste"/>
143 <menuitem id=
"menu_delete"
144 label=
"&deleteCmd.label;"
146 accesskey=
"&deleteCmd.accesskey;"
147 command=
"cmd_delete"/>
149 <menuitem id=
"menu_selectAll"
150 label=
"&selectAllCmd.label;"
152 accesskey=
"&selectAllCmd.accesskey;"
153 command=
"cmd_selectAll"/>
158 <browser type=
"content-primary" id=
"content" flex=
"1" context=
"contentAreaContextMenu" />
161 <menupopup id=
"contentAreaContextMenu" pagemenu=
"start"
162 onpopupshowing=
"return showContextMenu(event, this)"
163 onpopuphiding=
"hideContextMenu(event, this)">