|
|
@ -134,13 +134,27 @@ var pEp4Tb = class extends ExtensionCommon.ExtensionAPI { |
|
|
|
|
|
|
|
ExtensionSupport.unregisterWindowListener(EXTENSION_NAME); |
|
|
|
|
|
|
|
let { pEpController } = ChromeUtils.import("chrome://pEp4Tb/content/pEpController.js"); |
|
|
|
|
|
|
|
for (let win of Services.wm.getEnumerator("mail:3pane")) { |
|
|
|
unpaint(win); |
|
|
|
if (isAppShutdown) { |
|
|
|
// Make sure the controller gets shut down.
|
|
|
|
pEpController.shutdown(); |
|
|
|
} else { |
|
|
|
unpaint(win); |
|
|
|
} |
|
|
|
} |
|
|
|
for (let win of Services.wm.getEnumerator("msgcompose")) { |
|
|
|
unpaint(win); |
|
|
|
if (isAppShutdown) { |
|
|
|
// Make sure the controller gets shut down.
|
|
|
|
pEpController.shutdown(); |
|
|
|
} else { |
|
|
|
unpaint(win); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (isAppShutdown) return; |
|
|
|
|
|
|
|
// Unload all modules.
|
|
|
|
Cu.unload("chrome://pEp4Tb/content/modules/handshake.js"); |
|
|
|
Cu.unload("chrome://pEp4Tb/content/modules/pEp.js"); |
|
|
@ -166,8 +180,6 @@ var pEp4Tb = class extends ExtensionCommon.ExtensionAPI { |
|
|
|
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.
|
|
|
|