--- browser/base/content/browser.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) Index: mozilla/browser/base/content/browser.js =================================================================== --- mozilla.orig/browser/base/content/browser.js +++ mozilla/browser/base/content/browser.js @@ -5780,22 +5780,30 @@ } missingPluginInstaller.prototype.installSinglePlugin = function(aEvent){ var missingPluginsArray = {}; var pluginInfo = getPluginInfo(aEvent.target); missingPluginsArray[pluginInfo.mimetype] = pluginInfo; + gBrowser.selectedBrowser.addEventListener("NewPluginInstalled", + gMissingPluginInstaller.refreshBrowser, + false); + if (missingPluginsArray) { window.openDialog("chrome://mozapps/content/plugins/pluginInstallerWizard.xul", "PFSWindow", "chrome,centerscreen,resizable=yes", {plugins: missingPluginsArray, browser: gBrowser.selectedBrowser}); } + gBrowser.selectedBrowser.removeEventListener("NewPluginInstalled", + gMissingPluginInstaller.refreshBrowser, + false); + aEvent.stopPropagation(); } missingPluginInstaller.prototype.managePlugins = function(aEvent){ BrowserOpenAddonsMgr("plugins"); aEvent.stopPropagation(); } @@ -5897,37 +5905,50 @@ // clear the plugin list, now that at least one plugin has been installed browser.missingPlugins = null; if (notification) { // reset UI notificationBox.removeNotification(notification); } // reload the browser to make the new plugin show. + + // reload plugins + var pm = Components.classes["@mozilla.org/plugin/manager;1"] + .getService(Components.interfaces.nsIPluginManager); + pm.reloadPlugins(false); + + // ... and reload the browser to activate new plugins available browser.reload(); } function blocklistInfo() { var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"] .getService(Components.interfaces.nsIURLFormatter); var url = formatter.formatURLPref("extensions.blocklist.detailsURL"); gBrowser.loadOneTab(url, null, null, null, false, false); return true; } function pluginsMissing() { // get the urls of missing plugins var missingPluginsArray = gBrowser.selectedBrowser.missingPlugins; + gBrowser.selectedBrowser.addEventListener("NewPluginInstalled", + gMissingPluginInstaller.refreshBrowser, + false); if (missingPluginsArray) { window.openDialog("chrome://mozapps/content/plugins/pluginInstallerWizard.xul", "PFSWindow", "chrome,centerscreen,resizable=yes", {plugins: missingPluginsArray, browser: gBrowser.selectedBrowser}); } + gBrowser.selectedBrowser.removeEventListener("NewPluginInstalled", + gMissingPluginInstaller.refreshBrowser, + false); } var gMissingPluginInstaller = new missingPluginInstaller(); function convertFromUnicode(charset, str) { try { var unicodeConverter = Components