Browse Source

Always supply a window to Services.prompt.alert() to make it "less" modal.

1.1.101
Jorg Knobloch 1 year ago
parent
commit
7585d6f342
7 changed files with 10 additions and 9 deletions
  1. +1
    -1
      addon/_locales/de/messages.json
  2. +1
    -1
      addon/_locales/en/messages.json
  3. +3
    -3
      addon/content/dialogs/options.js
  4. +1
    -1
      addon/content/modules/pEpServer.js
  5. +2
    -1
      addon/content/pEpForThunderbird.js
  6. +1
    -1
      addon/content/pepmessengercompose.js
  7. +1
    -1
      addon/experiments.js

+ 1
- 1
addon/_locales/de/messages.json View File

@ -27,7 +27,7 @@
"message": "p≡p Adapter läuft nicht"
},
"alertMessage": {
"message": "Die Kommunikation mit dem p≡p Adapter funktionioniert nicht. Bitte starten Sie p≡p für Thunderbird neu."
"message": "Die Kommunikation mit dem p≡p Adapter funktionioniert nicht. Bitte starten Sie Thunderbird neu, starten Sie Ihren Computer neu oder installieren Sie p≡p für Thunderbird neu."
},
"passphraseTitle": {
"message": "Passphrase wird benötigt"


+ 1
- 1
addon/_locales/en/messages.json View File

@ -27,7 +27,7 @@
"message": "p≡p Adapter Not Running"
},
"alertMessage": {
"message": "There was a problem communicating with the p≡p adapter. Please reinstall p≡p for Thunderbird."
"message": "There is a problem communicating with the p≡p adapter. Please restart Thunderbird, restart your computer or reinstall p≡p for Thunderbird."
},
"passphraseTitle": {
"message": "Passphrase Required"


+ 3
- 3
addon/content/dialogs/options.js View File

@ -370,7 +370,7 @@ var pEpOptions = {
// Workaround for ENGINE-808.
if (Services.prefs.getBoolPref("extensions.pEp.grouped", false)) {
Services.prompt.alert(
null,
window,
pEpOptions.getLocaleMessage("optionsImportPromptTitle"),
pEpOptions.getLocaleMessage("optionsKeyImportNotPossibleDevGroup"),
);
@ -434,14 +434,14 @@ var pEpOptions = {
msg = pEpOptions.getLocaleMessage("optionsImportSuccessPrivateKey");
}
Services.prompt.alert(
null,
window,
pEpOptions.getLocaleMessage("optionsImportPromptTitle"),
msg,
);
}).catch((err) => {
pEpController.log.error(`Key import error: ${err.message}`);
Services.prompt.alert(
null,
window,
pEpOptions.getLocaleMessage("optionsImportPromptTitle"),
pEpOptions.getLocaleMessage("optionsImportError"),
);


+ 1
- 1
addon/content/modules/pEpServer.js View File

@ -100,7 +100,7 @@ class pEpServer {
// This file is used in the test suite, hence calling this at the top doesn't work.
let { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
Services.prompt.alert(
null,
win,
win.pEp.pEpHdrView.getLocaleMessage("alertTitle"),
win.pEp.pEpHdrView.getLocaleMessage("alertMessage"),
);


+ 2
- 1
addon/content/pEpForThunderbird.js View File

@ -105,8 +105,9 @@ class pEpForThunderbird extends pEp {
let version = this.synchronise(this.serverVersion());
this.log.info(`Adapter version ${version.api_version} (${version.name})`);
if (Services.vc.compare(version.api_version, MIN_REQUIRED_VERSION) < 0) {
let win = Services.wm.getMostRecentWindow("mail:3pane");
Services.prompt.alert(
null,
win,
this.localeMessagesMap.get("alerttitle"),
this.localeMessagesMap.get("alertmessage"),
);


+ 1
- 1
addon/content/pepmessengercompose.js View File

@ -522,7 +522,7 @@ var pEpComposer = {
// Someone produced this error by no having the adapter running when TB starts.
console.error("Creation of @pep.security/compose/mimeencrypt;1 failed");
Services.prompt.alert(
null,
this.win,
this.getLocaleMessage("internalError"),
this.getLocaleMessage("pleaseRestart"),
);


+ 1
- 1
addon/experiments.js View File

@ -257,7 +257,7 @@ function paint(win) {
if (pEp4Tb.openpgpEnabled) {
win.setTimeout(() => Services.prompt.alert(
null,
win,
pEp4Tb.localeMessagesMap.get("openpgpincompatibility"),
pEp4Tb.localeMessagesMap.get("pleaserestart"),
), 1000);


Loading…
Cancel
Save