|
|
@ -110,8 +110,43 @@ var pEp4Tb = class extends ExtensionCommon.ExtensionAPI { |
|
|
|
} |
|
|
|
|
|
|
|
onShutdown(isAppShutdown) { |
|
|
|
if (isAppShutdown) return; |
|
|
|
console.info("pEp4Tb: onShutdown() called"); |
|
|
|
|
|
|
|
ExtensionSupport.unregisterWindowListener(EXTENSION_NAME); |
|
|
|
|
|
|
|
for (let win of Services.wm.getEnumerator("mail:3pane")) { |
|
|
|
unpaint(win); |
|
|
|
} |
|
|
|
for (let win of Services.wm.getEnumerator("msgcompose")) { |
|
|
|
unpaint(win); |
|
|
|
} |
|
|
|
|
|
|
|
// Unload all modules.
|
|
|
|
Cu.unload("chrome://pEp4Tb/content/modules/handshake.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/modules/pEp.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/modules/pEpAdapter.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/modules/pEpServer.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/modules/utils.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/modules/xhrQueue.js"); |
|
|
|
|
|
|
|
Cu.unload("chrome://pEp4Tb/content/constants.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/detectAdapter.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/pEpController.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/pEpFactory.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/pEpForThunderbird.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/pEpLogger.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/pEpMimeDecrypt.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/pEpMimeEncrypt.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/TbContacts.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/TbHelper.js"); |
|
|
|
// Sync.
|
|
|
|
Cu.unload("chrome://pEp4Tb/content/sendMessage.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/syncWizard.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/TbSync.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/modules/sync.js"); |
|
|
|
|
|
|
|
if (isAppShutdown) return; |
|
|
|
|
|
|
|
this.chromeHandle.destruct(); |
|
|
|
this.chromeHandle = null; |
|
|
|
// Looks like we got uninstalled. Maybe a new version will be installed now.
|
|
|
@ -128,7 +163,6 @@ var pEp4Tb = class extends ExtensionCommon.ExtensionAPI { |
|
|
|
|
|
|
|
getAPI(context) { |
|
|
|
let { extension } = context; |
|
|
|
context.callOnClose(this); |
|
|
|
return { |
|
|
|
pEp4Tb: { |
|
|
|
addWindowListener() { |
|
|
@ -187,42 +221,6 @@ var pEp4Tb = class extends ExtensionCommon.ExtensionAPI { |
|
|
|
}, |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
close() { |
|
|
|
console.info("pEp4Tb: close() called"); |
|
|
|
ExtensionSupport.unregisterWindowListener(EXTENSION_NAME); |
|
|
|
|
|
|
|
for (let win of Services.wm.getEnumerator("mail:3pane")) { |
|
|
|
unpaint(win); |
|
|
|
} |
|
|
|
for (let win of Services.wm.getEnumerator("msgcompose")) { |
|
|
|
unpaint(win); |
|
|
|
} |
|
|
|
|
|
|
|
// Unload all modules.
|
|
|
|
Cu.unload("chrome://pEp4Tb/content/modules/handshake.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/modules/pEp.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/modules/pEpAdapter.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/modules/pEpServer.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/modules/utils.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/modules/xhrQueue.js"); |
|
|
|
|
|
|
|
Cu.unload("chrome://pEp4Tb/content/constants.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/detectAdapter.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/pEpController.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/pEpFactory.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/pEpForThunderbird.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/pEpLogger.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/pEpMimeDecrypt.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/pEpMimeEncrypt.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/TbContacts.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/TbHelper.js"); |
|
|
|
// Sync.
|
|
|
|
Cu.unload("chrome://pEp4Tb/content/sendMessage.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/syncWizard.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/TbSync.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/modules/sync.js"); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
function paint(win) { |
|
|
|