updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / firefox-pgo / reload-new-plugins.patch
blobd6b5ffac6c071df672f225fbb5cc7a1ee73508cc
1 Description: Ensure that new plugins are reloaded
2 Author: Alexander Sack <asac@ubuntu.com>
3 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=460917
4 Forwarded: https://bugzilla.mozilla.org/attachment.cgi?id=350845
5 ---
6 browser/base/content/browser.js | 20 +++++++++++++++++++-
7 1 file changed, 19 insertions(+), 1 deletion(-)
9 --- a/browser/base/content/browser.js
10 +++ b/browser/base/content/browser.js
11 @@ -6720,7 +6720,11 @@ var gPluginHandler = {
12 if (notification)
13 notificationBox.removeNotification(notification);
15 - // reload the browser to make the new plugin show.
16 + // reload plugins
17 + var pm = Components.classes["@mozilla.org/plugin/manager;1"]
18 + .getService(Components.interfaces.nsIPluginManager);
19 + pm.reloadPlugins(false);
20 + // ... and reload the browser to activate new plugins available
21 browser.reload();
24 @@ -6731,9 +6735,17 @@ var gPluginHandler = {
25 var pluginInfo = getPluginInfo(aEvent.target);
26 missingPluginsArray[pluginInfo.mimetype] = pluginInfo;
28 + gBrowser.selectedBrowser.addEventListener("NewPluginInstalled",
29 + gPluginHandler.newPluginInstalled,
30 + false);
32 openDialog("chrome://mozapps/content/plugins/pluginInstallerWizard.xul",
33 "PFSWindow", "chrome,centerscreen,resizable=yes",
34 {plugins: missingPluginsArray, browser: gBrowser.selectedBrowser});
36 + gBrowser.selectedBrowser.removeEventListener("NewPluginInstalled",
37 + gPluginHandler.newPluginInstalled,
38 + false);
41 // Callback for user clicking on a disabled plugin
42 @@ -6798,11 +6810,17 @@ var gPluginHandler = {
43 function showPluginsMissing() {
44 // get the urls of missing plugins
45 var missingPluginsArray = gBrowser.selectedBrowser.missingPlugins;
46 + gBrowser.selectedBrowser.addEventListener("NewPluginInstalled",
47 + gPluginHandler.newPluginInstalled,
48 + false);
49 if (missingPluginsArray) {
50 openDialog("chrome://mozapps/content/plugins/pluginInstallerWizard.xul",
51 "PFSWindow", "chrome,centerscreen,resizable=yes",
52 {plugins: missingPluginsArray, browser: gBrowser.selectedBrowser});
54 + gBrowser.selectedBrowser.removeEventListener("NewPluginInstalled",
55 + gPluginHandler.newPluginInstalled,
56 + false);
59 #ifdef XP_MACOSX