gecko-dev/webapprt/content/webapp.xul

169 lines
6.1 KiB
Plaintext
Raw Normal View History

<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % webappDTD SYSTEM "chrome://webapprt/locale/webapp.dtd">
%webappDTD;
]>
<window windowtype="webapprt:webapp"
id="default"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
width="1024" height="768"
fullscreenbutton="true"
persist="screenX screenY width height sizemode"
>
<script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
<script type="application/javascript" src="chrome://webapprt/content/webapp.js"/>
<commandset id="mainCommandSet">
<command id="cmd_quitApplication" oncommand="goQuitApplication()"/>
<commandset id="editMenuCommands"/>
</commandset>
<keyset id="mainKeyset">
<key id="key_undo"
key="&undoCmd.key;"
modifiers="accel"/>
<key id="key_redo" key="&undoCmd.key;" modifiers="accel,shift"/>
<key id="key_cut"
key="&cutCmd.key;"
modifiers="accel"/>
<key id="key_copy"
key="&copyCmd.key;"
modifiers="accel"/>
<key id="key_paste"
key="&pasteCmd.key;"
modifiers="accel"/>
<key id="key_delete" keycode="VK_DELETE" command="cmd_delete"/>
<key id="key_selectAll" key="&selectAllCmd.key;" modifiers="accel"/>
<key id="key_quitApplication"
key="&quitApplicationCmdUnix.key;"
command="cmd_quitApplication"
modifiers="accel"/>
<key id="key_hideThisAppCmdMac"
key="&hideThisAppCmdMac.key;"
modifiers="accel"/>
<key id="key_hideOtherAppsCmdMac"
key="&hideOtherAppsCmdMac.key;"
modifiers="accel,alt"/>
</keyset>
<menubar id="main-menubar">
#ifndef XP_MACOSX
<!-- On Mac, the Quit item gets moved to the Application menu by nsMenuBarX.
- And right now it's the only item in the File menu. So if we put it
- into that menu on Mac, the File menu shows up empty on that OS.
- To work around that problem, we put the item into the Edit menu on Mac
- (from which nsMenuBarX still moves it properly), and we don't create
- the File menu in the first place on that OS.
-
- But if you are adding a persistent item to the File menu on Mac,
- then that workaround is no longer necessary, and you can move the Quit
- item up here. -->
<menu id="file-menu" label="&fileMenu.label;"
accesskey="&fileMenu.accesskey;">
<menupopup id="menu_FilePopup">
<menuitem id="menu_FileQuitItem"
#ifdef XP_WIN
label="&quitApplicationCmdWin.label;"
accesskey="&quitApplicationCmdWin.accesskey;"
#else
label="&quitApplicationCmd.label;"
accesskey="&quitApplicationCmd.accesskey;"
#endif
#ifdef XP_UNIX
key="key_quitApplication"
#endif
command="cmd_quitApplication"/>
</menupopup>
</menu>
#endif
<menu id="edit-menu" label="&editMenu.label;"
accesskey="&editMenu.accesskey;">
<menupopup id="menu_EditPopup"
onpopupshowing="updateEditUIVisibility()"
onpopuphidden="updateEditUIVisibility()">
#ifdef XP_MACOSX
<!-- These items get moved to the Application menu by nsMenuBarX.
- They can live in any menu.
-
- See the comment on the File menu above for why the Quit item is
- here, and note that JavaScript code dynamically updates the labels
- of the Quit and Hide items, which include the name of the app. -->
<menuitem id="menu_FileQuitItem"
label="&quitApplicationCmd.label;"
key="key_quitApplication"
command="cmd_quitApplication"/>
<menuitem id="menu_mac_hide_app"
key="key_hideThisAppCmdMac"/>
<menuitem id="menu_mac_hide_others"
label="&hideOtherAppsCmdMac.label;"
key="key_hideOtherAppsCmdMac"/>
<menuitem id="menu_mac_show_all" label="&showAllAppsCmdMac.label;"/>
#endif
<menuitem id="menu_undo"
label="&undoCmd.label;"
key="key_undo"
accesskey="&undoCmd.accesskey;"
command="cmd_undo"/>
<menuitem id="menu_redo"
label="&redoCmd.label;"
key="key_redo"
accesskey="&redoCmd.accesskey;"
command="cmd_redo"/>
<menuseparator/>
<menuitem id="menu_cut"
label="&cutCmd.label;"
key="key_cut"
accesskey="&cutCmd.accesskey;"
command="cmd_cut"/>
<menuitem id="menu_copy"
label="&copyCmd.label;"
key="key_copy"
accesskey="&copyCmd.accesskey;"
command="cmd_copy"/>
<menuitem id="menu_paste"
label="&pasteCmd.label;"
key="key_paste"
accesskey="&pasteCmd.accesskey;"
command="cmd_paste"/>
<menuitem id="menu_delete"
label="&deleteCmd.label;"
key="key_delete"
accesskey="&deleteCmd.accesskey;"
command="cmd_delete"/>
<menuseparator/>
<menuitem id="menu_selectAll"
label="&selectAllCmd.label;"
key="key_selectAll"
accesskey="&selectAllCmd.accesskey;"
command="cmd_selectAll"/>
</menupopup>
</menu>
</menubar>
<browser type="content-primary" id="content" flex="1" context="contentAreaContextMenu" tooltip="contentAreaTooltip" />
<popupset>
<menupopup id="contentAreaContextMenu" pagemenu="start"
onpopupshowing="return showContextMenu(event, this)"
onpopuphiding="hideContextMenu(event, this)">
</menupopup>
<tooltip id="contentAreaTooltip" page="true" />
</popupset>
</window>