mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00:00
Bug 605801 - No restart notification when installing add-ons from AMO [r=mfinkle]
This commit is contained in:
parent
525a77d530
commit
1bad638104
@ -765,31 +765,26 @@ function AddonInstallListener() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
AddonInstallListener.prototype = {
|
AddonInstallListener.prototype = {
|
||||||
_updating: false,
|
|
||||||
|
|
||||||
onInstallEnded: function(aInstall, aAddon) {
|
onInstallEnded: function(aInstall, aAddon) {
|
||||||
|
if (aInstall.existingAddon && (aInstall.existingAddon.pendingOperations & AddonManager.PENDING_UPGRADE))
|
||||||
|
ExtensionsView.showRestart("update");
|
||||||
|
else if (aAddon.pendingOperations & AddonManager.PENDING_INSTALL)
|
||||||
|
ExtensionsView.showRestart("normal");
|
||||||
|
|
||||||
let element = ExtensionsView.getElementForAddon(aAddon.id);
|
let element = ExtensionsView.getElementForAddon(aAddon.id);
|
||||||
if (!element)
|
if (element) {
|
||||||
return;
|
element.setAttribute("opType", "needs-restart");
|
||||||
|
element.setAttribute("status", "success");
|
||||||
this._updating = element.hasAttribute("updating");
|
|
||||||
if (aAddon.pendingOperations & AddonManager.PENDING_INSTALL)
|
// If we are updating an add-on, change the status
|
||||||
ExtensionsView.showRestart(element.hasAttribute("updating") ? "update" : "normal");
|
if (element.hasAttribute("updating")) {
|
||||||
|
let strings = Elements.browserBundle;
|
||||||
this._showInstallCompleteAlert(true);
|
element.setAttribute("updateStatus", strings.getFormattedString("addonUpdate.updated", [aAddon.version]));
|
||||||
|
element.removeAttribute("updating");
|
||||||
if (!ExtensionsView.visible)
|
}
|
||||||
return;
|
|
||||||
|
|
||||||
element.setAttribute("opType", "needs-restart");
|
|
||||||
element.setAttribute("status", "success");
|
|
||||||
|
|
||||||
// If we are updating an add-on, change the status
|
|
||||||
if (this._updating) {
|
|
||||||
let strings = Elements.browserBundle;
|
|
||||||
element.setAttribute("updateStatus", strings.getFormattedString("addonUpdate.updated", [aAddon.version]));
|
|
||||||
element.removeAttribute("updating");
|
|
||||||
}
|
}
|
||||||
|
this._showInstallCompleteAlert(true);
|
||||||
},
|
},
|
||||||
|
|
||||||
onInstallFailed: function(aInstall, aError) {
|
onInstallFailed: function(aInstall, aError) {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<em:minVersion>0</em:minVersion>
|
<em:minVersion>0</em:minVersion>
|
||||||
<em:maxVersion>*</em:maxVersion>
|
<em:maxVersion>*</em:maxVersion>
|
||||||
<em:updateLink>http://example.com/browser/mobile/chrome/addons/browser_install1_3.xpi</em:updateLink>
|
<em:updateLink>http://example.com/browser/mobile/chrome/addons/browser_install1_3.xpi</em:updateLink>
|
||||||
<em:updateHash>sha1:8c4d2f5c9eadc8850558a9a9618aae25886dbe7c</em:updateHash>
|
<em:updateHash>sha1:f2d4b57686c60e237bcf19cd4ca8d2b65de04b07</em:updateHash>
|
||||||
</Description>
|
</Description>
|
||||||
</em:targetApplication>
|
</em:targetApplication>
|
||||||
</Description>
|
</Description>
|
||||||
|
Loading…
Reference in New Issue
Block a user