webapprt/content/webapp.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/webapprt/content/webapp.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,168 @@
     1.4 +<?xml version="1.0"?>
     1.5 +
     1.6 +<!-- This Source Code Form is subject to the terms of the Mozilla Public
     1.7 +   - License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.8 +   - You can obtain one at http://mozilla.org/MPL/2.0/.  -->
     1.9 +
    1.10 +<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
    1.11 +
    1.12 +<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
    1.13 +
    1.14 +<!DOCTYPE window [
    1.15 +<!ENTITY % webappDTD SYSTEM "chrome://webapprt/locale/webapp.dtd">
    1.16 +%webappDTD;
    1.17 +]>
    1.18 +
    1.19 +<window windowtype="webapprt:webapp"
    1.20 +        id="default"
    1.21 +        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    1.22 +        width="1024" height="768"
    1.23 +        fullscreenbutton="true"
    1.24 +        persist="screenX screenY width height sizemode"
    1.25 +        >
    1.26 +
    1.27 +<script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
    1.28 +<script type="application/javascript" src="chrome://webapprt/content/webapp.js"/>
    1.29 +
    1.30 +<commandset id="mainCommandSet">
    1.31 +  <command id="cmd_quitApplication" oncommand="goQuitApplication()"/>
    1.32 +  <commandset id="editMenuCommands"/>
    1.33 +</commandset>
    1.34 +
    1.35 +<keyset id="mainKeyset">
    1.36 +  <key id="key_undo"
    1.37 +       key="&undoCmd.key;"
    1.38 +       modifiers="accel"/>
    1.39 +  <key id="key_redo" key="&undoCmd.key;" modifiers="accel,shift"/>
    1.40 +  <key id="key_cut"
    1.41 +       key="&cutCmd.key;"
    1.42 +       modifiers="accel"/>
    1.43 +  <key id="key_copy"
    1.44 +       key="&copyCmd.key;"
    1.45 +       modifiers="accel"/>
    1.46 +  <key id="key_paste"
    1.47 +       key="&pasteCmd.key;"
    1.48 +       modifiers="accel"/>
    1.49 +  <key id="key_delete" keycode="VK_DELETE" command="cmd_delete"/>
    1.50 +  <key id="key_selectAll" key="&selectAllCmd.key;" modifiers="accel"/>
    1.51 +  <key id="key_quitApplication"
    1.52 +       key="&quitApplicationCmdUnix.key;"
    1.53 +       command="cmd_quitApplication"
    1.54 +       modifiers="accel"/>
    1.55 +  <key id="key_hideThisAppCmdMac"
    1.56 +       key="&hideThisAppCmdMac.key;"
    1.57 +       modifiers="accel"/>
    1.58 +  <key id="key_hideOtherAppsCmdMac"
    1.59 +       key="&hideOtherAppsCmdMac.key;"
    1.60 +       modifiers="accel,alt"/>
    1.61 +</keyset>
    1.62 +
    1.63 +  <menubar id="main-menubar">
    1.64 +
    1.65 +#ifndef XP_MACOSX
    1.66 +    <!-- On Mac, the Quit item gets moved to the Application menu by nsMenuBarX.
    1.67 +       - And right now it's the only item in the File menu.  So if we put it
    1.68 +       - into that menu on Mac, the File menu shows up empty on that OS.
    1.69 +       - To work around that problem, we put the item into the Edit menu on Mac
    1.70 +       - (from which nsMenuBarX still moves it properly), and we don't create
    1.71 +       - the File menu in the first place on that OS.
    1.72 +       -
    1.73 +       - But if you are adding a persistent item to the File menu on Mac,
    1.74 +       - then that workaround is no longer necessary, and you can move the Quit
    1.75 +       - item up here. -->
    1.76 +    <menu id="file-menu" label="&fileMenu.label;"
    1.77 +          accesskey="&fileMenu.accesskey;">
    1.78 +      <menupopup id="menu_FilePopup">
    1.79 +        <menuitem id="menu_FileQuitItem"
    1.80 +#ifdef XP_WIN
    1.81 +                  label="&quitApplicationCmdWin.label;"
    1.82 +                  accesskey="&quitApplicationCmdWin.accesskey;"
    1.83 +#else
    1.84 +                  label="&quitApplicationCmd.label;"
    1.85 +                  accesskey="&quitApplicationCmd.accesskey;"
    1.86 +#endif
    1.87 +#ifdef XP_UNIX
    1.88 +                  key="key_quitApplication"
    1.89 +#endif
    1.90 +                  command="cmd_quitApplication"/>
    1.91 +      </menupopup>
    1.92 +    </menu>
    1.93 +#endif
    1.94 +
    1.95 +    <menu id="edit-menu" label="&editMenu.label;"
    1.96 +          accesskey="&editMenu.accesskey;">
    1.97 +      <menupopup id="menu_EditPopup"
    1.98 +                 onpopupshowing="updateEditUIVisibility()"
    1.99 +                 onpopuphidden="updateEditUIVisibility()">
   1.100 +
   1.101 +#ifdef XP_MACOSX
   1.102 +        <!-- These items get moved to the Application menu by nsMenuBarX.
   1.103 +           - They can live in any menu.
   1.104 +           -
   1.105 +           - See the comment on the File menu above for why the Quit item is
   1.106 +           - here, and note that JavaScript code dynamically updates the labels
   1.107 +           - of the Quit and Hide items, which include the name of the app. -->
   1.108 +        <menuitem id="menu_FileQuitItem"
   1.109 +                  label="&quitApplicationCmd.label;"
   1.110 +                  key="key_quitApplication"
   1.111 +                  command="cmd_quitApplication"/>
   1.112 +        <menuitem id="menu_mac_hide_app"
   1.113 +                  key="key_hideThisAppCmdMac"/>
   1.114 +        <menuitem id="menu_mac_hide_others"
   1.115 +                  label="&hideOtherAppsCmdMac.label;"
   1.116 +                  key="key_hideOtherAppsCmdMac"/>
   1.117 +        <menuitem id="menu_mac_show_all" label="&showAllAppsCmdMac.label;"/>
   1.118 +#endif
   1.119 +
   1.120 +        <menuitem id="menu_undo"
   1.121 +                  label="&undoCmd.label;"
   1.122 +                  key="key_undo"
   1.123 +                  accesskey="&undoCmd.accesskey;"
   1.124 +                  command="cmd_undo"/>
   1.125 +        <menuitem id="menu_redo"
   1.126 +                  label="&redoCmd.label;"
   1.127 +                  key="key_redo"
   1.128 +                  accesskey="&redoCmd.accesskey;"
   1.129 +                  command="cmd_redo"/>
   1.130 +        <menuseparator/>
   1.131 +        <menuitem id="menu_cut"
   1.132 +                  label="&cutCmd.label;"
   1.133 +                  key="key_cut"
   1.134 +                  accesskey="&cutCmd.accesskey;"
   1.135 +                  command="cmd_cut"/>
   1.136 +        <menuitem id="menu_copy"
   1.137 +                  label="&copyCmd.label;"
   1.138 +                  key="key_copy"
   1.139 +                  accesskey="&copyCmd.accesskey;"
   1.140 +                  command="cmd_copy"/>
   1.141 +        <menuitem id="menu_paste"
   1.142 +                  label="&pasteCmd.label;"
   1.143 +                  key="key_paste"
   1.144 +                  accesskey="&pasteCmd.accesskey;"
   1.145 +                  command="cmd_paste"/>
   1.146 +        <menuitem id="menu_delete"
   1.147 +                  label="&deleteCmd.label;"
   1.148 +                  key="key_delete"
   1.149 +                  accesskey="&deleteCmd.accesskey;"
   1.150 +                  command="cmd_delete"/>
   1.151 +        <menuseparator/>
   1.152 +        <menuitem id="menu_selectAll"
   1.153 +                  label="&selectAllCmd.label;"
   1.154 +                  key="key_selectAll"
   1.155 +                  accesskey="&selectAllCmd.accesskey;"
   1.156 +                  command="cmd_selectAll"/>
   1.157 +      </menupopup>
   1.158 +    </menu>
   1.159 +  </menubar>
   1.160 +
   1.161 +  <browser type="content-primary" id="content" flex="1" context="contentAreaContextMenu" tooltip="contentAreaTooltip" />
   1.162 +
   1.163 +  <popupset>
   1.164 +    <menupopup id="contentAreaContextMenu" pagemenu="start"
   1.165 +               onpopupshowing="return showContextMenu(event, this)"
   1.166 +               onpopuphiding="hideContextMenu(event, this)">
   1.167 +    </menupopup>
   1.168 +    <tooltip id="contentAreaTooltip" page="true" />
   1.169 +  </popupset>
   1.170 +
   1.171 +</window>

mercurial