<?xml version="1.0"?>

<!-- This is the overlay that adds a menu to messenger compose window -->

<?xml-stylesheet href="chrome://enigmail/skin/enigmail.css"
                 type="text/css"?> 

<!DOCTYPE window [
<!ENTITY % enigmailDTD SYSTEM "chrome://enigmail/locale/enigmail.dtd" >
%enigmailDTD;
<!ENTITY % messengercomposeDTD SYSTEM "chrome://messenger/locale/messengercompose/messengercompose.dtd" >
%messengercomposeDTD;
]>

<overlay id="enigMsgComposeOverlay"
    xmlns:html="http://www.w3.org/1999/xhtml"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <script type="application/x-javascript" src="chrome://enigmail/content/enigmailCommon.js"/>
  <script type="application/x-javascript"  src="chrome://enigmail/content/enigmailMsgComposeOverlay.js"/>

    <toolbar id="composeToolbar">
      <hbox id="toolbar_button_box">

       <toolbarbutton class="toolbarbutton-1"
               id="button-enigmail-send"
               label="&enigmail.sendbutton.label;"
               tooltiptext="&enigmail.sendbutton.tip;" 
               command="cmd_sendButton"
               now_label="&enigmail.sendbutton.label;"
               now_tooltiptext="&enigmail.sendbutton.tip;"
               later_label="&enigmail.sendbutton.label;"
               later_tooltiptext="&enigmail.sendbutton.tip;"
               insertbefore="button-send"/>

       </hbox>
    </toolbar>

  <menubar id="compose-menubar">

    <menu id="menu_Enigmail"
          label="Enigmail"
          accesskey="&enigmail.composemenu.accesskey;"
          insertbefore="tasksMenu">

      <menupopup id="menu_EnigmailPopup">

        <menuitem id="enigmail_default_send"
             label="&enigmail.defaultsend.label;"
             accesskey="&enigmail.defaultsend.accesskey;"
             oncommand="enigSend(4);" />

        <menuseparator/>

        <menuitem id="enigmail_signed_send"
             label="&enigmail.signedsend.label;"
             accesskey="&enigmail.signedsend.accesskey;"
             oncommand="enigSend(1);" />

        <menuitem id="enigmail_encrypted_send"
             label="&enigmail.encryptedsend.label;"
             accesskey="&enigmail.encryptedsend.accesskey;"
             oncommand="enigSend(2);" />

        <menuitem id="enigmail_encrypt_sign_send"
             label="&enigmail.encryptsignsend.label;"
             accesskey="&enigmail.encryptsignsend.accesskey;"
             oncommand="enigSend(3);" />

        <menuitem id="enigmail_plain_send"
             label="&enigmail.plainsend.label;"
             accesskey="&enigmail.plainsend.accesskey;"
             oncommand="enigSend(0);" />

        <menuseparator/>

        <menuitem id="enigmail_sendNow"
             type="radio"
             name="enigImmediateSend"
             label="&enigmail.sendnow.label;"
             accesskey="&enigmail.sendnow.accesskey;"
             oncommand="engiSendImmediately(true);" />

        <menuitem id="enigmail_sendLater"
             type="radio"
             name="enigImmediateSend"
             label="&enigmail.sendlater.label;"
             accesskey="&enigmail.sendlater.accesskey;"
             oncommand="engiSendImmediately(false);" />

        <menuseparator/>

        <menu id="enigmail_send_options_menu"
              label="&enigmail.sendOptionsMenu.label;"
              accesskey="&enigmail.sendOptionsMenu.accesskey;">

          <menupopup onpopupshowing="enigInitSendOptionsMenu();">

            <menuitem id="enigmail_defaultSignMsg"
              type="checkbox"
              checked="false"
              label="&enigmail.defaultSignMsg.label;"
              accesskey="&enigmail.defaultSignMsg.accesskey;"
              oncommand="enigToggleAttribute('defaultSignMsg');" />

            <menuitem id="enigmail_confirmBeforeSend"
              type="checkbox"
              checked="false"
              label="&enigmail.confirmBeforeSend.label;"
              accesskey="&enigmail.confirmBeforeSend.accesskey;"
              oncommand="enigToggleAttribute('confirmBeforeSend');" />

            <menuseparator/>

            <menuitem id="enigmail_defaultEncryptionSign"
              type="radio"
              name="defaultEncryptionGroup"
              label="&enigmail.defaultEncryptionSign.label;"
              accesskey="&enigmail.defaultEncryptionSign.accesskey;"
              oncommand="enigDefaultEncryptionOption(2);"/>

            <menuitem id="enigmail_defaultEncryptionOnly"
              type="radio"
              checked="true"
              name="defaultEncryptionGroup"
              label="&enigmail.defaultEncryptionOnly.label;"
              accesskey="&enigmail.defaultEncryptionOnly.accesskey;"
              oncommand="enigDefaultEncryptionOption(1);"/>


            <menuitem id="enigmail_defaultEncryptionNone"
              type="radio"
              name="defaultEncryptionGroup"
              label="&enigmail.defaultEncryptionNone.label;"
              accesskey="&enigmail.defaultEncryptionNone.accesskey;"
              oncommand="enigDefaultEncryptionOption(0);"/>

          </menupopup>
        </menu>

        <menu id="enigmail_mime_options_menu"
              label="&enigmail.mimeOptionsMenu.label;"
              accesskey="&enigmail.mimeOptionsMenu.accesskey;">

          <menupopup onpopupshowing="enigInitRadioMenu('usePGPMimeOption', gUsePGPMimeOptionList);">

            <menuitem id="enigmail_usePGPMimeAlways"
              type="radio"
              name="usePGPMimeGroup"
              label="&enigmail.usePGPMimeAlways.label;"
              accesskey="&enigmail.usePGPMimeAlways.accesskey;"
              oncommand="enigUsePGPMimeOption(2);"/>

            <menuitem id="enigmail_usePGPMimePossible"
              type="radio"
              checked="true"
              name="usePGPMimeGroup"
              label="&enigmail.usePGPMimePossible.label;"
              accesskey="&enigmail.usePGPMimePossible.accesskey;"
              oncommand="enigUsePGPMimeOption(1);"/>

            <menuitem id="enigmail_usePGPMimeNever"
              type="radio"
              name="usePGPMimeGroup"
              label="&enigmail.usePGPMimeNever.label;"
              accesskey="&enigmail.usePGPMimeNever.accesskey;"
              oncommand="enigUsePGPMimeOption(0);"/>

          </menupopup>
        </menu>

        <menuitem id="enigmail_sendPGPMime"
            type="checkbox"
            checked="false"
            label="&enigmail.sendPGPMime.label;"
            accesskey="&enigmail.sendPGPMime.accesskey;"
            oncommand="enigTogglePGPMime();" />

        <menuseparator/>

        <menuitem id="enigmail_undo_encryption"
             label="&enigmail.undoencryption.label;"
             accesskey="&enigmail.undoencryption.accesskey;"
             oncommand="enigUndoEncryption();" />

        <menuitem id="enigmail_insert_key"
             label="&enigmail.insertkey.label;"
             accesskey="&enigmail.insertkey.accesskey;"
             oncommand="enigInsertKey();" />

        <menuitem id="enigmail_clearPassphrase"
             label="&enigmail.clearPassphrase.label;"
             accesskey="&enigmail.clearPassphrase.accesskey;"
             oncommand="EnigClearPassphrase();" />

        <menuseparator/>

        <menuitem id="enigmail_help"
             label="&enigmail.help.label;"
             accesskey="&enigmail.help.accesskey;"
             oncommand="EnigHelpWindow('compose');" />

      </menupopup>
    </menu>

  </menubar>

</overlay>
