Closed
Bug 341166
Opened 18 years ago
Closed 18 years ago
Problems with dead progress bars and the restart button in
Categories
(Toolkit :: Add-ons Manager, defect)
Toolkit
Add-ons Manager
Tracking
()
RESOLVED
FIXED
People
(Reporter: mossop, Assigned: mossop)
References
Details
(Keywords: fixed1.8.1)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
mossop
:
review+
robert.strong.bugs
:
approval-branch-1.8.1+
|
Details | Diff | Splinter Review |
Spun off from bug 335757, after an extension update fails the update remains in the installs view with a progress bar with a small amount of progress to it.
Also the restart app button isn't correctly updated on extension install.
Assignee | ||
Comment 1•18 years ago
|
||
This patch changes the broken update item into a failed item. It removes the progress and adds the string "Install failed." below it.
> - if (!element) return;
> + if (!element && aState != nsIXPIProgressDialog.DIALOG_CLOSE) return;
This extra check is necessary because when installing a new extension, the item in the install view is removed (replaced by an item with the extensions actual ID) before the DIALOG_CLOSE call. Without this the app restart button and the sort order of the EM is not updated properly.
The logic for enabling the app restart button is changed slightly. The button should be enabled if there is at least one item successfully installed and no items still installing. Previously the restart button would be enabled if there were only failed installs in the view.
Assignee: nobody → mossop.bugzilla
Status: NEW → ASSIGNED
Attachment #225196 -
Flags: review?(robert.bugzilla)
Comment 2•18 years ago
|
||
Comment on attachment 225196 [details] [diff] [review]
patch rev 1
>Index: toolkit/mozapps/extensions/content/extensions.js
...
>@@ -626,17 +626,17 @@ XPInstallDownloadManager.prototype = {
> },
>
> /////////////////////////////////////////////////////////////////////////////
> // nsIAddonUpdateListener
> onStateChange: function (aAddon, aState, aValue)
> {
> const nsIXPIProgressDialog = Components.interfaces.nsIXPIProgressDialog;
> var element = this.getElementForAddon(aAddon);
>- if (!element) return;
>+ if (!element && aState != nsIXPIProgressDialog.DIALOG_CLOSE) return;
Since you are here could you change this to the following since that is the prevailing style?
if (!element && aState != nsIXPIProgressDialog.DIALOG_CLOSE)
return;
>Index: toolkit/mozapps/extensions/src/nsExtensionManager.js.in
...
>@@ -18,16 +18,17 @@
...
>+ * Dave Townsend <dave.townsend@blueprintit.co.uk>
It is about time. :)
>@@ -5615,16 +5616,20 @@ ExtensionManager.prototype = {
> ds.updateDownloadState(id, "downloading");
> break;
> case nsIXPIProgressDialog.INSTALL_START:
> ds.updateDownloadState(id, "finishing");
> ds.updateDownloadProgress(id, null);
> break;
> case nsIXPIProgressDialog.INSTALL_DONE:
> --this._downloadCount;
>+ if (value != 0 && value != 999 && value != -210 && id != addon.xpiURL) {
>+ ds.updateDownloadState(id, "failure");
>+ ds.updateDownloadProgress(id, null);
>+ }
Could you add a similar comment as the one in extensions.js for what these values are?
r=me with those nits picked.
Thanks Dave!
Attachment #225196 -
Flags: review?(robert.bugzilla) → review+
Assignee | ||
Comment 3•18 years ago
|
||
nits picked, carrying over review.
Attachment #225196 -
Attachment is obsolete: true
Attachment #225286 -
Flags: review+
Assignee | ||
Updated•18 years ago
|
Whiteboard: [checkin needed]
Comment 4•18 years ago
|
||
Landed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Updated•18 years ago
|
Attachment #225286 -
Flags: approval-branch-1.8.1+
Updated•16 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•