|
|
@ -7,13 +7,13 @@ var { pEpController } = ChromeUtils.import("chrome://pEp4Tb/content/pEpControlle |
|
|
|
|
|
|
|
// Add preferences info (see developer.thunderbird.net/add-ons/updates/tb68).
|
|
|
|
Preferences.addAll([ |
|
|
|
{id: "extensions.pEp.storeAllSecurely", type: "bool"}, |
|
|
|
{id: "extensions.pEp.warnUnencrypted", type: "bool"}, |
|
|
|
{id: "extensions.pEp.protectSubjects", type: "bool"}, |
|
|
|
{id: "extensions.pEp.passiveMode", type: "bool"}, |
|
|
|
{id: "extensions.pEp.pEpSync", type: "bool"}, |
|
|
|
{id: "extensions.pEp.keyFingerprint", type: "string"}, |
|
|
|
{id: "extensions.pEp.keyLocation", type: "string"}, |
|
|
|
{ id: "extensions.pEp.storeAllSecurely", type: "bool" }, |
|
|
|
{ id: "extensions.pEp.warnUnencrypted", type: "bool" }, |
|
|
|
{ id: "extensions.pEp.protectSubjects", type: "bool" }, |
|
|
|
{ id: "extensions.pEp.passiveMode", type: "bool" }, |
|
|
|
{ id: "extensions.pEp.pEpSync", type: "bool" }, |
|
|
|
{ id: "extensions.pEp.keyFingerprint", type: "string" }, |
|
|
|
{ id: "extensions.pEp.keyLocation", type: "string" }, |
|
|
|
// examples with different types
|
|
|
|
// { id: "extensions.nameOfAddon.pref2", type: "string" },
|
|
|
|
// { id: "extensions.nameOfAddon.pref3", type: "int" },
|
|
|
@ -73,7 +73,7 @@ function loadAccounts() { |
|
|
|
let id = `mail.identity.${identity.key}.enableEncryption`; |
|
|
|
// Get prior value, if any. Default to true.
|
|
|
|
let value = Services.prefs.getBoolPref(id, true); |
|
|
|
Preferences.add({id, type: "bool"}); |
|
|
|
Preferences.add({ id, type: "bool" }); |
|
|
|
checkbox.setAttribute("preference", id); |
|
|
|
Services.prefs.setBoolPref(id, value); |
|
|
|
|
|
|
@ -97,7 +97,7 @@ function loadAccounts() { |
|
|
|
let id = `mail.account.${account.key}.storeSecurely`; |
|
|
|
// Get prior value, if any. Default to true.
|
|
|
|
let value = storeAllSecurely ? true : Services.prefs.getBoolPref(id, true); |
|
|
|
Preferences.add({id, type: "bool"}); |
|
|
|
Preferences.add({ id, type: "bool" }); |
|
|
|
checkbox.setAttribute("preference", id); |
|
|
|
Services.prefs.setBoolPref(id, value); |
|
|
|
checkbox.setAttribute("disabled", storeAllSecurely); |
|
|
|