Commit 8ef68716 authored by Patrick Brunschwig's avatar Patrick Brunschwig

added context-menu action to create a decrypted copy of the selected message(s)

parent 5e6bf7f0
......@@ -48,6 +48,7 @@ Components.utils.import("resource://enigmail/enigmailCommon.jsm");
Components.utils.import("resource://enigmail/commonFuncs.jsm");
Components.utils.import("resource://enigmail/mimeVerify.jsm");
Components.utils.import("resource://enigmail/fixExchangeMsg.jsm");
Components.utils.import("resource://enigmail/enigmailConvert.jsm");
if (! Enigmail) var Enigmail = {};
......@@ -2321,6 +2322,15 @@ Enigmail.msg = {
return false;
},
// create a decrypted copy of all selected messages in a target folder
decryptToFolder: function(destFolder) {
let msgHdrs = gFolderDisplay ? gFolderDisplay.selectedMessages : null;
if (! msgHdrs || msgHdrs.length == 0) return;
EnigmailDecryptPermanently.dispatchMessages(msgHdrs, destFolder.URI, false, false);
},
// download keys
handleUnknownKey: function ()
{
......
......@@ -169,6 +169,20 @@
</menupopup>
</menu>
<menu
id="enigmailDecryptToFolder"
label="&enigmail.decryptToFolder.label;"
accesskey="&enigmail.decryptToFolder.accesskey;"
oncommand="Enigmail.msg.decryptToFolder(event.target._folder)">
<menupopup id="enigmailDecryptfileHereMenu"
type="folder"
mode="filing"
showFileHereLabel="true"
showRecent="true"
recentLabel="&enigmail.recent.label;"
recentAccessKey="&enigmail.recent.accesskey;"/>
</menu>
<menuseparator/>
<menuitem id="enigmail_keymgmt"
......@@ -233,6 +247,24 @@
</menupopup>
</menu>
<!-- menuitem in folder list context menu to decrypt message -->
<menupopup id="mailContext">
<menu
id="enigmailContext-decryptToFolder"
insertafter="mailContext-copyMenu"
label="&enigmail.decryptToFolder.label;"
accesskey="&enigmail.decryptToFolder.accesskey;"
oncommand="Enigmail.msg.decryptToFolder(event.target._folder)">
<menupopup id="enigmailCtxDecrypt-fileHereMenu"
type="folder"
mode="filing"
showFileHereLabel="true"
showRecent="true"
recentLabel="&enigmail.recent.label;"
recentAccessKey="&enigmail.recent.accesskey;"/>
</menu>
</menupopup>
<!-- Thunderbird & SeaMonkey 2.x -->
<toolbarpalette id="MailToolbarPalette">
<toolbarbutton class="toolbarbutton-1"
......
......@@ -99,6 +99,13 @@
<!ENTITY enigmail.clearPassphrase.label "Clear Saved Passphrase">
<!ENTITY enigmail.editRules.label "Edit Per-Recipient Rules">
<!ENTITY enigmail.decryptToFolder.label "Decrypt to folder">
<!ENTITY enigmail.decryptToFolder.accesskey "D">
<!-- "recent" label for Folder selection submenu -->
<!ENTITY enigmail.recent.label "Recent">
<!ENTITY enigmail.recent.accesskey "R">
<!ENTITY enigmail.prefs.label "Preferences">
<!ENTITY enigmail.debugMenu.label "Debugging Options">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment