[Pkg-mozext-commits] [personasplus] 10/76: Reinstall Support (#44)

David Prévot taffit at moszumanska.debian.org
Fri Aug 4 21:45:02 UTC 2017


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository personasplus.

commit 0ce70f80e9fd3f3310fd3b74e8e20731a27d0d39
Author: derinb <baris at barisderin.com>
Date:   Fri Jul 15 17:43:43 2016 +0300

    Reinstall Support (#44)
    
    Fix for Reinstalling the Personas Plus add-on will cause display issues
    in the menu Bug
---
 extension/bootstrap.js        | 5 +++--
 extension/modules/personas.js | 4 ++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/extension/bootstrap.js b/extension/bootstrap.js
index f39ff9d..f20147d 100644
--- a/extension/bootstrap.js
+++ b/extension/bootstrap.js
@@ -51,7 +51,7 @@ var PersonasPlusBootstrapAddon = {
         this.setupBrowserUI();
         this.addWindowListener();
         this.addAddonSkinCSS();
-        if (reason == ADDON_ENABLE) {
+        if (reason == ADDON_ENABLE || reason == ADDON_INSTALL) {
             // modules that come with Firefox
             Cu.import("resource://gre/modules/XPCOMUtils.jsm");
             // LightweightThemeManager may not be not available (Firefox < 3.6 or Thunderbird)
@@ -74,9 +74,10 @@ var PersonasPlusBootstrapAddon = {
         this.tearBrowserUI();
         this.removeWindowListener();
         this.removeAddonSkinCSS();
+        PersonaController.onQuitApplicationByShutDown();
         Cu.unload("resource://personas/modules/personas.js");
         this.requestRemovePrerequisites(data);
-        if (reason == ADDON_DISABLE) {
+        if (reason == ADDON_DISABLE || reason == ADDON_UNINSTALL) {
             // modules that come with Firefox
             Cu.import("resource://gre/modules/XPCOMUtils.jsm");
             // LightweightThemeManager may not be not available (Firefox < 3.6 or Thunderbird)
diff --git a/extension/modules/personas.js b/extension/modules/personas.js
index 142ec67..eb9f0c6 100644
--- a/extension/modules/personas.js
+++ b/extension/modules/personas.js
@@ -1424,6 +1424,10 @@ var PersonaController = {
         document.getElementById("personasDataUnavailableTooltip").parentNode.removeChild(document.getElementById("personasDataUnavailableTooltip"));
         document.getElementById("personas-menu").parentNode.removeChild(document.getElementById("personas-menu"));
         document.getElementById("personas-selector-button").parentNode.removeChild(document.getElementById("personas-selector-button"));
+    },
+    onQuitApplicationByShutDown: function() {
+        PersonaService.onQuitApplication();
+        Components.utils.unload("resource://personas/modules/service.js");
     }
 
 };

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/personasplus.git



More information about the Pkg-mozext-commits mailing list