Bug 580639 - Uninstall for disabled add-ons doesn't work. [r=mfinkle]

This commit is contained in:
Vivien Nicolas 2010-07-22 15:42:40 -04:00
parent cd52ac06f1
commit 0a7e1891e8
2 changed files with 8 additions and 1 deletions

View File

@ -193,6 +193,7 @@ richlistitem[isDisabled="true"] .show-on-disable {
richlistitem[opType="needs-restart"] .hide-on-restart,
richlistitem[opType="needs-uninstall"] .hide-on-uninstall,
richlistitem[isDisabled="true"][opType="needs-uninstall"],
richlistitem[opType="needs-install"] .hide-on-install,
richlistitem[opType="needs-enable"] .hide-on-enable,
richlistitem[opType="needs-disable"] .hide-on-disable {

View File

@ -71,7 +71,7 @@ var ExtensionsView = {
return "needs-disable";
return "";
},
_createItem: function ev__createItem(aAddon, aTypeName) {
let item = document.createElement("richlistitem");
item.setAttribute("id", PREFIX_ITEM_URI + aAddon.id);
@ -386,6 +386,12 @@ var ExtensionsView = {
if (opType == "needs-uninstall")
this.showRestart();
// A disabled addon doesn't need a restart so it has no pending ops and
// can't be cancelled
if (!aItem.addon.isActive && opType == "")
opType = "needs-uninstall";
aItem.setAttribute("opType", opType);
}
},