Annotation of /trunk/mozilla-firefox/patches/mozilla-firefox-3.5-reload-new-plugins.patch
Parent Directory | Revision Log
Revision 867 -
(hide annotations)
(download)
Sat Jul 11 13:44:14 2009 UTC (15 years, 2 months ago) by niro
File size: 3360 byte(s)
Sat Jul 11 13:44:14 2009 UTC (15 years, 2 months ago) by niro
File size: 3360 byte(s)
-patches for mozilla-firefox-3.5
1 | niro | 867 | --- |
2 | browser/base/content/browser.js | 21 +++++++++++++++++++++ | ||
3 | 1 file changed, 21 insertions(+) | ||
4 | |||
5 | Index: mozilla/browser/base/content/browser.js | ||
6 | =================================================================== | ||
7 | --- mozilla.orig/browser/base/content/browser.js | ||
8 | +++ mozilla/browser/base/content/browser.js | ||
9 | @@ -5780,22 +5780,30 @@ | ||
10 | } | ||
11 | |||
12 | missingPluginInstaller.prototype.installSinglePlugin = function(aEvent){ | ||
13 | var missingPluginsArray = {}; | ||
14 | |||
15 | var pluginInfo = getPluginInfo(aEvent.target); | ||
16 | missingPluginsArray[pluginInfo.mimetype] = pluginInfo; | ||
17 | |||
18 | + gBrowser.selectedBrowser.addEventListener("NewPluginInstalled", | ||
19 | + gMissingPluginInstaller.refreshBrowser, | ||
20 | + false); | ||
21 | + | ||
22 | if (missingPluginsArray) { | ||
23 | window.openDialog("chrome://mozapps/content/plugins/pluginInstallerWizard.xul", | ||
24 | "PFSWindow", "chrome,centerscreen,resizable=yes", | ||
25 | {plugins: missingPluginsArray, browser: gBrowser.selectedBrowser}); | ||
26 | } | ||
27 | |||
28 | + gBrowser.selectedBrowser.removeEventListener("NewPluginInstalled", | ||
29 | + gMissingPluginInstaller.refreshBrowser, | ||
30 | + false); | ||
31 | + | ||
32 | aEvent.stopPropagation(); | ||
33 | } | ||
34 | |||
35 | missingPluginInstaller.prototype.managePlugins = function(aEvent){ | ||
36 | BrowserOpenAddonsMgr("plugins"); | ||
37 | aEvent.stopPropagation(); | ||
38 | } | ||
39 | |||
40 | @@ -5897,37 +5905,50 @@ | ||
41 | |||
42 | // clear the plugin list, now that at least one plugin has been installed | ||
43 | browser.missingPlugins = null; | ||
44 | if (notification) { | ||
45 | // reset UI | ||
46 | notificationBox.removeNotification(notification); | ||
47 | } | ||
48 | // reload the browser to make the new plugin show. | ||
49 | + | ||
50 | + // reload plugins | ||
51 | + var pm = Components.classes["@mozilla.org/plugin/manager;1"] | ||
52 | + .getService(Components.interfaces.nsIPluginManager); | ||
53 | + pm.reloadPlugins(false); | ||
54 | + | ||
55 | + // ... and reload the browser to activate new plugins available | ||
56 | browser.reload(); | ||
57 | } | ||
58 | |||
59 | function blocklistInfo() | ||
60 | { | ||
61 | var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"] | ||
62 | .getService(Components.interfaces.nsIURLFormatter); | ||
63 | var url = formatter.formatURLPref("extensions.blocklist.detailsURL"); | ||
64 | gBrowser.loadOneTab(url, null, null, null, false, false); | ||
65 | return true; | ||
66 | } | ||
67 | |||
68 | function pluginsMissing() | ||
69 | { | ||
70 | // get the urls of missing plugins | ||
71 | var missingPluginsArray = gBrowser.selectedBrowser.missingPlugins; | ||
72 | + gBrowser.selectedBrowser.addEventListener("NewPluginInstalled", | ||
73 | + gMissingPluginInstaller.refreshBrowser, | ||
74 | + false); | ||
75 | if (missingPluginsArray) { | ||
76 | window.openDialog("chrome://mozapps/content/plugins/pluginInstallerWizard.xul", | ||
77 | "PFSWindow", "chrome,centerscreen,resizable=yes", | ||
78 | {plugins: missingPluginsArray, browser: gBrowser.selectedBrowser}); | ||
79 | } | ||
80 | + gBrowser.selectedBrowser.removeEventListener("NewPluginInstalled", | ||
81 | + gMissingPluginInstaller.refreshBrowser, | ||
82 | + false); | ||
83 | } | ||
84 | |||
85 | var gMissingPluginInstaller = new missingPluginInstaller(); | ||
86 | |||
87 | function convertFromUnicode(charset, str) | ||
88 | { | ||
89 | try { | ||
90 | var unicodeConverter = Components |