Contents of /trunk/mozilla-firefox/patches/mozilla-firefox-3.6.3-reload-new-plugins.patch
Parent Directory | Revision Log
Revision 1048 -
(show annotations)
(download)
Mon Jun 7 18:09:19 2010 UTC (14 years, 3 months ago) by niro
File size: 2522 byte(s)
Mon Jun 7 18:09:19 2010 UTC (14 years, 3 months ago) by niro
File size: 2522 byte(s)
-re-diffed patches
1 | diff -Naur mozilla-1.9.2/browser/base/content/browser.js mozilla-1.9.2-magellan/browser/base/content/browser.js |
2 | --- mozilla-1.9.2/browser/base/content/browser.js 2010-04-02 18:03:19.000000000 +0200 |
3 | +++ mozilla-1.9.2-magellan/browser/base/content/browser.js 2010-06-07 16:42:16.000000000 +0200 |
4 | @@ -5946,12 +5946,20 @@ |
5 | var pluginInfo = getPluginInfo(aEvent.target); |
6 | missingPluginsArray[pluginInfo.mimetype] = pluginInfo; |
7 | |
8 | + gBrowser.selectedBrowser.addEventListener("NewPluginInstalled", |
9 | + gMissingPluginInstaller.refreshBrowser, |
10 | + false); |
11 | + |
12 | if (missingPluginsArray) { |
13 | window.openDialog("chrome://mozapps/content/plugins/pluginInstallerWizard.xul", |
14 | "PFSWindow", "chrome,centerscreen,resizable=yes", |
15 | {plugins: missingPluginsArray, browser: gBrowser.selectedBrowser}); |
16 | } |
17 | |
18 | + gBrowser.selectedBrowser.removeEventListener("NewPluginInstalled", |
19 | + gMissingPluginInstaller.refreshBrowser, |
20 | + false); |
21 | + |
22 | aEvent.stopPropagation(); |
23 | } |
24 | |
25 | @@ -6028,11 +6036,17 @@ |
26 | function showPluginsMissing() { |
27 | // get the urls of missing plugins |
28 | var missingPluginsArray = gBrowser.selectedBrowser.missingPlugins; |
29 | + gBrowser.selectedBrowser.addEventListener("NewPluginInstalled", |
30 | + gMissingPluginInstaller.refreshBrowser, |
31 | + false); |
32 | if (missingPluginsArray) { |
33 | window.openDialog("chrome://mozapps/content/plugins/pluginInstallerWizard.xul", |
34 | "PFSWindow", "chrome,centerscreen,resizable=yes", |
35 | {plugins: missingPluginsArray, browser: gBrowser.selectedBrowser}); |
36 | } |
37 | + gBrowser.selectedBrowser.removeEventListener("NewPluginInstalled", |
38 | + gMissingPluginInstaller.refreshBrowser, |
39 | + false); |
40 | } |
41 | |
42 | if (aEvent.type == "PluginBlocklisted") { |
43 | @@ -6121,6 +6135,13 @@ |
44 | notificationBox.removeNotification(notification); |
45 | } |
46 | // reload the browser to make the new plugin show. |
47 | + |
48 | + // reload plugins |
49 | + var pm = Components.classes["@mozilla.org/plugin/manager;1"] |
50 | + .getService(Components.interfaces.nsIPluginManager); |
51 | + pm.reloadPlugins(false); |
52 | + |
53 | + // ... and reload the browser to activate new plugins available |
54 | browser.reload(); |
55 | } |
56 |