<?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/. -->

<!-- mac version of platformCommunicatorOverlay.xul -->

<!DOCTYPE overlay [

<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
%brandDTD;
<!ENTITY % platformCommunicatorDTD SYSTEM "chrome://communicator-platform/locale/platformCommunicatorOverlay.dtd">
%platformCommunicatorDTD;
<!ENTITY % utilityDTD SYSTEM "chrome://communicator/locale/utilityOverlay.dtd">
%utilityDTD;

]>

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

  <!-- close -->
  <menuitem id="menu_close" label="&closeCmd.label;" key="key_close" command="cmd_close"/>
  <key id="key_close"  key="&closeCmd.key;" command="cmd_close" modifiers="accel"/>
  <key id="key_closeWindow"  key="&closeCmd.key;" command="cmd_closeWindow" modifiers="accel,shift"/>
  <key id="key_gotoHistory"  key="&historyCmd.key;" oncommand="toHistory();" modifiers="accel,shift"/>

  <menuitem id="menu_preferences" label="&preferencesCmd.label;"
            key="key_preferences"/>

  <menupopup id="menu_FilePopup">
    <!-- These 5 menuitems (and the menu_preferences menuitem above) are added
      to the Application menu. They just need to be in the DOM, widget code
      does the rest -->
    <menuitem id="menu_mac_services" label="&servicesMenu.label;"/>
    <menuitem id="menu_mac_hide_app" label="&hideThisAppCmd.label;"
              key="key_hideThisApp"/>
    <menuitem id="menu_mac_hide_others" label="&hideOtherAppsCmd.label;"
              key="key_hideOtherApps"/>
    <menuitem id="menu_mac_show_all" label="&showAllAppsCmd.label;"/>
    <menuitem id="menu_FileQuitItem" label="&quitApplicationCmd.label;"
              key="key_quit" command="cmd_quit"/>
  </menupopup>
  <key id="key_quit"  key="&quitApplicationCmd.key;" command="cmd_quit"
       modifiers="&quitApplicationCmd.modifiers;"/>

  <!-- Edit Menu -->
  <key id="key_redo"   key="&redoCmd.key;" command="cmd_redo" modifiers="shift, accel"/>
  <!-- Select All Key -->
  <key id="key_selectAll" key="&selectAllCmd.key;" modifiers="accel"/>

  <keyset id="findKeys">
    <key id="key_findReplace"
         key="&findReplaceCmd.key;"
         modifiers="accel,alt"
         command="cmd_findReplace"/>
  </keyset>

  <!-- Delete Key -->
  <!-- not all Mac keyboards have a VK_DELETE key, so we use VK_BACK as
       the primary and provide VK_DELETE as a secondary key definition -->
  <key id="key_delete"  keycode="VK_BACK"   command="cmd_delete"/>
  <key id="key_delete2" keycode="VK_DELETE" command="cmd_delete"/>

  <!-- This adds the Print Setup item to both Browser and Composer's
       Print toolbar button popup
   -->
  <menupopup id="printMenu">
    <menuitem id="printSetupToolbar"
         insertafter="printMenuItemToolbar"
         label="&printSetupCmd.label;"
         accesskey="&printSetupCmd.accesskey;"
         command="cmd_printSetup"/>
  </menupopup>

  <!-- Find As You Type Keys -->
  <key id="key_findTypeText"
       key="&findTypeTextCmd.key;"/>
  <key id="key_findTypeLinks"
       key="&findTypeLinksCmd.key;"/>

  <menuitem id="menu_printPreview" hidden="true"/>
  <menuitem id="printPreviewMenuItem" hidden="true"/>
  <menuitem id="printPreviewMenuItemToolbar" hidden="true"/>
  <menuitem id="printPreviewAddressBook" hidden="true"/>
  <menuitem id="mailContext-printpreview" hidden="true"/>

  <key id="showHideSidebar" key="&showHideSidebarCmd.key;" modifiers="accel,alt"/>

  <key id="key_toggleDirectoryPane" key="&toggleDirectoryPaneCmd.key;" modifiers="accel,alt"/>

  <key id="key_toggleFolderPane" key="&toggleFolderPaneCmd.key;" modifiers="accel,alt"/>

  <!-- Tasks Commands -->
  <commandset id="tasksCommands">
    <command id="cmd_minimizeWindow" oncommand="window.minimize();"/>
    <command id="cmd_zoomWindow" oncommand="ZoomCurrentWindow();"/>
  </commandset>

  <!-- Tasks Keys -->
  <keyset id="tasksKeys">
    <key id="key_minimizeWindow"
         command="cmd_minimizeWindow"
         key="&minimizeWindowCmd.key;"
         modifiers="accel"/>

    <key id="key_openHelp"
         key="&openHelpCmd.key;"
         modifiers="&openHelpCmd.modifiers;"
         command="cmd_openHelp"/>

    <key id="key_hideThisApp"
         key="&hideThisAppCmd.key;"
         modifiers="&hideThisAppCmd.modifiers;"/>

    <key id="key_hideOtherApps"
         key="&hideOtherAppsCmd.key;"
         modifiers="&hideOtherAppsCmd.modifiers;"/>

    <key id="key_preferences"
         key="&preferencesCmd.key;"
         modifiers="&preferencesCmd.modifiers;"/>
  </keyset>

  <!-- Window menu -->
  <menupopup id="windowPopup">
    <menuitem command="cmd_minimizeWindow"
              label="&minimizeWindowCmd.label;"
              key="key_minimizeWindow"
              position="1"/>
    <menuitem command="cmd_zoomWindow"
              label="&zoomWindowCmd.label;"
              position="2"/>
    <menuseparator position="3"/>
  </menupopup>

  <!-- Title bar elements -->
  <vbox id="titlebar">
    <hbox id="titlebar-content">
      <spacer id="titlebar-spacer" flex="1"/>
      <hbox id="titlebar-buttonbox-container">
        <hbox id="titlebar-buttonbox"/>
      </hbox>
    </hbox>
  </vbox>

</overlay>
