~ubuntu-branches/ubuntu/jaunty/firefox-3.5/jaunty-updates

« back to all changes in this revision

Viewing changes to debian/patches/bz460917_att350845_reload_new_plugins.patch

  • Committer: Bazaar Package Importer
  • Author(s): Fabien Tassin
  • Date: 2009-03-30 19:00:40 UTC
  • Revision ID: james.westby@ubuntu.com-20090330190040-bi1fyb3vw34x1030
Tags: 3.5~b4~hg20090330r24021+nobinonly-0ubuntu1
* New upstream snapshot, needed to initiate the firefox 3.1->3.5 transition (LP: #352995)
* Add libstartup-notification0-dev to build-deps as it now seems to be
  mandatory on lpia
  - update debian/control
* Fix the mozclient include to really use the local configuration
  - update debian/rules
* Update MOZCLIENT_GETDATE to make it use pushlog so it is not confused by merges with
  dates in the past
  - update debian/mozclient/firefox-3.5.conf

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
---
 
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