Closed
Bug 614442
Opened 14 years ago
Closed 14 years ago
Improve add-on manager to support lightweight themes
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: fabrice, Assigned: fabrice)
Details
Attachments
(1 file)
2.16 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
Currently the add-on manager does nothing special for themes. For instance, it should take care of having only one theme enabled at most.
Assignee | ||
Comment 1•14 years ago
|
||
Assignee: nobody → fabrice
Attachment #492854 -
Flags: review?(mark.finkle)
Comment 2•14 years ago
|
||
want!
Comment 3•14 years ago
|
||
Comment on attachment 492854 [details] [diff] [review]
fix
># HG changeset patch
># User Fabrice Desré <fabrice@mozilla.com>
># Parent abc1448defe9a447b112c624a38861d96fb660ac
>Bug 614442 - Improve add-on manager to support lightweight themes
>
>diff --git a/chrome/content/extensions.js b/chrome/content/extensions.js
>--- a/chrome/content/extensions.js
>+++ b/chrome/content/extensions.js
>@@ -313,7 +313,7 @@ var ExtensionsView = {
> listitem.setAttribute("appDisabled", addon.appDisabled);
> listitem.setAttribute("appManaged", appManaged);
> listitem.setAttribute("description", addon.description);
>- listitem.setAttribute("optionsURL", addon.optionsURL);
>+ listitem.setAttribute("optionsURL", addon.optionsURL ? addon.optionsURL : "");
> listitem.setAttribute("opType", opType);
> listitem.setAttribute("updateable", updateable);
> listitem.setAttribute("isReadonly", !uninstallable);
>@@ -366,7 +366,23 @@ var ExtensionsView = {
> aItem.setAttribute("isDisabled", false);
> aItem._engine.hidden = false;
> opType = "needs-enable";
>- } else {
>+ } else if (aItem.getAttribute("type") == "theme") {
>+ // we can have only one theme enabled, so disable the current one if any
>+ let currentTheme = null;
>+ let cur = this._localItem.nextSibling;
>+ while (cur != this._repoItem) {
>+ if (cur.addon && (cur.addon.type == "theme") && (cur.addon.isActive)) {
>+ currentTheme = cur;
>+ break;
>+ }
>+ cur = cur.nextSibling;
>+ }
>+ if (currentTheme)
>+ this.disable(currentTheme);
>+ aItem.addon.userDisabled = false;
>+ aItem.setAttribute("isDisabled", false);
>+ }
>+ else {
> aItem.addon.userDisabled = false;
> opType = this._getOpTypeForOperations(aItem.addon.pendingOperations);
>
>@@ -385,6 +401,9 @@ var ExtensionsView = {
> aItem.setAttribute("isDisabled", true);
> aItem._engine.hidden = true;
> opType = "needs-disable";
>+ } else if (aItem.getAttribute("type") == "theme") {
>+ aItem.addon.userDisabled = true;
>+ aItem.setAttribute("isDisabled", true);
> } else {
> aItem.addon.userDisabled = true;
> opType = this._getOpTypeForOperations(aItem.addon.pendingOperations);
Attachment #492854 -
Flags: review?(mark.finkle) → review+
Comment 4•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 5•14 years ago
|
||
It'd be nice to have some testscripts associated to this patch.
Flags: in-testsuite?
Comment 6•14 years ago
|
||
VERIFIED FIXED on:
Mozilla /5.0 (Android;Linux armv7l;rv:7.0a1) Gecko/20110530 Firefox/7.0a1 Fennec/7.0a1
Mozilla /5.0 (Android;Linux armv7l;rv:6.0a2) Gecko/20110530 Firefox/6.0a2 Fennec/6.0a2
Device: HTC Desire Z (Android 2.2)
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•