Bug 1514729 - Show the toolbar in the Download Manager. r=IanN
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Tue, 18 Dec 2018 20:24:18 +0100
changeset 33170 b794f9853ab5
parent 33169 5725e65df3d5
child 33171 0de1fa19a420
push id2368
push userclokep@gmail.com
push dateMon, 28 Jan 2019 21:12:50 +0000
treeherdercomm-beta@56d23c07d815 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN
bugs1514729, 1514585
Bug 1514729 - Show the toolbar in the Download Manager. r=IanN Follow-up to Bug 1514585.
suite/components/nsSuiteGlue.js
--- a/suite/components/nsSuiteGlue.js
+++ b/suite/components/nsSuiteGlue.js
@@ -1237,18 +1237,24 @@ SuiteGlue.prototype = {
 
   // ------------------------------
   // public nsISuiteGlue members
   // ------------------------------
 
   showDownloadManager: function(newDownload)
   {
     if (!gDownloadManager) {
+      // Use an empty arguments string or the download manager window
+      // will miss the toolbar and other features.
+      var argString = Cc["@mozilla.org/supports-string;1"]
+                        .createInstance(Ci.nsISupportsString);
+      argString.data = "";
       gDownloadManager = Services.ww.openWindow(null, DOWNLOAD_MANAGER_URL,
-                                                null, "all,dialog=no", null);
+                                                null, "all,dialog=no",
+                                                argString);
       gDownloadManager.addEventListener("load", function() {
         gDownloadManager.addEventListener("unload", function() {
           gDownloadManager = null;
         });
         // Attach the taskbar progress meter to the download manager window.
         ChromeUtils.import("resource:///modules/DownloadsTaskbar.jsm", {})
                    .DownloadsTaskbar.attachIndicator(gDownloadManager);
       });