Annotation of /trunk/mozilla-firefox/patches/mozilla-firefox-3.6.7-reload-new-plugins.patch
Parent Directory | Revision Log
Revision 1062 -
(hide annotations)
(download)
Wed Jul 21 09:48:25 2010 UTC (14 years, 2 months ago) by niro
File size: 2473 byte(s)
Wed Jul 21 09:48:25 2010 UTC (14 years, 2 months ago) by niro
File size: 2473 byte(s)
-use ported patch from gentoo
1 | niro | 1062 | This patch has been ported to 3.6.4, may not be entirely correct. |
2 | |||
3 | Original patch was from bmo 460917, att 350845 | ||
4 | |||
5 | --- | ||
6 | --- browser/base/content/browser.js | ||
7 | +++ browser/base/content/browser.js | ||
8 | @@ -6009,9 +6009,18 @@ | ||
9 | var pluginInfo = getPluginInfo(aEvent.target); | ||
10 | missingPluginsArray[pluginInfo.mimetype] = pluginInfo; | ||
11 | |||
12 | + | ||
13 | + gBrowser.selectedBrowser.addEventListener("NewPluginInstalled", | ||
14 | + gMissingPluginInstaller.refreshBrowser, | ||
15 | + false); | ||
16 | + | ||
17 | openDialog("chrome://mozapps/content/plugins/pluginInstallerWizard.xul", | ||
18 | "PFSWindow", "chrome,centerscreen,resizable=yes", | ||
19 | {plugins: missingPluginsArray, browser: gBrowser.selectedBrowser}); | ||
20 | + | ||
21 | + gBrowser.selectedBrowser.removeEventListener("NewPluginInstalled", | ||
22 | + gMissingPluginInstaller.refreshBrowser, | ||
23 | + false); | ||
24 | }, | ||
25 | |||
26 | // Callback for user clicking on a disabled plugin | ||
27 | @@ -6107,11 +6116,19 @@ | ||
28 | function showPluginsMissing() { | ||
29 | // get the urls of missing plugins | ||
30 | var missingPluginsArray = gBrowser.selectedBrowser.missingPlugins; | ||
31 | + | ||
32 | + gBrowser.selectedBrowser.addEventListener("NewPluginInstalled", | ||
33 | + gMissingPluginInstaller.refreshBrowser, | ||
34 | + false); | ||
35 | + | ||
36 | if (missingPluginsArray) { | ||
37 | window.openDialog("chrome://mozapps/content/plugins/pluginInstallerWizard.xul", | ||
38 | "PFSWindow", "chrome,centerscreen,resizable=yes", | ||
39 | {plugins: missingPluginsArray, browser: gBrowser.selectedBrowser}); | ||
40 | } | ||
41 | + gBrowser.selectedBrowser.removeEventListener("NewPluginInstalled", | ||
42 | + gMissingPluginInstaller.refreshBrowser, | ||
43 | + false); | ||
44 | } | ||
45 | |||
46 | if (aEvent.type == "PluginBlocklisted") { | ||
47 | @@ -6442,6 +6459,13 @@ | ||
48 | notificationBox.removeNotification(notification); | ||
49 | } | ||
50 | // reload the browser to make the new plugin show. | ||
51 | + | ||
52 | + // reload plugins | ||
53 | + var pm = Components.classes["@mozilla.org/plugin/manager;1"] | ||
54 | + .getService(Components.interfaces.nsIPluginManager); | ||
55 | + pm.reloadPlugins(false); | ||
56 | + | ||
57 | + // ... and reload the browser to activate new plugins available | ||
58 | browser.reload(); | ||
59 | } | ||
60 | }; |