Commit e72c6099 authored by Patrick Brunschwig's avatar Patrick Brunschwig

fixed displaying of pEp status info

better logging of startup
parent 120bba16
Pipeline #66813713 passed with stage
in 3 minutes and 1 second
......@@ -74,7 +74,7 @@ var EnigmailCore = {
// Wait for TB Startup to be complete to initialize window overlays
let enigmailOverlays = getEnigmailOverlays();
Services.obs.addObserver(enigmailOverlays.mailStartupDone, "mail-startup-done", false);
Services.obs.addObserver(onMailStartupDone, "mail-startup-done", false);
getEnigmailSqlite().checkDatabaseStructure();
getEnigmailPrefs().startup(reason);
......@@ -82,19 +82,13 @@ var EnigmailCore = {
let self = this;
this.factories = [];
function continueStartup() {
getEnigmailLog().DEBUG("core.jsm: startup.continueStartup()\n");
function continueStartup(type) {
getEnigmailLog().DEBUG(`core.jsm: startup.continueStartup(${type})\n`);
try {
let mimeEncrypt = getEnigmailMimeEncrypt();
mimeEncrypt.startup(reason);
mimeEncrypt.startup(reason);
enigmailOverlays.startupCore(reason);
let cLineReg = getEnigmailCommandLine().categoryRegistry;
let catMan = Cc["@mozilla.org/categorymanager;1"].getService(Ci.nsICategoryManager);
catMan.addCategoryEntry(cLineReg.category,
cLineReg.entry,
cLineReg.serviceName,
false, true);
self.factories.push(new Factory(getEnigmailProtocolHandler()));
self.factories.push(new Factory(getEnigmailCommandLine().Handler));
self.factories.push(new Factory(mimeEncrypt.Handler));
......@@ -106,7 +100,11 @@ var EnigmailCore = {
getEnigmailVerify().registerContentTypeHandler();
getEnigmailWksMimeHandler().registerContentTypeHandler();
getEnigmailFiltersWrapper().onStartup();
getEnigmailPEPAdapter().initialize().then(continueStartup).catch(continueStartup);
getEnigmailPEPAdapter().initialize().then(r => {
continueStartup(0);
}).catch(r => {
continueStartup(1);
});
},
shutdown: function(reason) {
......@@ -486,4 +484,10 @@ class Factory {
unregister() {
Cm.unregisterFactory(this.component.prototype.classID, this);
}
}
function onMailStartupDone() {
getEnigmailLog().DEBUG("core.jsm: onMailStartupDone()\n");
getEnigmailOverlays().mailStartupDone();
}
\ No newline at end of file
......@@ -117,12 +117,8 @@ const overlays = {
"chrome://messenger/content/AccountManager.xul": ["accountManagerOverlay.xul"]
};
const {
EnigmailLog
} = ChromeUtils.import("chrome://enigmail/content/modules/log.jsm", {});
const {
Overlays
} = ChromeUtils.import("chrome://enigmail/content/modules/overlays.jsm", {});
const EnigmailLog = ChromeUtils.import("chrome://enigmail/content/modules/log.jsm").EnigmailLog;
const Overlays = ChromeUtils.import("chrome://enigmail/content/modules/overlays.jsm").Overlays;
function DEBUG_LOG(str) {
EnigmailLog.DEBUG(str);
......@@ -231,6 +227,7 @@ var EnigmailOverlays = {
* and then add Enigmail UI
*/
mailStartupDone: function() {
DEBUG_LOG(`enigmailOverlays.jsm: mailStartupDone()\n`);
gMailStartupDone = true;
if (gCoreStartup) {
......@@ -243,7 +240,7 @@ var EnigmailOverlays = {
* and then add Enigmail UI
*/
startupCore: function(reason) {
DEBUG_LOG(`overlay.jsm: initiating startup (${reason})\n`);
DEBUG_LOG(`enigmailOverlays.jsm: startupCore(${reason})\n`);
gCoreStartup = true;
......
......@@ -852,6 +852,7 @@ function LOCAL_DEBUG(str) {
}
function initModule() {
EnigmailLog.DEBUG("mimeEncrypt.jsm: initModule()\n");
var env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
var nspr_log_modules = env.get("NSPR_LOG_MODULES");
var matches = nspr_log_modules.match(/mimeEncrypt:(\d+)/);
......
......@@ -26,7 +26,7 @@
<link href="chrome://enigmail/skin/enigmail.css" rel="stylesheet" type="text/css"/>
<broadcasterset id="otherActionsButtonBroadcasters">
<broadcasterset insertafter="mailKeys">
<broadcaster id="enigmailBcDisplayClass" class="headerValue"/>
<broadcaster id="enigmail-pEp-bc" collapsed="true"/>
</broadcasterset>
......@@ -254,6 +254,7 @@
</vbox>
</panelview>
</panelmultiview>
<!-- Menu content for all apps -->
<menubar id="mail-menubar">
<menu id="menu_Enigmail"
......
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