This is just some static backup of the original site, don't expect every link to work!

source: modules/identityDataExtras/PGPEncryption.js @ 41d739

ng_0.9
Last change on this file since 41d739 was 41d739, checked in by rene <rene@…>, 10 years ago

updated for current enigmail addon

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/* ***** BEGIN LICENSE BLOCK *****
2    This program is free software; you can redistribute it and/or modify
3    it under the terms of the GNU General Public License as published by
4    the Free Software Foundation; either version 2 of the License, or
5    (at your option) any later version.
6
7    This program is distributed in the hope that it will be useful,
8    but WITHOUT ANY WARRANTY; without even the implied warranty of
9    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10    GNU General Public License for more details.
11
12    You should have received a copy of the GNU General Public License
13    along with this program; if not, write to the Free Software
14    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
15
16    The Original Code is the Virtual Identity Extension.
17
18    The Initial Developer of the Original Code is Rene Ejury.
19    Portions created by the Initial Developer are Copyright (C) 2007
20    the Initial Developer. All Rights Reserved.
21
22    Contributor(s):
23 * ***** END LICENSE BLOCK ***** */
24
25var EXPORTED_SYMBOLS = [];
26
27const Ci = Components.interfaces;
28const Cc = Components.classes;
29const Cu = Components.utils;
30
31
32Cu.import("resource://v_identity/vI_identityDataExtras.js");
33Cu.import("resource://v_identity/vI_log.js");
34let Log = setupLogging("virtualIdentity.identityDataExtras.PGPEncryption");
35
36function identityDataExtrasObject_PGPEncryption(currentWindow) {
37  this.currentWindow = currentWindow;
38  this.field  = "PGPEnc";                        // description of the option
39  this.option = "storageExtras_openPGP_messageEncryption";    // option string to get preference settings
40  this.elementID_msgCompose = "enigmail_encrypted_send";
41  this.updateFunction_msgCompose = function() {
42    (typeof(this.currentWindow.Enigmail.msg.setMenuSettings)=='function')?this.currentWindow.Enigmail.msg.setMenuSettings(''):null };
43}
44identityDataExtrasObject_PGPEncryption.prototype = {
45  __proto__: identityDataExtrasCheckboxObject.prototype,
46 
47  readIdentityValue : function(identity) { 
48    if (this.active) this.value = (identity.getIntAttribute('defaultEncryptionPolicy') > 0)?"true":"false";
49  }
50}
51registerIdExtrasObject(identityDataExtrasObject_PGPEncryption);
Note: See TracBrowser for help on using the repository browser.