Bug 1784538 - Change forgotten callers to renamed function. r=mkmelin a=rjl
Differential Revision:
https://phabricator.services.mozilla.com/D154554
--- a/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js
+++ b/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js
@@ -1,28 +1,18 @@
/*
* 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 https://mozilla.org/MPL/2.0/.
*/
"use strict";
-/*globally available Thunderbird variables/object/functions: */
-/*global gMsgCompose: false, gComposeNotification: false */
-/*global UpdateAttachmentBucket: false, gContentChanged: true */
-/*global AddAttachments: false, AddAttachment: false, ChangeAttachmentBucketVisibility: false, GetResourceFromUri: false */
-/*global Recipients2CompFields: false, Attachments2CompFields: false, gWindowLocked: false */
-/*global CommandUpdate_MsgCompose: false, gSMFields: false, setSecuritySettings: false, getCurrentAccountKey: false */
-/*global Sendlater3Composing: false, gCurrentIdentity: false, showMessageComposeSecurityStatus: false */
-/*global gSendEncrypted: true, gOptionalEncryption: true, gSendSigned: true, gSelectedTechnologyIsPGP: true */
-/*global gIsRelatedToEncryptedOriginal: true, gIsRelatedToSignedOriginal: true, gAttachMyPublicPGPKey: true */
-/*global gEncryptSubject: true, setEncSigStatusUI: false, gEncryptedURIService: false */
-/* global setSendEncryptedAndSigned: true */
-/* global gAttachmentBucket: true */
+/* import-globals-from ../../../../components/compose/content/MsgComposeCommands.js */
+/* import-globals-from ../../../../components/compose/content/addressingWidgetOverlay.js */
var { MailServices } = ChromeUtils.import(
"resource:///modules/MailServices.jsm"
);
var EnigmailCore = ChromeUtils.import(
"chrome://openpgp/content/modules/core.jsm"
).EnigmailCore;
@@ -422,21 +412,21 @@ Enigmail.msg = {
"\n"
);
if (stat.substr(0, 1) == "N") {
switch (Number(stat.substr(1, 1))) {
case EnigmailConstants.ENIG_UNDEF:
break;
case EnigmailConstants.ENIG_ALWAYS:
- setSendEncryptedAndSigned(true);
+ updateE2eeOptions(true);
break;
case EnigmailConstants.ENIG_NEVER:
default:
- setSendEncryptedAndSigned(false);
+ updateE2eeOptions(false);
break;
}
gOptionalEncryption = false;
switch (Number(stat.substr(2, 1))) {
case EnigmailConstants.ENIG_UNDEF:
break;
case EnigmailConstants.ENIG_ALWAYS:
@@ -631,28 +621,28 @@ Enigmail.msg = {
if (!msgIsDraft) {
if (msgFlags & EnigmailConstants.DECRYPTION_OKAY) {
EnigmailLog.DEBUG(
"enigmailMsgComposeOverlay.js: Enigmail.msg.composeOpen: has encrypted originalMsgUri\n"
);
EnigmailLog.DEBUG(
"originalMsgURI=" + gMsgCompose.originalMsgURI + "\n"
);
- setSendEncryptedAndSigned(true);
+ updateE2eeOptions(true);
gSelectedTechnologyIsPGP = true;
useEncryptionUnlessWeHaveDraftInfo = false;
usePGPUnlessWeKnowOtherwise = false;
useSMIMEUnlessWeKnowOtherwise = false;
}
}
this.removeAttachedKey();
}
if (useEncryptionUnlessWeHaveDraftInfo) {
- setSendEncryptedAndSigned(true);
+ updateE2eeOptions(true);
}
if (gSendEncrypted && !obtainedDraftFlagsObj.value) {
gSendSigned = true;
}
if (usePGPUnlessWeKnowOtherwise) {
gSelectedTechnologyIsPGP = true;
} else if (useSMIMEUnlessWeKnowOtherwise) {
gSelectedTechnologyIsPGP = false;
@@ -2509,17 +2499,17 @@ Enigmail.msg = {
//if (Services.prefs.getBoolPref("temp.openpgp.keepSettingsForReply")) {
if (statusFlagsObj.value & EnigmailConstants.DECRYPTION_OKAY) {
//this.setSendMode('encrypt');
// TODO : Check, when is this code reached?
// automatic enabling encryption currently depends on
// adjustSignEncryptAfterIdentityChanged to be always reached
gIsRelatedToEncryptedOriginal = true;
- setSendEncryptedAndSigned(gSendEncrypted);
+ updateE2eeOptions(gSendEncrypted);
gSendSigned = true;
}
//}
var exitCode = exitCodeObj.value;
if (exitCode !== 0) {
// Error processing