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 34024 b794f9853ab575e2a00724131a8b200d9c078855
parent 34023 5725e65df3d5e403d67a61a10bfe9cbe1f60debf
child 34025 0de1fa19a420bae6ef798fe784e52bda8e7e872e
push id389
push userclokep@gmail.com
push dateMon, 18 Mar 2019 19:01:53 +0000
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);
       });