Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Bug 826384: Kill post-install notification doorhanger. [r=mfinkle] [a…
Browse files Browse the repository at this point in the history
…=akeybl]
  • Loading branch information
sriramramani committed Jan 3, 2013
1 parent 2901a15 commit a7fcfa2
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions mobile/android/chrome/content/browser.js
Expand Up @@ -2193,38 +2193,7 @@ var LightWeightThemeWebInstaller = {
},

_install: function (newLWTheme) {
let previousLWTheme = this._manager.currentTheme;

let listener = {
onEnabled: function(aAddon) {
LightWeightThemeWebInstaller._postInstallNotification(newLWTheme, previousLWTheme);
}
};

AddonManager.addAddonListener(listener);
this._manager.currentTheme = newLWTheme;
AddonManager.removeAddonListener(listener);
},

_postInstallNotification: function (newTheme, previousTheme) {
let buttons = [{
label: Strings.browser.GetStringFromName("lwthemePostInstallNotification.undoButton"),
callback: function () {
LightWeightThemeWebInstaller._manager.forgetUsedTheme(newTheme.id);
LightWeightThemeWebInstaller._manager.currentTheme = previousTheme;
}
}, {
label: Strings.browser.GetStringFromName("lwthemePostInstallNotification.manageButton"),
callback: function () {
BrowserApp.addTab("about:addons", {
showProgress: false,
selected: true
});
}
}];

let message = Strings.browser.GetStringFromName("lwthemePostInstallNotification.message");
NativeWindow.doorhanger.show(message, "Personas", buttons, BrowserApp.selectedTab.id);
},

_previewWindow: null,
Expand Down

0 comments on commit a7fcfa2

Please sign in to comment.