<?xml version="1.0"?> 
<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is Mozilla Communicator client code, released
   - March 31, 1998.
   -
   - The Initial Developer of the Original Code is
   - Netscape Communications Corporation.
   - Portions created by the Initial Developer are Copyright (C) 1999
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -   Daniel Glazman (glazman@netscape.com)
   -   Charles Manske (cmanske@netscape.com)
   -   Ian Neal (iann_bugzilla@blueyonder.co.uk)
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either of the GNU General Public License Version 2 or later (the "GPL"),
   - or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the GPL or the LGPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   -
   - ***** END LICENSE BLOCK ***** -->

<!DOCTYPE overlay SYSTEM "chrome://editor/locale/editingOverlay.dtd">

<overlay id="editingOverlay"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <script type="application/javascript"
          src="chrome://editor/content/editingOverlay.js"/>

  <keyset id="editorKeys">
    <key id="key_openRemoteEditor"
         key="&openRemoteCmd.key;"
         command="cmd_openRemote"
         modifiers="accel,shift"/>
    <key id="key_openEditor"
         key="&openFileCmd.key;"
         command="cmd_open"
         modifiers="accel"/>
    <key id="key_publish"
         key="&publishCmd.key;"
         command="cmd_publish"
         modifiers="accel,shift"/>
  </keyset>

  <!-- commands updated when the editor gets created -->
  <commandset id="commonEditorMenuItems">
    <command id="cmd_open"
             oncommand="goDoCommand('cmd_open');"/>
    <command id="cmd_openRemote"
             oncommand="goDoCommand('cmd_openRemote');"/>
    <command id="cmd_printpreview"
             oncommand="goDoCommand('cmd_printpreview');"/> 
  </commandset>

  <commandset id="composerSaveMenuItems"
          commandupdater="true"
          events="create, save"
          oncommandupdate="goUpdateComposerMenuItems(this);">
    <command id="cmd_save"
             label="&saveCmd.label;"
             oncommand="goDoCommand('cmd_save');"/>
    <command id="cmd_saveAs"
             oncommand="goDoCommand('cmd_saveAs');"/>
    <command id="cmd_saveAndChangeEncoding"
             oncommand="goDoCommand('cmd_saveAndChangeEncoding');"/>
    <command id="cmd_publish"
             label="&publishCmd.label;"
             oncommand="goDoCommand('cmd_publish');"/>
    <command id="cmd_publishAs"
             oncommand="goDoCommand('cmd_publishAs');"/>
    <command id="cmd_revert"
             oncommand="goDoCommand('cmd_revert');"/>
  </commandset>

  <commandset id="composerEditMenuItems">
    <command id="cmd_publishSettings"
             oncommand="goDoCommand('cmd_publishSettings');"/>
  </commandset>

  <!-- File menu items -->
  <menu id="menu_File">
    <menupopup id="menu_FilePopup" onpopupshowing="EditorInitFileMenu();">
      <menu id="menu_New">
        <menupopup id="menu_NewPopup">
          <menuitem id="menu_newEditor"/>
          <menuseparator id="sep_NewPopup"/>
          <menuitem id="menu_newNavigator"/>
        </menupopup>
      </menu>
      <menuitem id="menu_openRemote"
                label="&openRemoteCmd.label;"
                accesskey="&openRemoteCmd.accesskey;"
                key="key_openRemoteEditor"
                command="cmd_openRemote"/>
      <menuitem id="menu_openFile"
                label="&openFileCmd.label;"
                accesskey="&openFileCmd.accesskey;"
                key="key_openEditor"
                command="cmd_open"/>
      <menu id="menu_RecentFiles"
            label="&fileRecentMenu.label;"
            accesskey="&fileRecentMenu.accesskey;"
            onpopupshowing="BuildRecentPagesMenu();">
        <menupopup id="menupopup_RecentFiles"
                   oncommand="editPage(event.target.getAttribute('value'),
                                       event.target.getAttribute('fileType'));"/>
          <!-- menuitems appended at runtime -->
      </menu>
      <menuitem id="menu_close"/>
      <menuseparator id="sep_close"/>
      <menuitem id="menu_saveCmd"
                accesskey="&saveCmd.accesskey;"
                key="key_save"
                command="cmd_save"/>
      <menuitem id="menu_saveAsCmd"
                label="&saveAsCmd.label;"
                accesskey="&saveAsCmd.accesskey;"
                command="cmd_saveAs"/>
      <menuitem id="menu_saveAsChangeEncoding"
                label="&saveAsChangeEncodingCmd.label;"
                accesskey="&saveAsChangeEncodingCmd.accesskey;"
                command="cmd_saveAndChangeEncoding"/>
      <menuseparator id="sep_saveCmd"/>
      <menuitem id="menu_publish"
                accesskey="&publishCmd.accesskey;"
                key="key_publish"
                command="cmd_publish"/>
      <menuitem id="menu_publishAs"
                label="&publishAsCmd.label;"
                accesskey="&publishAsCmd.accesskey;"
                command="cmd_publishAs"/>
      <menuseparator id="sep_publishAs"/>
      <menuitem id="menu_fileRevert"
                label="&fileRevert.label;"
                accesskey="&fileRevert.accesskey;"
                command="cmd_revert"/>
      <menuseparator id="sep_print"/>
      <!-- menuitems are merged in here from composerOverlay.xul -->
      <menuitem id="menu_printSetup"/>
      <menuitem id="menu_printPreview"/>
      <menuitem id="menu_print"/>
      <!-- The Exit/Quit item is merged from platformGlobalOverlay.xul -->
    </menupopup>
  </menu>

  <!-- Edit menu items -->
  <menupopup id="menu_EditPopup">
    <menuitem id="menu_inlineSpellCheck"
              oncommand="InlineSpellCheckerUI.enabled = !InlineSpellCheckerUI.enabled"/>
    <menuitem id="menu_publishSettings"
              insertafter="sep_preferences"
              label="&publishSettings.label;"
              accesskey="&publishSettings.accesskey;"
              command="cmd_publishSettings"/>
  </menupopup>

  <!-- View menu items -->
  <menupopup id="composerCharsetMenuPopup"
             onpopupshowing="updateCharsetPopupMenu(this);"/>
</overlay>
