Closed Bug 391625 Opened 17 years ago Closed 17 years ago

Update plugins list on plugins-list-updated

Categories

(Toolkit :: Add-ons Manager, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla1.9beta2

People

(Reporter: mwu, Assigned: mossop)

References

Details

Attachments

(1 file)

The addons manager needs to update the plugins view/list/rdf when the plugins list has been updated.
No longer depends on: 391687
Flags: blocking-firefox3+
Michael, going to see a patch for this before freeze?
Mustfix for M9
Target Milestone: Firefox 3 M8 → Firefox 3 M9
I'm trying to write a testcase for this; Michael, can you elaborate a little more?  i.e. would this be covered by http://litmus.mozilla.org/show_test.cgi?id=4618, http://litmus.mozilla.org/show_test.cgi?id=4622, and/or http://litmus.mozilla.org/show_test.cgi?id=4623?
Litmus Triage Team: tchung, will you cover this test case?
(In reply to comment #4)
> Litmus Triage Team: tchung, will you cover this test case?

Tony's already got enough on his plate, and this is my area, besides...I've got it. 

moving out bugs that don't need to block b1
Target Milestone: Firefox 3 M9 → Firefox 3 M10
Michael can you let me know if you still have plans here or I'll take it.
I'm questioning whether this deserves to be blocking or just wanted. The plugins list in the addons manager is refreshed everytime the addons manager is opened. What this bug appears to be about is updating the addons manager display in the event that a user installs a plugin while it is open.
Assignee: flamingice → nobody
I don't think this should be blocking as well.
Refreshing the list after a plugin has been installed seems like a fairly important final step in a transaction, providing confirmation of the successful install.

I'm not sure why you consider this to not be a blocking issue.
Because plugins are typically installed via the plugin finder service UI or a third party installer and are not installed via the EM UI.
If I am reading the plugins code right (and I think I am), the only time plugins-list-updated will be called after the addons window has been opened is if a new plugin is installed using an xpi that notifies us of the install (the xpi install method is no longer supported for Windows from what I understand), or if a newly installed plugin is detected, the detection happens when a page is loaded that contains a plugin we don't know about yet.
The first case you mention is the only one that concerns me in that installing via an xpi directly (e.g. without using PFS) would itself open the EM ui but that is typically done via PFS.
Attached patch patch rev 1Splinter Review
This is a fairly simple patch, on notification of a change it just wipes clears the root container in the plugins datasource and re-adds everything. Running this inside a batch makes the template builder behave a bit nicer and leave the same plugin selected if the plugins pane is displayed.

One minor oddity is that if the addons window is in the background the selection of the plugin changes from blue to grey, then when you focus the window it goes blue again. Not sure what is going on there but I think it is related to bug 385374.
Assignee: nobody → dtownsend
Status: NEW → ASSIGNED
Attachment #286165 - Flags: review?(robert.bugzilla)
Whiteboard: [has patch]
Testcase to run via irc chat: 

Mossop:
What you'd have to do is startup firefox, open the addons manager. Then outside of firefox you need to install a new plugin, using the java/flash installer f.e. Then in a firefox browser window visit a page that uses that plugin so that hopefully it detects the new plugin and uses it. Then look back in the addon window and see if it has been updated to display the new plugin

Mossop:
Actually some of the xpi installers probably do the job as well, could be an alternate testcase
Attachment #286165 - Flags: review?(robert.bugzilla) → review+
Keywords: checkin-needed
Whiteboard: [has patch] → [has patch][has review]
Priority: -- → P2
Checking in toolkit/mozapps/extensions/content/extensions.js;
/cvsroot/mozilla/toolkit/mozapps/extensions/content/extensions.js,v  <--  extensions.js
new revision: 1.152; previous revision: 1.151
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [has patch][has review]
As Java now uses an EXE-based plugin installer, this doesn't really work until we load about:plugins manually; do we want a spin-off bug for that?  It seems that the intent here was for XPI-based installers, so that's not a design oversight.
Stephen, it also applies to plugins installed via PFS and Core -> Plugins does not have a method to get notified about plugins installed via an installer nor do I think such a method needs to be implemented... not to mention that there is no reasonable way for Core -> Plugins to get such a notification. So I'd say no.
I believe I saw code in Core -> Plugins to rescan the plugins if it comes across plugin content on a page that it doesn't know how to handle, which would then trigger us to update. I may have been reading it wrong though.
I recall that as well but I believe Stephen was referring to updating after running an installer which I am sure Core -> Plugins won't receive a notification for.
Not immediately no
Verified fix on Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b2) Gecko/2007121120 Firefox/3.0b2.   Addons manager displays the plugin in the window after the plugin has been installed.
Status: RESOLVED → VERIFIED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: