Bug 388517 - revised download manager UI for Firefox 3. Patch by Shawn Wilsher <me@shawnwilsher.com> and Asaf Romano <mano@mozilla.com>. r=mano, a=[wanted-firefox3]
authorsdwilsh@shawnwilsher.com
Sat, 11 Aug 2007 14:53:21 -0700
changeset 4532 d4f5ebf5c55fc69e9b2ac488be41272e07868b25
parent 4531 d341a090707c6c921b0cfa37254ed9f859132608
child 4533 a5051a935d76b7bcb71b130c5d0c5d4a9b7dbddd
push idunknown
push userunknown
push dateunknown
reviewersmano
bugs388517
milestone1.9a8pre
Bug 388517 - revised download manager UI for Firefox 3. Patch by Shawn Wilsher <me@shawnwilsher.com> and Asaf Romano <mano@mozilla.com>. r=mano, a=[wanted-firefox3]
toolkit/locales/en-US/chrome/mozapps/downloads/downloadProperties.dtd
toolkit/locales/en-US/chrome/mozapps/downloads/downloads.dtd
toolkit/locales/jar.mn
toolkit/mozapps/downloads/content/DownloadProgressListener.js
toolkit/mozapps/downloads/content/Makefile.in
toolkit/mozapps/downloads/content/download.xml
toolkit/mozapps/downloads/content/downloadProperties.js
toolkit/mozapps/downloads/content/downloadProperties.xul
toolkit/mozapps/downloads/content/downloads.css
toolkit/mozapps/downloads/content/downloads.js
toolkit/mozapps/downloads/content/downloads.xul
toolkit/mozapps/jar.mn
toolkit/themes/pinstripe/mozapps/downloads/background-gradient.gif
toolkit/themes/pinstripe/mozapps/downloads/background-stripe.gif
toolkit/themes/pinstripe/mozapps/downloads/buttons.png
toolkit/themes/pinstripe/mozapps/downloads/download-inprogress.png
toolkit/themes/pinstripe/mozapps/downloads/downloads.css
toolkit/themes/pinstripe/mozapps/downloads/downloads.xml
toolkit/themes/pinstripe/mozapps/downloads/progress-bar-paused.gif
toolkit/themes/pinstripe/mozapps/downloads/progress-bar.gif
toolkit/themes/pinstripe/mozapps/downloads/progress-remainder.gif
toolkit/themes/pinstripe/mozapps/jar.mn
toolkit/themes/winstripe/mozapps/downloads/buttons.png
toolkit/themes/winstripe/mozapps/downloads/downloadCleanup.png
toolkit/themes/winstripe/mozapps/downloads/downloadCleanupDisabled.png
toolkit/themes/winstripe/mozapps/downloads/downloadOptions.png
toolkit/themes/winstripe/mozapps/downloads/downloadSelected.png
toolkit/themes/winstripe/mozapps/downloads/downloads.css
toolkit/themes/winstripe/mozapps/downloads/downloads.xml
toolkit/themes/winstripe/mozapps/downloads/downloadsBG.png
toolkit/themes/winstripe/mozapps/downloads/viewFader.png
toolkit/themes/winstripe/mozapps/jar.mn
deleted file mode 100644
--- a/toolkit/locales/en-US/chrome/mozapps/downloads/downloadProperties.dtd
+++ /dev/null
@@ -1,7 +0,0 @@
-<!ENTITY dateStarted.label      "Started:">
-<!ENTITY dateEnded.label        "Finished:">
-<!ENTITY window.title           "Properties">
-<!ENTITY downloadedFrom.label   "From:">
-<!ENTITY path.label             "To:">
-<!ENTITY acceptButton.label     "Close">
-<!ENTITY cmd.close.commandKey   "w">
--- a/toolkit/locales/en-US/chrome/mozapps/downloads/downloads.dtd
+++ b/toolkit/locales/en-US/chrome/mozapps/downloads/downloads.dtd
@@ -1,14 +1,13 @@
 <!ENTITY window.width                     "400">
 <!ENTITY window.height                    "300"> 
 
 <!ENTITY done.label                       "Done">
 <!ENTITY canceled.label                   "Canceled">
-<!ENTITY installing.label                 "Installing...">
 
 <!ENTITY starting.label                   "Starting...">
 <!ENTITY failed.label                     "Failed">
 
 <!ENTITY downloads.title                  "Downloads">
 
 <!ENTITY cmd.pause.label                  "Pause">
 <!ENTITY cmd.pause.accesskey              "P">
@@ -23,24 +22,27 @@
 <!ENTITY cmd.open.label                   "Open">
 <!ENTITY cmd.open.accesskey               "O">
 <!ENTITY cmd.openWith.label               "Open With...">
 <!ENTITY cmd.openWith.accesskey           "h">
 <!ENTITY cmd.retry.label                  "Retry">
 <!ENTITY cmd.retry.accesskey              "R">
 <!ENTITY cmd.remove.label                 "Remove">
 <!ENTITY cmd.remove.accesskey             "e">
-<!ENTITY cmd.properties.label             "Properties">
-<!ENTITY cmd.properties.accesskey         "i">
+<!ENTITY cmd.info.label                   "Information">
+<!ENTITY cmd.info.accesskey               "i">
 <!ENTITY cmd.info.commandKey              "i">
 
 <!ENTITY cmd.close.commandKey             "w">
 <!ENTITY cmd.close2.commandKey            "j">
 <!ENTITY cmd.close2Unix.commandKey        "y">
 <!ENTITY cmd.cleanUp.label                "Clean Up">
 <!ENTITY cmd.cleanUp.tooltip              "Removes completed, canceled, and failed downloads from the list">
 <!ENTITY cmd.cleanUp.accesskey            "C">
 
 <!ENTITY closeWhenDone.label              "Close when downloads complete">
 <!ENTITY closeWhenDone.tooltip            "Closes the Downloads window when all files are done downloading">
 
-<!ENTITY filesSavedTo.label               "All files downloaded to:">
 <!ENTITY showFolder.label                 "Show this Folder">
+
+<!ENTITY activeDownloads.label            "Active">
+<!ENTITY completedDownloads.label         "Completed">
+<!ENTITY searchResults.label              "Search Results">
--- a/toolkit/locales/jar.mn
+++ b/toolkit/locales/jar.mn
@@ -65,17 +65,16 @@
   locale/@AB_CD@/global-platform/mac/intl.properties          (%chrome/global-platform/mac/intl.properties)
   locale/@AB_CD@/global-platform/unix/intl.properties         (%chrome/global-platform/unix/intl.properties)
   locale/@AB_CD@/global-platform/win/intl.properties          (%chrome/global-platform/win/intl.properties)
 % locale mozapps @AB_CD@ %locale/@AB_CD@/mozapps/
 * locale/@AB_CD@/mozapps/downloads/unknownContentType.properties  (%chrome/mozapps/downloads/unknownContentType.properties)
 * locale/@AB_CD@/mozapps/downloads/unknownContentType.dtd         (%chrome/mozapps/downloads/unknownContentType.dtd)
   locale/@AB_CD@/mozapps/downloads/downloads.dtd                  (%chrome/mozapps/downloads/downloads.dtd)
   locale/@AB_CD@/mozapps/downloads/downloads.properties           (%chrome/mozapps/downloads/downloads.properties)
-  locale/@AB_CD@/mozapps/downloads/downloadProperties.dtd         (%chrome/mozapps/downloads/downloadProperties.dtd)
   locale/@AB_CD@/mozapps/extensions/extensions.dtd                (%chrome/mozapps/extensions/extensions.dtd)
   locale/@AB_CD@/mozapps/extensions/extensions.properties         (%chrome/mozapps/extensions/extensions.properties)
   locale/@AB_CD@/mozapps/extensions/about.dtd                     (%chrome/mozapps/extensions/about.dtd)
   locale/@AB_CD@/mozapps/extensions/update.dtd                    (%chrome/mozapps/extensions/update.dtd)
   locale/@AB_CD@/mozapps/extensions/update.properties             (%chrome/mozapps/extensions/update.properties)
   locale/@AB_CD@/mozapps/plugins/plugins.dtd                      (%chrome/mozapps/plugins/plugins.dtd)
   locale/@AB_CD@/mozapps/plugins/plugins.properties               (%chrome/mozapps/plugins/plugins.properties)
   locale/@AB_CD@/mozapps/preferences/ocsp.dtd                     (%chrome/mozapps/preferences/ocsp.dtd)
--- a/toolkit/mozapps/downloads/content/DownloadProgressListener.js
+++ b/toolkit/mozapps/downloads/content/DownloadProgressListener.js
@@ -17,106 +17,139 @@
 # The Initial Developer of the Original Code is
 # Doron Rosenberg.
 # Portions created by the Initial Developer are Copyright (C) 2001
 # the Initial Developer. All Rights Reserved.
 # 
 # Contributor(s):
 #   Blake Ross <blakeross@telocity.com> (Original Author) 
 #   Ben Goodger <ben@bengoodger.com> (v2.0) 
+#   Edward Lee <edilee@gmail.com>
+#   Shawn Wilsher <me@shawnwilsher.com> (v3.0)
 # 
 # Alternatively, the contents of this file may be used under the terms of
 # either the GNU General Public License Version 2 or later (the "GPL"), or
 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 # in which case the provisions of the GPL or the LGPL are applicable instead
 # of those above. If you wish to allow use of your version of this file only
 # under the terms of either the GPL or the LGPL, and not to allow others to
 # use your version of this file under the terms of the MPL, indicate your
 # decision by deleting the provisions above and replace them with the notice
 # and other provisions required by the GPL or the LGPL. If you do not delete
 # the provisions above, a recipient may use your version of this file under
 # the terms of any one of the MPL, the GPL or the LGPL.
 # 
 # ***** END LICENSE BLOCK *****
 
-var gStrings = [];
-const interval = 500; // Update every 500 milliseconds.
-
-function DownloadProgressListener (aDocument, aStringBundle) 
+function DownloadProgressListener() 
 {
-  this.doc = aDocument;
-
-  this._statusFormat = aStringBundle.getString("statusFormat2");
-  this._transferSameUnits = aStringBundle.getString("transferSameUnits");
-  this._transferDiffUnits = aStringBundle.getString("transferDiffUnits");
-  this._transferNoTotal = aStringBundle.getString("transferNoTotal");
-  this._timeLeft = aStringBundle.getString("timeLeft");
-  this._timeLessMinute = aStringBundle.getString("timeLessMinute");
-  this._timeUnknown = aStringBundle.getString("timeUnknown");
-  this._units = [aStringBundle.getString("bytes"),
-                 aStringBundle.getString("kilobyte"),
-                 aStringBundle.getString("megabyte"),
-                 aStringBundle.getString("gigabyte")];
+  var sb = document.getElementById("downloadStrings");
+  this._statusFormat = sb.getString("statusFormat2");
+  this._transferSameUnits = sb.getString("transferSameUnits");
+  this._transferDiffUnits = sb.getString("transferDiffUnits");
+  this._transferNoTotal = sb.getString("transferNoTotal");
+  this._timeLeft = sb.getString("timeLeft");
+  this._timeLessMinute = sb.getString("timeLessMinute");
+  this._timeUnknown = sb.getString("timeUnknown");
+  this._units = [sb.getString("bytes"),
+                 sb.getString("kilobyte"),
+                 sb.getString("megabyte"),
+                 sb.getString("gigabyte")];
 }
 
 DownloadProgressListener.prototype = 
 {
-  doc: null,
-
   onDownloadStateChange: function dlPL_onDownloadStateChange(aState, aDownload)
   {
-    var downloadID = "dl" + aDownload.id;
-    var download = this.doc.getElementById(downloadID);
-    if (download)
-      download.setAttribute("state", aDownload.state);
+    var dl = getDownload(aDownload.id);
+    switch (aDownload.state) {
+      case Ci.nsIDownloadManager.DOWNLOAD_NOTSTARTED:
+        // We'll have at least one active download now
+        gDownloadsActiveLabel.hidden = false;
+      case Ci.nsIDownloadManager.DOWNLOAD_DOWNLOADING:
+        // if dl is non-null, the download is already added to the UI, so we
+        // just make sure it is where it is supposed to be
+        if (!dl) {
+          // We have to create the download object
+          let uri = Cc["@mozilla.org/network/util;1"].
+                    getService(Ci.nsIIOService).
+                    newFileURI(aDownload.targetFile);
+          dl = createDownloadItem(aDownload.id,
+                                  uri.spec,
+                                  aDownload.displayName,
+                                  aDownload.source.spec,
+                                  aDownload.state,
+                                  "",
+                                  aDownload.percentComplete,
+                                  Math.round(aDownload.startTime / 1000));
+        }
+        gDownloadsView.insertBefore(dl, gDownloadsActiveLabel.nextSibling);
+        break;
+      case Ci.nsIDownloadManager.DOWNLOAD_FAILED:
+      case Ci.nsIDownloadManager.DOWNLOAD_CANCELED:
+        downloadCompleted(aDownload);
+        break;
+      case Ci.nsIDownloadManager.DOWNLOAD_FINISHED:
+        downloadCompleted(aDownload);
+
+        autoRemoveAndClose(aDownload);
+        break;
+    }
+
+    // autoRemoveAndClose could have already closed our window...
+    try {
+      dl.setAttribute("state", aDownload.state);
+      gDownloadViewController.onCommandUpdate();
+    } catch (e) { }
   },
 
   onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus, aDownload)
   {
     if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP) {
-      var downloadID = "dl" + aDownload.id;
-      var download = this.doc.getElementById(downloadID);
-      if (download)
-        download.setAttribute("status", "");
+      let dl = getDownload(aDownload.id);
+      if (dl)
+        dl.setAttribute("status", "");
     }
   },
 
   onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress,
                               aCurTotalProgress, aMaxTotalProgress, aDownload)
   {
-    var overallProgress = aCurTotalProgress;
-
-    var downloadID = "dl" + aDownload.id;
-    var download = this.doc.getElementById(downloadID);
-
-    // Calculate percentage.
-    var percent;
-    if (aMaxTotalProgress > 0) {
-      percent = Math.floor((overallProgress*100.0)/aMaxTotalProgress);
-      if (percent > 100)
-        percent = 100;
-
-      // Advance progress meter.
-      if (download) {
-        download.setAttribute("progress", percent);
-
-        download.setAttribute("progressmode", "normal");
-        
-        onUpdateProgress();
-      }
-    } else {
-      percent = -1;
-
-      // Progress meter should be barber-pole in this case.
-      download.setAttribute("progressmode", "undetermined");
+    var download = getDownload(aDownload.id);
+    if (!download) {
+      // d'oh - why this happens is complicated, let's just add it in
+      let uri = Cc["@mozilla.org/network/util;1"].
+                getService(Ci.nsIIOService).newFileURI(aDownload.targetFile);
+      let itm = createDownloadItem(aDownload.id, uri.spec,
+                                   aDownload.displayName,
+                                   aDownload.source.spec,
+                                   aDownload.state,
+                                   aDownload.percentComplete);
+      download = gDownloadsView.insertBefore(itm, gDownloadsActiveLabel.nextSibling);
     }
 
-    // Now that we've set the progress and the time, update the UI with 
-    // all the the pertinent information (bytes transferred, bytes total,
-    // download rate, time remaining). 
+    // any activity means we should have active downloads!
+    gDownloadsActiveLabel.hidden = false;
+
+    // Update this download's progressmeter
+    if (aDownload.percentComplete == -1)
+      download.setAttribute("progressmode", "undetermined");
+    else {
+      download.setAttribute("progressmode", "normal");
+      download.setAttribute("progress", aDownload.percentComplete);
+    }
+
+    // Dispatch ValueChange for a11y
+    var event = document.createEvent("Events");
+    event.initEvent("ValueChange", true, true);
+    document.getAnonymousElementByAttribute(download, "anonid", "progressmeter")
+            .dispatchEvent(event);
+
+    // Update the rest of the UI (bytes transferred, bytes total, download rate,
+    // time remaining). 
     let status = this._statusFormat;
 
     // Update the bytes transferred and bytes total
     let ([progress, progressUnits] = this._convertByteUnits(aCurTotalProgress),
          [total, totalUnits] = this._convertByteUnits(aMaxTotalProgress),
          transfer) {
       if (total <= 0)
         transfer = this._transferNoTotal;
@@ -128,18 +161,17 @@ DownloadProgressListener.prototype =
       transfer = this._replaceInsert(transfer, 1, progress);
       transfer = this._replaceInsert(transfer, 2, progressUnits);
       transfer = this._replaceInsert(transfer, 3, total);
       transfer = this._replaceInsert(transfer, 4, totalUnits);
 
       // Insert 1 is the download progress
       status = this._replaceInsert(status, 1, transfer);
 
-      if (download)
-        download.setAttribute("status-internal", transfer);
+      download.setAttribute("status-internal", transfer);
     }
 
     // Update the download rate
     let ([rate, unit] = this._convertByteUnits(aDownload.speed)) {
       // Insert 2 is the download rate
       status = this._replaceInsert(status, 2, rate);
       // Insert 3 is the |unit|/sec
       status = this._replaceInsert(status, 3, unit);
@@ -157,35 +189,34 @@ DownloadProgressListener.prototype =
       } else {
         remain = this._timeUnknown;
       }
 
       // Insert 4 is the time remaining
       status = this._replaceInsert(status, 4, remain);
     }
     
-    if (download)
-      download.setAttribute("status", status);
+    download.setAttribute("status", status);
   },
   onLocationChange: function(aWebProgress, aRequest, aLocation, aDownload)
   {
   },
   onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage, aDownload)
   {
   },
   onSecurityChange: function(aWebProgress, aRequest, state, aDownload)
   {
   },
   QueryInterface : function(iid)
   {
     if (iid.equals(Components.interfaces.nsIDownloadProgressListener) ||
         iid.equals(Components.interfaces.nsISupports))
-    return this;
+      return this;
 
-    throw Components.results.NS_NOINTERFACE;
+    throw Cr.NS_NOINTERFACE;
   },
 
   _replaceInsert: function ( text, index, value ) 
   {
     var result = text;
     var regExp = new RegExp( "#"+index );
     result = result.replace( regExp, value );
     return result;
deleted file mode 100644
--- a/toolkit/mozapps/downloads/content/Makefile.in
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1998
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH   = ../../../..
-topsrcdir = @top_srcdir@
-srcdir    = @srcdir@
-VPATH   = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-include $(topsrcdir)/config/rules.mk
-
--- a/toolkit/mozapps/downloads/content/download.xml
+++ b/toolkit/mozapps/downloads/content/download.xml
@@ -19,16 +19,17 @@
 # The Initial Developer of the Original Code is
 # Blake Ross.
 # Portions created by the Initial Developer are Copyright (C) 2001
 # the Initial Developer. All Rights Reserved.
 # 
 # Contributor(s):
 #   Ben Goodger <ben@bengoodger.com> (v2.0) 
 #   Blake Ross <blakeross@telocity.com>
+#   Shawn Wilsher <me@shawnwilsher.com> (v3.0)
 # 
 # Alternatively, the contents of this file may be used under the terms of
 # either the GNU General Public License Version 2 or later (the "GPL"), or
 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 # in which case the provisions of the GPL or the LGPL are applicable instead
 # of those above. If you wish to allow use of your version of this file only
 # under the terms of either the GPL or the LGPL, and not to allow others to
 # use your version of this file under the terms of the MPL, indicate your
@@ -52,35 +53,23 @@
 <!DOCTYPE bindings [
   <!ENTITY % downloadDTD SYSTEM "chrome://mozapps/locale/downloads/downloads.dtd" >
   %downloadDTD;
 ]>
 
 <bindings id="downloadBindings"
           xmlns="http://www.mozilla.org/xbl"
           xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-          xmlns:xbl="http://www.mozilla.org/xbl"
-          xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+          xmlns:xbl="http://www.mozilla.org/xbl">
 
   <binding id="download-base" extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
     <resources>
       <stylesheet src="chrome://mozapps/skin/downloads/downloads.css"/>
     </resources>
     <implementation>
-      <method name="fireEvent">
-        <parameter name="aEventType"/>
-        <body>
-        <![CDATA[
-          var e = document.createEvent("Events");
-          e.initEvent("download-" + aEventType, true, true);
-          
-          this.dispatchEvent(e);
-        ]]>
-        </body>
-      </method>
       <property name="paused">
         <getter>
         <![CDATA[
           return parseInt(this.getAttribute("state")) == Components.interfaces.nsIDownloadManager.DOWNLOAD_PAUSED;
         ]]>
         </getter>
       </property>
       <property name="openable">
@@ -116,371 +105,178 @@
         <getter>
         <![CDATA[
           var state = parseInt(this.getAttribute("state"));
           var dl = Components.interfaces.nsIDownloadManager;
           return state == dl.DOWNLOAD_CANCELED || state == dl.DOWNLOAD_FAILED;
         ]]>
         </getter>
       </property>
-      
-      <method name="pauseResume">
-        <body>
-        <![CDATA[
-          // Do nothing.
-        ]]>
-        </body>
-      </method>
     </implementation>
   </binding>
   
   <binding id="download-starting" extends="chrome://mozapps/content/downloads/download.xml#download-base">
     <content>
       <xul:hbox flex="1">
 #ifdef SHOW_ICONS
         <xul:vbox pack="start">
-          <xul:image class="downloadTypeIcon" validate="always" style="width: 32px; max-width: 32px; height: 32px; max-height: 32px;" xbl:inherits="src=image"/>
+          <xul:image class="downloadTypeIcon" validate="always" 
+                     xbl:inherits="src=image"/>
         </xul:vbox>
 #endif
         <xul:vbox pack="start" flex="1">
-          <xul:label xbl:inherits="value=target" crop="center"/>
-          <xul:label value="&starting.label;"/>
+          <xul:label xbl:inherits="value=target,tooltiptext=target"
+                     crop="center" class="name"/>
+          <xul:progressmeter mode="normal" value="0" flex="1"
+                             anonid="progressmeter"/>
+          <xul:label value="&starting.label;" class="status"/>
+          <xul:spacer flex="1"/>
         </xul:vbox>
-        <xul:vbox pack="start">
-          <xul:label value="&cmd.cancel.label;" class="text-link" 
-                     onclick="this.parentNode.parentNode.parentNode.fireEvent('cancel');"/>
+        <xul:vbox pack="center">
+          <xul:button class="cancel" tooltiptext="&cmd.cancel.label;"
+                      command="cmd_cancel"/>
         </xul:vbox>
       </xul:hbox>
     </content>  
   </binding>
   
   <binding id="download-downloading" extends="chrome://mozapps/content/downloads/download.xml#download-base">
     <content>
-      <xul:hbox flex="1" class="downloadContentBox" xbl:inherits="animated,animated-temp">
+      <xul:hbox flex="1" class="downloadContentBox">
 #ifdef SHOW_ICONS
         <xul:vbox pack="start">
-          <xul:image class="downloadTypeIcon" validate="always" style="width: 32px; max-width: 32px; height: 32px; max-height: 32px;" xbl:inherits="src=image"/>
+          <xul:image class="downloadTypeIcon" validate="always" 
+                     xbl:inherits="src=image"/>
         </xul:vbox>
 #endif
         <xul:vbox flex="1">
-          <xul:hbox flex="1">
+          <xul:label xbl:inherits="value=target,tooltiptext=target"
+                       crop="center" flex="2" class="name"/>
+          <xul:hbox>
             <xul:vbox flex="1">
-              <xul:label xbl:inherits="value=target" crop="center"/>
-              <xul:progressmeter anonid="progressmeter" mode="normal" value="0" flex="1"
-                                xbl:inherits="value=progress,mode=progressmode"/>
+              <xul:progressmeter mode="normal" value="0" flex="1"
+                                 anonid="progressmeter"
+                                 xbl:inherits="value=progress,mode=progressmode"/>
             </xul:vbox>
-            <xul:vbox pack="start">
-              <xul:label value="&cmd.cancel.label;" class="text-link"
-                        onclick="this.parentNode.parentNode.parentNode.parentNode.parentNode.fireEvent('cancel');"/>          
-            </xul:vbox>
-          </xul:hbox>                              
-          <xul:hbox align="center">
-            <xul:label value="&cmd.pause.label;" class="text-link"
-                       onclick="this.parentNode.parentNode.parentNode.parentNode.fireEvent('pause');"/>
-            <xul:label xbl:inherits="value=status" flex="1" crop="right"/>
-          </xul:hbox>                            
+            <xul:button class="pause" tooltiptext="&cmd.pause.label;"
+                        command="cmd_pause"/>
+            <xul:button class="cancel" tooltiptext="&cmd.cancel.label;"
+                        command="cmd_cancel"/>
+          </xul:hbox>
+          <xul:label xbl:inherits="value=status,tooltiptext=status" flex="1"
+                     crop="right" class="status"/>
+          <xul:spacer flex="1"/>
         </xul:vbox>
       </xul:hbox>
     </content>
-    <implementation>
-    
-      <!-- ANIMATE: Type Icon -->    
-      <property name="_ati_kTimeout" onget="return 50;"/>
-      <property name="_ati_kUpperBounds" onget="return 90;"/>
-      <property name="_ati_kLowerBounds" onget="return 30;"/>
-      <property name="_ati_kIncrement" onget="return 5;"/>
-      <field name="_atiStep">0</field>
-      <field name="_atiIsIncrementing">true</field>
-      <field name="_atiInterval">-1</field>
-      
-      <method name="_atiTimerCallback">
-        <parameter name="aDownload"/>
-        <parameter name="aIcon"/>
-        <body>
-        <![CDATA[
-          if (aDownload.getAttribute("state") != "0") {
-            clearInterval(aDownload._atiInterval)
-            return;
-          }
-            
-          if (aDownload._atiIsIncrementing)
-            aDownload._atiStep += aDownload._ati_kIncrement;
-          else
-            aDownload._atiStep -= aDownload._ati_kIncrement;
-
-          if (aDownload._atiStep == aDownload._ati_kUpperBounds) 
-            aDownload._atiIsIncrementing = false;
-          else if (aDownload._atiStep  == aDownload._ati_kLowerBounds)
-            aDownload._atiIsIncrementing = true;
-
-          aIcon.setAttribute("style", "opacity: 0." + aDownload._atiStep );
-        ]]>
-        </body>
-      </method>
-      <method name="_animateIcon">
-        <body>
-        <![CDATA[
-          this._atiStep = this._ati_kLowerBounds;
-          this._atiIsIncrementing = true;
-
-          var icon = document.getAnonymousElementByAttribute(this, "class", "downloadTypeIcon");
-          this._atiInterval = setInterval(this._atiTimerCallback, this._ati_kTimeout, this, icon);
-        ]]>
-        </body>
-      </method>
-      
-      <!-- ANIMATE: Download -->
-      <property name="_adl_kTimeout" onget="return 50;"/>
-      <property name="_adl_kUpperBounds" onget="return 1.00;"/>
-      <property name="_adl_kLowerBounds" onget="return 0.00;"/>
-      <property name="_adl_kIncrement" onget="return 0.05;"/>
-      <field name="_adlStep">0</field>
-      
-      <method name="_adlTimerCallback">
-        <parameter name="aDownload"/>
-        <parameter name="aContent"/>
-        <body>
-        <![CDATA[
-          if (aDownload.getAttribute("state") != "0" || 
-              aDownload._adlStep > aDownload._adl_kUpperBounds) {
-            aDownload.fireEvent('animated');
-            return;
-          }
-
-          // Don't even bother if we're going away. 
-          if (!aContent.ownerDocument)
-            return;
-            
-          aDownload._adlStep += aDownload._adl_kIncrement;
-          aContent.setAttribute("style", "opacity: " + aDownload._adlStep + "!important;");
-          
-          setTimeout(aDownload._adlTimerCallback, aDownload._adl_kTimeout, aDownload, aContent);
-        ]]>
-        </body>
-      </method>
-      <method name="_animateDownload">
-        <body>
-        <![CDATA[
-          this._adlStep = this._adl_kLowerBounds;
-
-          var box = document.getAnonymousElementByAttribute(this, "class", "downloadContentBox");
-          setTimeout(this._adlTimerCallback, this._adl_kTimeout, this, box);
-        ]]>
-        </body>
-      </method>
-      
-      <method name="_shouldDownloadAnimate">
-        <body>
-        <![CDATA[
-          return this.getAttribute("animated") != "true";
-        ]]>
-        </body>
-      </method>
-      
-      <method name="pauseResume">
-        <body>
-        <![CDATA[
-          this.fireEvent("pause");
-        ]]>
-        </body>
-      </method>
-      
-      <constructor>
-      <![CDATA[
-        // this._animateIcon();
-        if (this._shouldDownloadAnimate())
-          this._animateDownload();
-      ]]>
-      </constructor>
-    </implementation>
   </binding>
   
   <binding id="download-paused" extends="chrome://mozapps/content/downloads/download.xml#download-base">
     <content>
       <xul:hbox flex="1">
 #ifdef SHOW_ICONS
         <xul:vbox pack="start">
-          <xul:image class="downloadTypeIcon" validate="always" style="width: 32px; max-width: 32px; height: 32px; max-height: 32px;" xbl:inherits="src=image"/>
+          <xul:image class="downloadTypeIcon" validate="always"
+                     xbl:inherits="src=image"/>
         </xul:vbox>
 #endif
         <xul:vbox flex="1">
-          <xul:hbox flex="1">
+          <xul:label xbl:inherits="value=target,tooltiptext=target"
+                     crop="center" flex="2" class="name"/>
+          <xul:hbox>
             <xul:vbox flex="1">
-              <xul:label xbl:inherits="value=target" crop="center"/>
-              <xul:progressmeter anonid="progressmeter" mode="normal" value="0" flex="1"
-                                xbl:inherits="value=progress,mode=progressmode"/>
+              <xul:progressmeter mode="normal" value="0" flex="1"
+                                 anonid="progressmeter"
+                                 xbl:inherits="value=progress,mode=progressmode"/>
             </xul:vbox>
-            <xul:vbox pack="start">
-              <xul:label value="&cmd.cancel.label;" class="text-link"
-                         onclick="this.parentNode.parentNode.parentNode.parentNode.parentNode.fireEvent('cancel');"/>
-            </xul:vbox>
-          </xul:hbox>                              
-          <xul:hbox align="center">
-            <xul:label value="&cmd.resume.label;" class="text-link"
-                       onclick="this.parentNode.parentNode.parentNode.parentNode.fireEvent('resume');"/>
-            <xul:label xbl:inherits="value=status" flex="1" crop="right"/>
-          </xul:hbox>                            
+            <xul:button class="resume" tooltiptext="&cmd.resume.label;"
+                        command="cmd_resume"/>
+            <xul:button class="cancel" tooltiptext="&cmd.cancel.label;"
+                        command="cmd_cancel"/>
+          </xul:hbox>
+          <xul:label xbl:inherits="value=target,tooltiptext=target" flex="1"
+                     crop="right" class="status"/>
+          <xul:spacer flex="1"/>
         </xul:vbox>
       </xul:hbox>
     </content>
-    <implementation>
-      <method name="pauseResume">
-        <body>
-        <![CDATA[
-          this.fireEvent("resume");
-        ]]>
-        </body>
-      </method>
-    </implementation>
   </binding>
   
   <binding id="download-done" extends="chrome://mozapps/content/downloads/download.xml#download-base">
     <content>
       <xul:hbox flex="1">
 #ifdef SHOW_ICONS
         <xul:vbox pack="start">
-          <xul:image class="downloadTypeIcon" validate="always" style="width: 32px; max-width: 32px; height: 32px; max-height: 32px;" xbl:inherits="src=image"/>
+          <xul:image class="downloadTypeIcon" validate="always" 
+                     xbl:inherits="src=image"/>
         </xul:vbox>
 #endif
         <xul:vbox pack="start" flex="1">
-          <xul:label xbl:inherits="value=target" crop="center"/>
-          <xul:label value="&done.label;"/>
+          <xul:label xbl:inherits="value=target,tooltiptext=target"
+                     crop="center" class="name"/>
+          <xul:spacer flex="1"/>
+          <xul:label value="&done.label;" class="status"/>
         </xul:vbox>
-        <xul:vbox pack="start">
-          <xul:label value="&cmd.open.label;" class="text-link" 
-                     onclick="this.parentNode.parentNode.parentNode.fireEvent('open');"/>
-          <xul:label value="&cmd.remove.label;" class="text-link" 
-                     onclick="this.parentNode.parentNode.parentNode.fireEvent('remove');"/>
+        <xul:vbox pack="center">
+          <xul:hbox>
+            <xul:button class="open" tooltiptext="&cmd.open.label;"
+                        command="cmd_open"/>
+            <xul:button class="info" tooltiptext="&cmd.info.label;"
+                        command="cmd_showInfo" anonid="info"/>
+          </xul:hbox>
         </xul:vbox>
       </xul:hbox>
     </content>  
   </binding>
   
   <binding id="download-canceled" extends="chrome://mozapps/content/downloads/download.xml#download-base">
     <content>
       <xul:hbox flex="1">
 #ifdef SHOW_ICONS
         <xul:vbox pack="start"> 
-          <xul:image class="downloadTypeIcon" validate="always" style="width: 32px; max-width: 32px; height: 32px; max-height: 32px;" xbl:inherits="src=image"/>
+          <xul:image class="downloadTypeIcon" validate="always"
+                     xbl:inherits="src=image"/>
         </xul:vbox>
 #endif
         <xul:vbox pack="start" flex="1">
-          <xul:label xbl:inherits="value=target" crop="center"/>
-          <xul:label value="&canceled.label;"/>
+          <xul:label xbl:inherits="value=target,tooltiptext=target"
+                     crop="center" class="name"/>
+          <xul:spacer flex="1"/>
+          <xul:label value="&canceled.label;" class="status"/>
         </xul:vbox>
-        <xul:vbox pack="start">
-          <xul:label value="&cmd.retry.label;" class="text-link" 
-                     onclick="this.parentNode.parentNode.parentNode.fireEvent('retry');"/>
-          <xul:label value="&cmd.remove.label;" class="text-link" 
-                     onclick="this.parentNode.parentNode.parentNode.fireEvent('remove');"/>
+        <xul:vbox pack="center">
+          <xul:hbox>
+            <xul:button class="retry" tooltiptext="&cmd.retry.label;"
+                        command="cmd_retry"/>
+            <xul:button class="info" tooltiptext="&cmd.info.label;"
+                        command="cmd_showInfo" anonid="info"/>
+          </xul:hbox>
         </xul:vbox>
       </xul:hbox>
     </content>  
   </binding>
   
   <binding id="download-failed" extends="chrome://mozapps/content/downloads/download.xml#download-base">
     <content>
       <xul:hbox flex="1">
 #ifdef SHOW_ICONS
         <xul:vbox pack="start">
-          <xul:image class="downloadTypeIcon" validate="always" style="width: 32px; max-width: 32px; height: 32px; max-height: 32px;" xbl:inherits="src=image"/>
+          <xul:image class="downloadTypeIcon" validate="always"
+                     xbl:inherits="src=image"/>
         </xul:vbox>
 #endif
         <xul:vbox pack="start" flex="1">
-          <xul:label xbl:inherits="value=target" crop="center"/>
-          <xul:label value="&failed.label;"/>
+          <xul:label xbl:inherits="value=target,tooltiptext=target"
+                     crop="center" class="name"/>
+          <xul:spacer flex="1"/>
+          <xul:label value="&failed.label;" class="status"/>
         </xul:vbox>
         <xul:vbox pack="start">
-          <xul:label value="&cmd.retry.label;" class="text-link" 
-                     onclick="this.parentNode.parentNode.parentNode.fireEvent('retry');"/>
-          <xul:label value="&cmd.remove.label;" class="text-link" 
-                     onclick="this.parentNode.parentNode.parentNode.fireEvent('remove');"/>
+          <xul:button class="retry" tooltiptext="&cmd.retry.label;"
+                      command="cmd_retry"/>
+          <xul:button class="info" tooltiptext="&cmd.info.label;"
+                      command="cmd_showInfo" anonid="info"/>
         </xul:vbox>
       </xul:hbox>
     </content>  
   </binding>
   
-  <binding id="download-view">
-    <implementation>
-      <field name="_selected">null</field>
-      <property name="selected">
-        <setter>
-        <![CDATA[
-          if (this._selected)
-            this._selected.removeAttribute("selected");
-          this._selected = val;
-          if (this._selected)
-            this._selected.setAttribute("selected", "true");
-        ]]>
-        </setter>
-        <getter>
-        <![CDATA[
-          return this._selected;
-        ]]>
-        </getter>
-      </property>
-      
-      <method name="selectionForward">
-        <parameter name="aEvent"/>
-        <body>
-        <![CDATA[
-          if (this.selected) {
-            if (this.selected.nextSibling &&
-                this.selected.nextSibling.localName == "download")
-              this.selected = this.selected.nextSibling;
-          }
-          else {
-            if (this.hasChildNodes())
-              this.selected = this.firstChild.nextSibling;
-          }
-        ]]>
-        </body>
-      </method>
-
-      <method name="selectionBackward">
-        <parameter name="aEvent"/>
-        <body>
-        <![CDATA[
-          if (this.selected) {
-            if (this.selected.previousSibling && 
-                this.selected.previousSibling.localName == "download")
-              this.selected = this.selected.previousSibling;
-          }
-          else {
-            if (this.hasChildNodes())
-              this.selected = this.lastChild;
-          }
-        ]]>
-        </body>
-      </method>
-    </implementation>
-    <handlers>
-      <handler event="focus">
-      <![CDATA[
-        this.selected = event.target;
-      ]]>
-      </handler>
-      <handler event="click">
-      <![CDATA[
-        if (event.ctrlKey) {
-          this.selected = null;
-          return;
-        }
-        
-        this.selected = event.target;
-      ]]>
-      </handler>
-      <handler event="keypress" keycode="VK_ENTER" action="if (this.selected) this.selected.fireEvent('open');"/>
-      <handler event="keypress" keycode="VK_RETURN" action="if (this.selected) this.selected.fireEvent('open');"/>
-      <handler event="keypress" keycode="VK_UP" action="this.selectionBackward(event);"/>
-      <handler event="keypress" keycode="VK_LEFT" action="this.selectionBackward(event);"/>
-      <handler event="keypress" keycode="VK_DOWN" action="this.selectionForward(event);"/>
-      <handler event="keypress" keycode="VK_RIGHT" action="this.selectionForward(event);"/>
-      <handler event="keypress" keycode="VK_UP" modifiers="meta" action="this.selected = null;"/>
-      <handler event="keypress" keycode="VK_DOWN" modifiers="meta" action="this.selected = null;"/>
-      <handler event="keypress" keycode="VK_LEFT" modifiers="meta" action="this.selected = null;"/>
-      <handler event="keypress" keycode="VK_RIGHT" modifiers="meta" action="this.selected = null;"/>
-      <handler event="keypress" keycode="VK_DELETE" action="if (this.selected) this.selected.fireEvent('remove');"/>
-      <handler event="keypress" key=" " action="if (this.selected) { this.selected.pauseResume(); }"/>
-    </handlers>
-  </binding>
-  
 </bindings>
deleted file mode 100644
--- a/toolkit/mozapps/downloads/content/downloadProperties.js
+++ /dev/null
@@ -1,101 +0,0 @@
-# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla.org Code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2001
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#   Blake Ross <blakeross@telocity.com>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-function Startup()
-{
-  const dlmgrContractID = "@mozilla.org/download-manager;1";
-  const dlmgrIID = Components.interfaces.nsIDownloadManager;
-  var dm = Components.classes[dlmgrContractID].getService(dlmgrIID);
-  var db = dm.DBConnection;
-  
-  const dateTimeContractID = "@mozilla.org/intl/scriptabledateformat;1";
-  const dateTimeIID = Components.interfaces.nsIScriptableDateFormat;
-  var dts = Components.classes[dateTimeContractID].getService(dateTimeIID);  
-
-  var dateStartedField = document.getElementById("dateStarted");
-  var dateEndedField = document.getElementById("dateEnded");
-  var pathField = document.getElementById("path");
-  var sourceField = document.getElementById("source");
-
-  var dlid = window.arguments[0].replace(/^dl([0-9]+)$/, "$1");
-
-  var stmt = db.createStatement("SELECT startTime, endTime, target, source " +
-                                "FROM moz_downloads " +
-                                "WHERE id = ?1");
-  stmt.bindInt64Parameter(0, dlid);
-  stmt.executeStep();
-
-  var dateStarted = new Date(stmt.getInt64(0) / 1000);
-  dateStarted = dts.FormatDateTime("", dts.dateFormatShort,
-                                   dts.timeFormatSeconds,
-                                   dateStarted.getFullYear(),
-                                   dateStarted.getMonth() + 1,
-                                   dateStarted.getDate(),
-                                   dateStarted.getHours(),
-                                   dateStarted.getMinutes(),
-                                   dateStarted.getSeconds());
-  dateStartedField.setAttribute("value", dateStarted);
-  
-  var dateEnded = new Date(stmt.getInt64(1) / 1000);
-  dateEnded = dts.FormatDateTime("", dts.dateFormatShort,
-                                 dts.timeFormatSeconds,
-                                 dateEnded.getFullYear(),
-                                 dateEnded.getMonth() + 1,
-                                 dateEnded.getDate(),
-                                 dateEnded.getHours(),
-                                 dateEnded.getMinutes(),
-                                 dateEnded.getSeconds());
-  dateEndedField.setAttribute("value", dateEnded);
-  
-  pathField.value = stmt.getUTF8String(2);
-  sourceField.value = stmt.getUTF8String(3);
-  stmt.reset();
-
-  var dl = dm.getDownload(dlid);
-  if (dl.state == dlmgrIID.DOWNLOAD_DOWNLOADING ||
-      dl.state == dlmgrIID.DOWNLOAD_PAUSED ||
-      dl.state == dlmgrIID.DOWNLOAD_NOTSTARTED) {
-    document.getElementById("dateEndedRow").hidden = true;
-    document.getElementById("dateEndedSeparator").hidden = true;
-  }
-  
-  document.documentElement.getButton("accept").label = document.documentElement.getAttribute("acceptbuttontext");
-  
-  document.documentElement.getButton("accept").focus();
-}
-  
\ No newline at end of file
deleted file mode 100644
--- a/toolkit/mozapps/downloads/content/downloadProperties.xul
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0"?>
-
-# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla.org Code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2001
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#   Blake Ross <blakeross@telocity.com>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?> 
-<?xml-stylesheet href="chrome://mozapps/skin/downloads/downloads.css"?>
-
-<!DOCTYPE window [
-<!ENTITY % downloadPropertiesDTD SYSTEM "chrome://mozapps/locale/downloads/downloadProperties.dtd">
-%downloadPropertiesDTD;
-]>
-
-<dialog xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-        xmlns:nc="http://home.netscape.com/NC-rdf#"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        title="&window.title;"
-        onload="Startup();"
-        style="width: 30em;"
-        buttons="accept" acceptbuttontext="&acceptButton.label;">
-
-  <script type="application/javascript" src="chrome://mozapps/content/downloads/downloadProperties.js"/>
-
-  <keyset id="downloadInfoKeys">
-    <key id="key_close"   key="&cmd.close.commandKey;" oncommand="window.close()"     modifiers="accel"/>
-  </keyset>
-  
-  <grid flex="1">
-    <columns>
-      <column/>
-      <column flex="1"/>
-    </columns>
-    <rows>
-      <row align="center">
-        <hbox pack="end">
-          <label value="&downloadedFrom.label;" class="bold"/>
-        </hbox>
-        <textbox id="source" readonly="true"/>
-      </row>
-      <separator class="thin"/>
-      <row align="center">
-        <hbox pack="end">
-          <label value="&path.label;" class="bold"/>
-        </hbox>
-        <textbox id="path" readonly="true"/>
-      </row>
-      <separator class="thin"/>
-      <row align="center">
-        <hbox pack="end">
-          <label value="&dateStarted.label;" class="bold"/>          
-        </hbox>        
-        <label id="dateStarted"/>
-      </row>
-      <separator class="thin" id="dateEndedSeparator"/>
-      <row align="center" id="dateEndedRow">
-        <hbox pack="end">
-          <label value="&dateEnded.label;" class="bold"/>
-        </hbox>
-        <label id="dateEnded"/>
-      </row>
-    </rows>
-  </grid>
-  <separator/>
-</dialog>
-    
--- a/toolkit/mozapps/downloads/content/downloads.css
+++ b/toolkit/mozapps/downloads/content/downloads.css
@@ -1,29 +1,30 @@
-download {
+richlistitem[type="download"] {
   -moz-binding: url('chrome://mozapps/content/downloads/download.xml#download-starting');
   -moz-box-orient: vertical;
 }
 
-download[state="0"] {
+richlistitem[type="download"][state="0"] {
   -moz-binding: url('chrome://mozapps/content/downloads/download.xml#download-downloading');
 }
 
-download[state="1"] {
+richlistitem[type="download"][state="1"] {
   -moz-binding: url('chrome://mozapps/content/downloads/download.xml#download-done');
 }
 
-download[state="2"] {
+richlistitem[type="download"][state="2"] {
   -moz-binding: url('chrome://mozapps/content/downloads/download.xml#download-failed');
 }
 
-download[state="3"] {
+richlistitem[type="download"][state="3"] {
   -moz-binding: url('chrome://mozapps/content/downloads/download.xml#download-canceled');
 }
 
-download[state="4"] {
+richlistitem[type="download"][state="4"] {
   -moz-binding: url('chrome://mozapps/content/downloads/download.xml#download-paused');
 }
 
-/* Only focus links in the selected item*/
-download:not([selected="true"]) .text-link {
+/* Only focus buttons in the selected item*/
+richlistitem[type="download"]:not([selected="true"]) button {
   -moz-user-focus: none;
 }
+
--- a/toolkit/mozapps/downloads/content/downloads.js
+++ b/toolkit/mozapps/downloads/content/downloads.js
@@ -20,16 +20,17 @@
 # the Initial Developer. All Rights Reserved.
 #
 # Contributor(s):
 #   Blake Ross <blakeross@telocity.com> (Original Author)
 #   Ben Goodger <ben@bengoodger.com> (v2.0)
 #   Dan Mosedale <dmose@mozilla.org>
 #   Fredrik Holmqvist <thesuckiestemail@yahoo.se>
 #   Josh Aas <josh@mozilla.com>
+#   Shawn Wilsher <me@shawnwilsher.com> (v3.0)
 #
 # Alternatively, the contents of this file may be used under the terms of
 # either the GNU General Public License Version 2 or later (the "GPL"), or
 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 # in which case the provisions of the GPL or the LGPL are applicable instead
 # of those above. If you wish to allow use of your version of this file only
 # under the terms of either the GPL or the LGPL, and not to allow others to
 # use your version of this file under the terms of the MPL, indicate your
@@ -38,535 +39,364 @@
 # the provisions above, a recipient may use your version of this file under
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 ///////////////////////////////////////////////////////////////////////////////
 // Globals
 
-const kObserverServiceProgID = "@mozilla.org/observer-service;1";
-const kDlmgrContractID = "@mozilla.org/download-manager;1";
-const nsIDownloadManager = Components.interfaces.nsIDownloadManager;
 const PREF_BDM_CLOSEWHENDONE = "browser.download.manager.closeWhenDone";
 const PREF_BDM_ALERTONEXEOPEN = "browser.download.manager.alertOnEXEOpen";
 const PREF_BDM_RETENTION = "browser.download.manager.retention";
 
 const nsLocalFile = Components.Constructor("@mozilla.org/file/local;1",
                                            "nsILocalFile", "initWithPath");
 
+var Cc = Components.classes;
 var Ci = Components.interfaces;
 
-var gDownloadManager  = Components.classes[kDlmgrContractID]
-                                  .getService(nsIDownloadManager);
-var gDownloadListener = null;
-var gDownloadsView    = null;
-var gUserInterfered   = false;
-var gActiveDownloads  = [];
+var gDownloadManager  = Cc["@mozilla.org/download-manager;1"].
+                        getService(Ci.nsIDownloadManager);
+var gDownloadListener     = null;
+var gDownloadsView        = null;
+var gDownloadsActiveLabel = null;
+var gDownloadsOtherLabel  = null;
+var gDownloadInfoPopup    = null;
+var gUserInterfered       = false;
+var gSearching            = false;
 
 // If the user has interacted with the window in a significant way, we should
 // not auto-close the window. Tough UI decisions about what is "significant."
 var gUserInteracted = false;
 
 ///////////////////////////////////////////////////////////////////////////////
 // Utility Functions 
 function fireEventForElement(aElement, aEventType)
 {
   var e = document.createEvent("Events");
   e.initEvent("download-" + aEventType, true, true);
   
   aElement.dispatchEvent(e);
 }
 
 function createDownloadItem(aID, aFile, aTarget, aURI, aState,
-                            aAnimated, aStatus, aProgress)
+                            aStatus, aProgress, aStartTime)
 {
-  var dl = document.createElement("download");
+  var dl = document.createElement("richlistitem");
+  dl.setAttribute("type", "download");
   dl.setAttribute("id", "dl" + aID);
   dl.setAttribute("dlid", aID);
   dl.setAttribute("image", "moz-icon://" + aFile + "?size=32");
   dl.setAttribute("file", aFile);
   dl.setAttribute("target", aTarget);
   dl.setAttribute("uri", aURI);
   dl.setAttribute("state", aState);
-  dl.setAttribute("animated", aAnimated);
   dl.setAttribute("status", aStatus);
   dl.setAttribute("progress", aProgress);
+  dl.setAttribute("startTime", aStartTime);
+
+  var ioSvc = Cc["@mozilla.org/network/io-service;1"].
+              getService(Ci.nsIIOService);
+  var file = ioSvc.newURI(aFile, null, null).QueryInterface(Ci.nsIFileURL).file;
+  dl.setAttribute("path", file.nativePath || file.path);
+  
   return dl;
 }
 
 function getDownload(aID)
 {
   return document.getElementById("dl" + aID);
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 // Start/Stop Observers
 function downloadCompleted(aDownload) 
 {
   // Wrap this in try...catch since this can be called while shutting down... 
   // it doesn't really matter if it fails then since well.. we're shutting down
   // and there's no UI to update!
   try {
-    // getTypeFromFile fails if it can't find a type for this file. Handle this gracefully.
+    let dl = getDownload(aDownload.id);
+
+    // If we are displaying search results, we do not want to add it to the list
+    // of completed downloads
+    if (!gSearching)
+      gDownloadsView.insertBefore(dl, gDownloadsOtherLabel.nextSibling);
+    else
+      gDownloadsView.removeChild(dl);
+
+    // getTypeFromFile fails if it can't find a type for this file.
     try {
       // Refresh the icon, so that executable icons are shown.
-      var mimeService = Components.classes["@mozilla.org/uriloader/external-helper-app-service;1"].getService(Components.interfaces.nsIMIMEService);
+      const kExternalHelperAppServContractID =
+        "@mozilla.org/uriloader/external-helper-app-service;1";
+      var mimeService = Cc[kExternalHelperAppServContractID].
+                        getService(Ci.nsIMIMEService);
       var contentType = mimeService.getTypeFromFile(aDownload.targetFile);
 
       var listItem = getDownload(aDownload.id)
       var oldImage = listItem.getAttribute("image");
-      // I tack on the content-type here as a hack to bypass the cache which seems
-      // to be interfering despite the fact the image has 'validate="always"' set
-      // on it. 
+      // Tacking on contentType bypasses cache
       listItem.setAttribute("image", oldImage + "&contentType=" + contentType);
     } catch (e) { }
-    
-    var insertIndex = gDownloadManager.activeDownloadCount + 1;
-        
-    // Remove the download from our book-keeping list and if the count
-    // falls to zero, update the title here, since we won't be getting
-    // any more progress notifications in which to do it. 
-    for (var i = 0; i < gActiveDownloads.length; ++i) {
-      if (gActiveDownloads[i] == aDownload) {
-        gActiveDownloads.splice(i, 1);
-        break;
-      }
+
+    if (gDownloadManager.activeDownloadCount == 0) {
+      gDownloadsActiveLabel.hidden = true;
+      document.title = document.documentElement.getAttribute("statictitle");
     }
-
-    gDownloadViewController.onCommandUpdate();
-
-    if (gActiveDownloads.length == 0)
-      document.title = document.documentElement.getAttribute("statictitle");
   }
   catch (e) { }
 }
 
 function autoRemoveAndClose(aDownload)
 {
-  var pref = Components.classes["@mozilla.org/preferences-service;1"]
-                       .getService(Components.interfaces.nsIPrefBranch);
+  var pref = Cc["@mozilla.org/preferences-service;1"].
+             getService(Ci.nsIPrefBranch);
 
   if (aDownload && (pref.getIntPref(PREF_BDM_RETENTION) == 0)) {
     // The download manager backend removes this, but we have to update the UI!
     var dl = getDownload(aDownload.id);
-    dl.parentNode.removeChild(dl);
+    if (dl)
+      dl.parentNode.removeChild(dl);
   }
   
   if (gDownloadManager.activeDownloadCount == 0) {
     // For the moment, just use the simple heuristic that if this window was
-    // opened by the download process, rather than by the user, it should auto-close
-    // if the pref is set that way. If the user opened it themselves, it should
-    // not close until they explicitly close it.
+    // opened by the download process, rather than by the user, it should
+    // auto-close if the pref is set that way. If the user opened it themselves,
+    // it should not close until they explicitly close it.
     var autoClose = pref.getBoolPref(PREF_BDM_CLOSEWHENDONE);
-    if (autoClose && (!window.opener ||
-                      window.opener.location.href == window.location.href) &&
-        !gUserInteracted) {
+    var autoOpened =
+      !window.opener || window.opener.location.href == window.location.href;
+    if (autoClose && autoOpened && gCanAutoClose && !gUserInteracted) {
       gCloseDownloadManager();
       return true;
     }
   }
   
   return false;
 }
 
-// This function can be overwritten by extensions that wish to place the Download Window in
-// another part of the UI, such as in a tab or a sidebar panel. 
+// This function can be overwritten by extensions that wish to place the
+// Download Window in another part of the UI. 
 function gCloseDownloadManager()
 {
   window.close();
 }
 
-var gDownloadObserver = {
-  observe: function (aSubject, aTopic, aState) 
-  {
-    switch (aTopic) {
-    case "dl-done":
-      gDownloadViewController.onCommandUpdate();
-      
-      var dl = aSubject.QueryInterface(Components.interfaces.nsIDownload);
-      downloadCompleted(dl);
-      
-      autoRemoveAndClose(dl);
-      break;
-    case "dl-failed":
-    case "dl-cancel":
-      gDownloadViewController.onCommandUpdate();
-      
-      var dl = aSubject.QueryInterface(Components.interfaces.nsIDownload);
-      downloadCompleted(dl);
-      break;
-    case "dl-start":
-      // Add this download to the percentage average tally
-      var dl = aSubject.QueryInterface(Components.interfaces.nsIDownload);
-      if (getDownload(dl.id))
-        return;
-      gActiveDownloads.push(dl);
+///////////////////////////////////////////////////////////////////////////////
+//// Download Event Handlers
 
-      // Adding to the UI
-      var uri = Components.classes["@mozilla.org/network/util;1"]
-                          .getService(Components.interfaces.nsIIOService)
-                          .newFileURI(dl.targetFile);
-      var itm = createDownloadItem(dl.id, uri.spec, dl.displayName,
-                                   dl.source.spec, dl.state, "",
-                                   dl.percentComplete);
-      gDownloadsView.insertBefore(itm, gDownloadsView.firstChild);
-
-      // switch view to it
-      gDownloadsView.selectedIndex = 0;
-      break;
-    }
-  }
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// Download Event Handlers
-
-function onDownloadCancel(aEvent)
+function cancelDownload(aDownload)
 {
-  var selectedIndex = gDownloadsView.selectedIndex;
-
-  gDownloadManager.cancelDownload(aEvent.target.getAttribute("dlid"));
+  gDownloadManager.cancelDownload(aDownload.getAttribute("dlid"));
 
   // XXXben - 
   // If we got here because we resumed the download, we weren't using a temp file
   // because we used saveURL instead. (this is because the proper download mechanism
   // employed by the helper app service isn't fully accessible yet... should be fixed...
   // talk to bz...)
   // the upshot is we have to delete the file if it exists. 
-  var f = getLocalFileFromNativePathOrUrl(aEvent.target.getAttribute("file"));
+  var f = getLocalFileFromNativePathOrUrl(aDownload.getAttribute("file"));
 
   if (f.exists()) 
     f.remove(false);
-
-  gDownloadViewController.onCommandUpdate();
-
-  // now reset the richlistbox
-  gDownloadsView.clearSelection();
-  var rowCount = gDownloadsView.getRowCount();
-  if (selectedIndex >= rowCount)
-    gDownloadsView.selectedIndex = rowCount - 1;
-  else
-    gDownloadsView.selectedIndex = selectedIndex;
 }
 
-function onDownloadPause(aEvent)
+function pauseDownload(aDownload)
 {
-  var selectedIndex = gDownloadsView.selectedIndex;
-
-  var id = aEvent.target.getAttribute("dlid");
+  var id = aDownload.getAttribute("dlid");
   gDownloadManager.pauseDownload(id);
+}
 
-  // now reset the richlistbox
-  gDownloadsView.clearSelection();
-  var rowCount = gDownloadsView.getRowCount();
-  if (selectedIndex >= rowCount)
-    gDownloadsView.selectedIndex = rowCount - 1;
-  else
-    gDownloadsView.selectedIndex = selectedIndex;
+function resumeDownload(aDownload)
+{
+  gDownloadManager.resumeDownload(aDownload.getAttribute("dlid"));
 }
 
-function onDownloadResume(aEvent)
+function removeDownload(aDownload)
 {
-  var selectedIndex = gDownloadsView.selectedIndex;
-
-  gDownloadManager.resumeDownload(aEvent.target.getAttribute("dlid"));
-
-  // now reset the richlistbox
-  gDownloadsView.clearSelection();
-  var rowCount = gDownloadsView.getRowCount();
-  if (selectedIndex >= rowCount)
-    gDownloadsView.selectedIndex = rowCount - 1;
-  else
-    gDownloadsView.selectedIndex = selectedIndex;
-}
-
-function onDownloadRemove(aEvent)
-{
-  if (aEvent.target.removable) {
-    var selectedIndex = gDownloadsView.selectedIndex;
-    gDownloadManager.removeDownload(aEvent.target.getAttribute("dlid"));
-    aEvent.target.parentNode.removeChild(aEvent.target);
-    gDownloadViewController.onCommandUpdate();
-  }
+  gDownloadManager.removeDownload(aDownload.getAttribute("dlid"));
+  gDownloadsView.removeChild(aDownload);
 }
 
-function onDownloadShow(aEvent)
+function showDownload(aDownload)
 {
-  var f = getLocalFileFromNativePathOrUrl(aEvent.target.getAttribute("file"));
+  var f = getLocalFileFromNativePathOrUrl(aDownload.getAttribute("file"));
 
-  if (f.exists()) {
-    try {
-      f.reveal();
-    } catch (ex) {
-      // if reveal failed for some reason (eg on unix it's not currently
-      // implemented), send the file: URL window rooted at the parent to 
-      // the OS handler for that protocol
-      var parent = f.parent;
-      if (parent) {
-        openExternal(parent);
-      }
-    }
-  }
-  else {
-    var brandStrings = document.getElementById("brandStrings");
-    var appName = brandStrings.getString("brandShortName");
-  
-    var strings = document.getElementById("downloadStrings");
-    var name = aEvent.target.getAttribute("target");
-    var message = strings.getFormattedString("fileDoesNotExistError", [name, appName]);
-    var title = strings.getFormattedString("fileDoesNotExistShowTitle", [name]);
-
-    var promptSvc = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
-    promptSvc.alert(window, title, message);
+  try {
+    f.reveal();
+  } catch (ex) {
+    // if reveal failed for some reason (eg on unix it's not currently
+    // implemented), send the file: URL window rooted at the parent to 
+    // the OS handler for that protocol
+    var parent = f.parent;
+    if (parent)
+      openExternal(parent);
   }
 }
 
-function onDownloadOpen(aEvent)
+function openDownload(aDownload)
 {
-  if (aEvent.type == "dblclick" && aEvent.button != 0)
-    return;
-  var download = aEvent.target;
-  if (download.localName == "download") {
-    if (download.openable) {
-      var f = getLocalFileFromNativePathOrUrl(aEvent.target.getAttribute("file"));
-      if (f.exists()) {
-        if (f.isExecutable()) {
-          var dontAsk = false;
-          var pref = Components.classes["@mozilla.org/preferences-service;1"]
-                               .getService(Components.interfaces.nsIPrefBranch);
-          try {
-            dontAsk = !pref.getBoolPref(PREF_BDM_ALERTONEXEOPEN);
-          }
-          catch (e) { }
-          
-          if (!dontAsk) {
-            var strings = document.getElementById("downloadStrings");
-            var name = aEvent.target.getAttribute("target");
-            var message = strings.getFormattedString("fileExecutableSecurityWarning", [name, name]);
+  var f = getLocalFileFromNativePathOrUrl(aDownload.getAttribute("file"));
+  if (f.isExecutable()) {
+    var dontAsk = false;
+    var pref = Cc["@mozilla.org/preferences-service;1"].
+               getService(Ci.nsIPrefBranch);
+    try {
+      dontAsk = !pref.getBoolPref(PREF_BDM_ALERTONEXEOPEN);
+    } catch (e) { }
 
-            var title = strings.getString("fileExecutableSecurityWarningTitle");
-            var dontAsk = strings.getString("fileExecutableSecurityWarningDontAsk");
+    if (!dontAsk) {
+      var strings = document.getElementById("downloadStrings");
+      var name = aDownload.getAttribute("target");
+      var message = strings.getFormattedString("fileExecutableSecurityWarning", [name, name]);
 
-            var promptSvc = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
-            var checkbox = { value: false };
-            var open = promptSvc.confirmCheck(window, title, message, dontAsk, checkbox);
-            
-            if (!open) 
-              return;
-            else
-              pref.setBoolPref(PREF_BDM_ALERTONEXEOPEN, !checkbox.value);              
-          }        
-        }
-        try {
-          f.launch();
-        } catch (ex) {
-          // if launch fails, try sending it through the system's external
-          // file: URL handler
-          openExternal(f);
-        }
-      }
-      else {
-        var brandStrings = document.getElementById("brandStrings");
-        var appName = brandStrings.getString("brandShortName");
-      
-        var strings = document.getElementById("downloadStrings");
-        var name = aEvent.target.getAttribute("target");
-        var message = strings.getFormattedString("fileDoesNotExistError", [name, appName]);
+      var title = strings.getString("fileExecutableSecurityWarningTitle");
+      var dontAsk = strings.getString("fileExecutableSecurityWarningDontAsk");
+
+      var promptSvc = Cc["@mozilla.org/embedcomp/prompt-service;1"].
+                      getService(Ci.nsIPromptService);
+      var checkbox = { value: false };
+      var open = promptSvc.confirmCheck(window, title, message, dontAsk, checkbox);
 
-        var title = strings.getFormattedString("fileDoesNotExistOpenTitle", [name]);
-
-        var promptSvc = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
-        promptSvc.alert(window, title, message);
-      }
-    }
-    else if(download.canceledOrFailed) {
-      // If the user canceled this download, double clicking tries again. 
-      fireEventForElement(download, "retry")
-    }
+      if (!open) 
+        return;
+      pref.setBoolPref(PREF_BDM_ALERTONEXEOPEN, !checkbox.value);
+    }       
+  }
+  try {
+    f.launch();
+  } catch (ex) {
+    // if launch fails, try sending it through the system's external
+    // file: URL handler
+    openExternal(f);
   }
 }
 
-function onDownloadOpenWith(aEvent)
-{
-}
-
-function onDownloadProperties(aEvent)
+function showDownloadInfo(aDownload)
 {
   gUserInteracted = true;
-  window.openDialog("chrome://mozapps/content/downloads/downloadProperties.xul",
-                    "_blank", "modal,centerscreen,chrome,resizable=no", aEvent.target.id);
+
+  var popupTitle    = document.getElementById("information-title");
+  var uriLabel      = document.getElementById("information-uri");
+  var locationLabel = document.getElementById("information-location");
+
+  // Generate the proper title (the start time of the download)
+  var dts = Cc["@mozilla.org/intl/scriptabledateformat;1"].
+            getService(Ci.nsIScriptableDateFormat);  
+  var dateStarted = new Date(parseInt(aDownload.getAttribute("startTime")));
+  dateStarted = dts.FormatDateTime("",
+                                   dts.dateFormatLong,
+                                   dts.timeFormatNoSeconds,
+                                   dateStarted.getFullYear(),
+                                   dateStarted.getMonth() + 1,
+                                   dateStarted.getDate(),
+                                   dateStarted.getHours(),
+                                   dateStarted.getMinutes(), 0);
+  popupTitle.setAttribute("value", dateStarted);
+  // Add proper uri and path
+  var uri = aDownload.getAttribute("uri");
+  uriLabel.label = uri;
+  uriLabel.setAttribute("tooltiptext", uri);
+  var path = aDownload.getAttribute("path");
+  locationLabel.label = path;
+  locationLabel.setAttribute("tooltiptext", path);
+
+  var button = document.getAnonymousElementByAttribute(aDownload, "anonid", "info");
+  gDownloadInfoPopup.openPopup(button, "after_end", 0, 0, false, false);
 }
 
-function onDownloadAnimated(aEvent)
+function retryDownload(aDownload)
 {
-  gDownloadViewController.onCommandUpdate();    
-}
-
-function onDownloadRetry(aEvent)
-{
-  var download = aEvent.target;
-  if (download.localName == "download")
-    gDownloadManager.retryDownload(download.getAttribute("dlid"));
-  
-  gDownloadViewController.onCommandUpdate();
+  gDownloadManager.retryDownload(aDownload.getAttribute("dlid"));
 }
 
 // This is called by the progress listener. We don't actually use the event
 // system here to minimize time wastage. 
 var gLastComputedMean = -1;
 var gLastActiveDownloads = 0;
 function onUpdateProgress()
 {
-  var numActiveDownloads = gActiveDownloads.length;
-  if (numActiveDownloads == 0) {
+  if (gDownloadManager.activeDownloads == 0) {
     document.title = document.documentElement.getAttribute("statictitle");
     gLastComputedMean = -1;
     return;
   }
-    
+
+  // Establish the mean transfer speed and amount downloaded.
   var mean = 0;
   var base = 0;
-  var dl = null;
-  for (var i = 0; i < numActiveDownloads; ++i) {
-    dl = gActiveDownloads[i];
-
-    // Update progress
-    getDownload(dl.id).setAttribute("progress", dl.percentComplete);
-
-    // Fire DOM event so that accessible value change events occur
-    var progressmeter = document.getAnonymousElementByAttribute(getDownload(dl.id), "anonid", "progressmeter");
-    var event = document.createEvent('Events');
-    event.initEvent('ValueChange', true, true);
-    progressmeter.dispatchEvent(event);
-
-    // gActiveDownloads is screwed so it's possible 
-    // to have more files than we're really downloading.
-    // The good news is that those files have size==0.
-    // Same with files with unknown size. Their size==0.
-    if (dl.percentComplete < 100 && dl.size > 0) {
-      mean += dl.amountTransferred;
-      base += dl.size;
-    }
+  var dls = gDonloadManager.activeDownloads;
+  while (dls.hasMoreElements()) {
+    let dl = dls.getNext();
+    mean += dl.amountTransferred;
+    base += dl.size;
   }
 
   // we're not downloading anything at the moment,
   // but we already downloaded something.
   if (base == 0) {
     mean = 100;
   } else {
     mean = Math.floor((mean / base) * 100);
   }
 
+  // Update title of window
+  var numActiveDownloads = gDownloadManager.activeDownloads;
   if (mean != gLastComputedMean || gLastActiveDownloads != numActiveDownloads) {
     gLastComputedMean = mean;
     gLastActiveDownloads = numActiveDownloads;
-    
-    var strings = document.getElementById("downloadStrings");
-    
-    var title;
-    if (numActiveDownloads > 1)
-      title = strings.getFormattedString("downloadsTitleMultiple", [mean, numActiveDownloads]);
-    else
-      title = strings.getFormattedString("downloadsTitle", [mean]);
 
-    document.title = title;
+    let strings = document.getElementById("downloadStrings");
+    if (numActiveDownloads > 1) {
+      document.title = strings.getFormattedString("downloadsTitleMultiple",
+                                                  [mean, numActiveDownloads]);
+    } else {
+      document.title = strings.getFormattedString("downloadsTitle", [mean]);
+    }
   }
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-// Startup, Shutdown
+//// Startup, Shutdown
 function Startup() 
 {
-  gDownloadsView = document.getElementById("downloadView");
+  gDownloadsView        = document.getElementById("downloadView");
+  gDownloadsActiveLabel = document.getElementById("active-downloads");
+  gDownloadsOtherLabel  = document.getElementById("other-downloads");
+  gDownloadInfoPopup    = document.getElementById("information");
 
-  var db = gDownloadManager.DBConnection;
-  var stmt = db.createStatement("SELECT id, target, name, source, state " +
-                                "FROM moz_downloads " +
-                                "ORDER BY startTime DESC");
-  while (stmt.executeStep()) {
-    var dl = createDownloadItem(stmt.getInt64(0), stmt.getString(1),
-                                stmt.getString(2), stmt.getString(3),
-                                stmt.getInt32(4), "", "", "100");
-    gDownloadsView.appendChild(dl);
-  }
+  buildDefaultView();
 
   // The DownloadProgressListener (DownloadProgressListener.js) handles progress
   // notifications. 
-  var downloadStrings = document.getElementById("downloadStrings");
-  gDownloadListener = new DownloadProgressListener(document, downloadStrings);
+  gDownloadListener = new DownloadProgressListener();
   gDownloadManager.addListener(gDownloadListener);
 
-  // The active downloads list is created by the front end only when the download starts,  
-  // so we need to pre-populate it with any downloads that were already going. 
-  var activeDownloads = gDownloadManager.activeDownloads;
-  while (activeDownloads.hasMoreElements()) {
-    var download = activeDownloads.getNext().QueryInterface(Ci.nsIDownload);
-    gActiveDownloads.push(download);
-  }
-
-  // Handlers for events generated by the UI (downloads, list view)
-  gDownloadsView.addEventListener("download-cancel",      onDownloadCancel,     false);
-  gDownloadsView.addEventListener("download-pause",       onDownloadPause,      false);
-  gDownloadsView.addEventListener("download-resume",      onDownloadResume,     false);
-  gDownloadsView.addEventListener("download-remove",      onDownloadRemove,     false);
-  gDownloadsView.addEventListener("download-show",        onDownloadShow,       false);
-  gDownloadsView.addEventListener("download-open",        onDownloadOpen,       false);
-  gDownloadsView.addEventListener("download-retry",       onDownloadRetry,      false);
-  gDownloadsView.addEventListener("download-animated",    onDownloadAnimated,   false);
-  gDownloadsView.addEventListener("download-properties",  onDownloadProperties, false);
-  gDownloadsView.addEventListener("dblclick",             onDownloadOpen,       false);
-  
-  // Set up AutoDownload display area
-  initAutoDownloadDisplay();
-  var pbi = Components.classes["@mozilla.org/preferences-service;1"]
-                      .getService(Components.interfaces.nsIPrefBranch2);
-  pbi.addObserver("browser.download.", gDownloadPrefObserver, false);
-  
-  // Handlers for events generated by the Download Manager (download events)
-  var observerService = Components.classes[kObserverServiceProgID]
-                                  .getService(Components.interfaces.nsIObserverService);
-  observerService.addObserver(gDownloadObserver, "dl-done",   false);
-  observerService.addObserver(gDownloadObserver, "dl-cancel", false);
-  observerService.addObserver(gDownloadObserver, "dl-failed", false);  
-  observerService.addObserver(gDownloadObserver, "dl-start",  false);  
-  
-  // This is for the "Clean Up" button, which requires there to be
-  // non-active downloads before it can be enabled. 
-  gDownloadsView.controllers.appendController(gDownloadViewController);
-
-  // downloads can finish before Startup() does, so check if the window should close
+  // downloads can finish before Startup() does, so check if the window should
+  // close and act accordingly
   if (!autoRemoveAndClose())
     gDownloadsView.focus();
 }
 
 function Shutdown() 
 {
   gDownloadManager.removeListener(gDownloadListener);
-
-  var pbi = Components.classes["@mozilla.org/preferences-service;1"]
-                      .getService(Components.interfaces.nsIPrefBranch2);
-  pbi.removeObserver("browser.download.", gDownloadPrefObserver);
-
-  var observerService = Components.classes[kObserverServiceProgID]
-                                  .getService(Components.interfaces.nsIObserverService);
-  observerService.removeObserver(gDownloadObserver, "dl-done");
-  observerService.removeObserver(gDownloadObserver, "dl-cancel");
-  observerService.removeObserver(gDownloadObserver, "dl-failed");  
-  observerService.removeObserver(gDownloadObserver, "dl-start");  
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 // View Context Menus
 var gContextMenus = [ 
-  ["menuitem_pause", "menuitem_cancel", "menuseparator_properties", "menuitem_properties"],
-  ["menuitem_open", "menuitem_show", "menuitem_remove", "menuseparator_properties", "menuitem_properties"],
-  ["menuitem_retry", "menuitem_remove", "menuseparator_properties", "menuitem_properties"],
-  ["menuitem_retry", "menuitem_remove", "menuseparator_properties", "menuitem_properties"],
-  ["menuitem_resume", "menuitem_cancel", "menuseparator_properties", "menuitem_properties"]
+  ["menuitem_pause", "menuitem_cancel"],
+  ["menuitem_open", "menuitem_show", "menuitem_remove"],
+  ["menuitem_retry", "menuitem_remove"],
+  ["menuitem_retry", "menuitem_remove"],
+  ["menuitem_resume", "menuitem_cancel"]
 ];
 
 function buildContextMenu(aEvent)
 {
   if (aEvent.target.id != "downloadContextMenu")
     return false;
     
   var popup = document.getElementById("downloadContextMenu");
@@ -584,17 +414,17 @@ function buildContextMenu(aEvent)
     
     return true;
   }
   
   return false;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-// Drag and Drop
+//// Drag and Drop
 
 var gDownloadDNDObserver =
 {
   onDragOver: function (aEvent, aFlavour, aDragSession)
   {
     aDragSession.canDrop = true;
   },
   
@@ -615,40 +445,58 @@ var gDownloadDNDObserver =
       this._flavourSet.appendFlavour("text/x-moz-url");
       this._flavourSet.appendFlavour("text/unicode");
     }
     return this._flavourSet;
   }
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-// Command Updating and Command Handlers
+//// Command Updating and Command Handlers
 
 var gDownloadViewController = {
-  supportsCommand: function (aCommand)
+  supportsCommand: function(aCommand)
   {
     var commandNode = document.getElementById(aCommand);
-    return commandNode && commandNode.parentNode == document.getElementById("downloadsCommands");
+    return commandNode && commandNode.parentNode ==
+                            document.getElementById("downloadsCommands");
   },
   
-  isCommandEnabled: function (aCommand)
+  isCommandEnabled: function(aCommand)
   {
     if (!window.gDownloadsView)
       return false;
     
+    var dl = gDownloadsView.selectedItem;
+    if (!dl)
+      return false;
+
     switch (aCommand) {
-    case "cmd_cleanUp":
-      return gDownloadManager.canCleanUp;
-    case "cmd_remove":
-      return gDownloadsView.selectedItem != null;
+      case "cmd_cancel":
+        return dl.inProgress;
+      case "cmd_open":
+      case "cmd_show":
+        let file = getLocalFileFromNativePathOrUrl(dl.getAttribute("file"));
+        return dl.openable && file.exists();
+      case "cmd_pause":
+        return dl.inProgress && !dl.paused;
+      case "cmd_pauseResume":
+        return dl.inProgress || dl.paused;
+      case "cmd_resume":
+        return dl.paused;
+      case "cmd_remove":
+      case "cmd_retry":
+        return dl.removable;
+      case "cmd_showInfo":
+        return true;
     }
     return false;
   },
   
-  doCommand: function (aCommand)
+  doCommand: function(aCommand)
   {
     if (this.isCommandEnabled(aCommand))
       this.commands[aCommand](gDownloadsView.selectedItem);
   },  
   
   onCommandUpdate: function ()
   {
     var downloadsCommands = document.getElementById("downloadsCommands");
@@ -660,190 +508,258 @@ var gDownloadViewController = {
   {
     if (this.isCommandEnabled(command.id))
       command.removeAttribute("disabled");
     else
       command.setAttribute("disabled", "true");
   },
   
   commands: {
-    cmd_cleanUp: function() {
-      gDownloadManager.cleanUp();
-
-      // Update UI
-      for (var i = gDownloadsView.children.length - 1; i >= 0; --i) {
-        var elm = gDownloadsView.children[i];
-        var state = elm.getAttribute("state");
-
-        if (state != nsIDownloadManager.DOWNLOAD_NOTSTARTED &&
-            state != nsIDownloadManager.DOWNLOAD_DOWNLOADING &&
-            state != nsIDownloadManager.DOWNLOAD_PAUSED)
-          gDownloadsView.removeChild(gDownloadsView.children[i]);
-      }
-
-      gDownloadViewController.onCommandUpdate();
+    cmd_cancel: function(aSelectedItem) {
+      cancelDownload(aSelectedItem);
+    },
+    cmd_open: function(aSelectedItem) {
+      openDownload(aSelectedItem);
+    },
+    cmd_pause: function(aSelectedItem) {
+      pauseDownload(aSelectedItem);
+    },
+    cmd_pauseResume: function(aSelectedItem) {
+      if (aSelectedItem.inProgress)
+        this.commands.cmd_pause(aSelectedItem);
+      else
+        this.commands.cmd_resume(aSelectedItem);
     },
-    
     cmd_remove: function(aSelectedItem) {
-      fireEventForElement(aSelectedItem, 'remove');
+      removeDownload(aSelectedItem);
+    },
+    cmd_resume: function(aSelectedItem) {
+      resumeDownload(aSelectedItem);
+    },
+    cmd_retry: function(aSelectedItem) {
+      retryDownload(aSelectedItem);
+    },
+    cmd_show: function(aSelectedItem) {
+      showDownload(aSelectedItem);
+    },
+    cmd_showInfo: function(aSelectedItem) {
+      showDownloadInfo(aSelectedItem);
     }
   }
 };
 
 function onDownloadShowInfo()
 {
   if (gDownloadsView.selectedItem)
     fireEventForElement(gDownloadsView.selectedItem, "properties");
 }
 
-function initAutoDownloadDisplay()
+function openExternal(aFile)
 {
-  var pref = Components.classes["@mozilla.org/preferences-service;1"]
-                       .getService(Components.interfaces.nsIPrefBranch);
+  var uri = Cc["@mozilla.org/network/io-service;1"].
+            getService(Ci.nsIIOService).newFileURI(aFile);
 
-  var autodownload = pref.getBoolPref("browser.download.useDownloadDir");  
-  if (autodownload) {
-    var autodownloadInfo = document.getElementById("autodownloadInfo");
-    autodownloadInfo.hidden = false;
-    var autodownloadSpring = document.getElementById("autodownloadSpring");
-    autodownloadSpring.hidden = true; 
+  var protocolSvc = Cc["@mozilla.org/uriloader/external-protocol-service;1"].
+                    getService(Ci.nsIExternalProtocolService);
+  protocolSvc.loadUrl(uri);
 
-    function getSpecialFolderKey(aFolderType) 
-    {
-    if (aFolderType == "Desktop")
-      return "Desk";
-
-    if (aFolderType != "Downloads")
-      throw "ASSERTION FAILED: folder type should be 'Desktop' or 'Downloads'";
+  return;
+}
 
-#ifdef XP_WIN
-    return "Pers";
-#else
-#ifdef XP_MACOSX
-    return "UsrDocs";
-#else
-    return "Home";
-#endif
-#endif
-    }
-    
-    function getDownloadsFolder(aFolder)
-    {
-      var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"]
-                                  .getService(Components.interfaces.nsIProperties);
-      var dir = fileLocator.get(getSpecialFolderKey(aFolder), Components.interfaces.nsILocalFile);
-      
-      var bundle = Components.classes["@mozilla.org/intl/stringbundle;1"]
-                             .getService(Components.interfaces.nsIStringBundleService);
-      bundle = bundle.createBundle("chrome://mozapps/locale/downloads/unknownContentType.properties");
+///////////////////////////////////////////////////////////////////////////////
+//// Utility functions
+
+/**
+ * Builds the default view that the download manager starts out with.
+ */
+function buildDefaultView()
+{
+  buildActiveDownloadsList();
+  buildDownloadListWithTime(Date.now() - 24 * 3600 * 1000 * 7); // One week
+
+  // select the first visible download item, if any
+  var children = gDownloadsView.children;
+  if (children.length > 0)
+    gDownloadsView.selectedItem = children[0];
+}
 
-      var description = bundle.GetStringFromName("myDownloads");
-      if (aFolder != "Desktop")
-        dir.append(description);
-        
-      return dir;
-    }
+/**
+ * Builds the downloads list with a given statement and reference node.
+ *
+ * @param aStmt
+ *        The compiled SQL statement to build with.  This needs to have the
+ *        following columns in this order to work properly:
+ *        id, target, name, source, state, startTime
+ *        This statement should be ordered on the endTime ASC so that the end
+ *        result is a list of downloads with their end time's descending.
+ * @param aRef
+ *        The node we use for placement of the download objects.  We place each
+ *        new node above the previously inserted one.
+ */
+function buildDownloadList(aStmt, aRef)
+{
+  while (aRef.nextSibling && aRef.nextSibling.tagName != "label")
+    gDownloadsView.removeChild(aRef.nextSibling);
 
-    var displayName = null;
-    var folder;
-    switch (pref.getIntPref("browser.download.folderList")) {
-    case 0:
-      folder = getDownloadsFolder("Desktop");
-      displayName = document.getElementById("downloadStrings").getString("displayNameDesktop");
-      break;
-    case 1:
-      folder = getDownloadsFolder("Downloads");
-      break;
-    case 2: 
-      folder = pref.getComplexValue("browser.download.dir", Components.interfaces.nsILocalFile);
-      break;
+  while (aStmt.executeStep()) {
+    let id = aStmt.getInt64(0);
+    let state = aStmt.getInt32(4);
+    let percentComplete = 100;
+    if (state == Ci.nsIDownloadManager.DOWNLOAD_NOTSTARTED ||
+        state == Ci.nsIDownloadManager.DOWNLOAD_DOWNLOADING ||
+        state == Ci.nsIDownloadManager.DOWNLOAD_PAUSED) {
+      // so we have an in-progress download that we need to determine the
+      // proper percentage complete for.  This download will actually be in
+      // the active downloads array internally, so calling getDownload is cheap.
+      let dl = gDownloadManager.getDownload(id);
+      percentComplete = dl.percentComplete;
     }
-
-    if (folder) {    
-      var ioServ = Components.classes["@mozilla.org/network/io-service;1"]
-                              .getService(Components.interfaces.nsIIOService);
-      var fph = ioServ.getProtocolHandler("file").QueryInterface(Components.interfaces.nsIFileProtocolHandler);
-      var mozIconURI = "moz-icon://" +  fph.getURLSpecFromFile(folder) + "?size=16";
-      var folderIcon = document.getElementById("saveToFolder")
-      folderIcon.image = mozIconURI;
-      
-      var folderName = document.getElementById("saveToFolder");
-      folderName.label = displayName || folder.leafName;
-      folderName.setAttribute("path", folder.path);
-    }
-  }
-  else {
-    var autodownloadInfo = document.getElementById("autodownloadInfo");
-    autodownloadInfo.hidden = true;
-    var autodownloadSpring = document.getElementById("autodownloadSpring");
-    autodownloadSpring.hidden = false; 
+    let dl = createDownloadItem(id, aStmt.getString(1),
+                                aStmt.getString(2), aStmt.getString(3),
+                                state, "", percentComplete,
+                                Math.round(aStmt.getInt64(5) / 1000));
+    gDownloadsView.insertBefore(dl, aRef.nextSibling);
   }
 }
 
-var gDownloadPrefObserver = {
-  observe: function (aSubject, aTopic, aData)
-  {
-    if (aTopic == "nsPref:changed") {
-      switch(aData) {
-      case "browser.download.folderList":
-      case "browser.download.useDownloadDir":
-      case "browser.download.dir":
-        initAutoDownloadDisplay();
-      }
-    }
+var gActiveDownloadsQuery = null;
+function buildActiveDownloadsList()
+{
+  // Are there any active downloads?
+  if (gDownloadManager.activeDownloadCount == 0)
+    return;
+
+  // unhide the label
+  gDownloadsActiveLabel.hidden = false;
+
+  // repopulate the list
+  var db = gDownloadManager.DBConnection;
+  var stmt = gActiveDownloadsQuery;
+  if (!stmt) {
+    stmt = gActiveDownloadsQuery =
+      db.createStatement("SELECT id, target, name, source, state, startTime " +
+                         "FROM moz_downloads " +
+                         "WHERE state = ?1 " +
+                         "OR state = ?2 " +
+                         "OR state = ?3 " +
+                         "ORDER BY endTime ASC");
   }
-};
-
-function onDownloadShowFolder()
-{
-  var folderName = document.getElementById("saveToFolder");
-  var dir = getLocalFileFromNativePathOrUrl(folderName.getAttribute("path"));
-  if (!dir.exists())
-   dir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0755);
 
   try {
-    dir.reveal();
-  } catch (ex) {
-    // if nsILocalFile::Reveal failed (eg it currently just returns an
-    // error on unix), just open the folder in a browser window
-    openExternal(dir);
+    stmt.bindInt32Parameter(0, Ci.nsIDownloadManager.DOWNLOAD_NOTSTARTED);
+    stmt.bindInt32Parameter(1, Ci.nsIDownloadManager.DOWNLOAD_DOWNLOADING);
+    stmt.bindInt32Parameter(2, Ci.nsIDownloadManager.DOWNLOAD_PAUSED);
+    buildDownloadList(stmt, gDownloadsActiveLabel);
+  } finally {
+    stmt.reset();
   }
 }
 
-function openExternal(aFile)
+/**
+ * Builds the download view with downloads from a given time until now.
+ *
+ * @param aTime
+ *        The time that we want to start displaying downloads from.  This time
+ *        is in milliseconds (what is returned from Date.now()).
+ */
+var gDownloadListWithTimeQuery = null;
+function buildDownloadListWithTime(aTime)
 {
-  var uri = Components.classes["@mozilla.org/network/io-service;1"]
-                      .getService(Components.interfaces.nsIIOService)
-                      .newFileURI(aFile);
+  var db = gDownloadManager.DBConnection;
+  var stmt = gDownloadListWithTimeQuery;
+  if (!stmt) {
+    stmt = gDownloadListWithTimeQuery =
+      db.createStatement("SELECT id, target, name, source, state, startTime " +
+                         "FROM moz_downloads " +
+                         "WHERE startTime >= ?1 " +
+                         "AND (state = ?2 " +
+                         "OR state = ?3 " +
+                         "OR state = ?4) " +
+                         "ORDER BY endTime ASC");
+  }
+
+  try {
+    stmt.bindInt64Parameter(0, aTime * 1000);
+    stmt.bindInt32Parameter(1, Ci.nsIDownloadManager.DOWNLOAD_FINISHED);
+    stmt.bindInt32Parameter(2, Ci.nsIDownloadManager.DOWNLOAD_FAILED);
+    stmt.bindInt32Parameter(3, Ci.nsIDownloadManager.DOWNLOAD_CANCELED);
+    buildDownloadList(stmt, gDownloadsOtherLabel);
+  } finally {
+    stmt.reset();
+  }
+}
 
-  var protocolSvc = 
-      Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
-                .getService(Components.interfaces.nsIExternalProtocolService);
+/**
+ * Builds the download list with an array of search terms.  This also changes
+ * the label of the second group of downloads to search results (or the locale
+ * equivalent).
+ *
+ * @param aTerms
+ *        An array of search terms that will be checked for past downloads.  If
+ *        this array is empty, we clear the search results and build the default
+ *        view.
+ */
+function buildDownloadListWithSearch(aTerms)
+{
+  gSearching = true;
+  gDownloadsOtherLabel.value = gDownloadsOtherLabel.getAttribute("searchlabel");
 
-  protocolSvc.loadUrl(uri);
+  // remove and trailing or leading whitespace first
+  aTerms = aTerms.replace(/^\s+|\s+$/, "");
+  if (aTerms.length == 0) {
+    gSearching = false;
+    gDownloadsOtherLabel.value = gDownloadsOtherLabel.getAttribute("completedlabel");
+    buildDefaultView();
+    return;
+  }
+  var terms = aTerms.split(" ");
+  if (terms.length == 0)
+    return;
 
-  return;
+  var sql = "SELECT id, target, name, source, state, startTime " +
+            "FROM moz_downloads ";
+  for (var i = 0; i < terms.length; i++) {
+    if (terms[i] == "") continue;
+    sql += i == 0 ? "WHERE " : "OR ";
+    // We cannot actually bind parameter because it will not pick up the
+    // parameter if we give it '%?1%', and we can't add spaces :(
+    sql += "name LIKE '%" + terms[i] + "%' ";
+  }
+  sql += "ORDER BY endTime ASC";
+
+  var db = gDownloadManager.DBConnection;
+  var stmt = db.createStatement(sql);
+
+  try {
+    buildDownloadList(stmt, gDownloadsOtherLabel);
+  } finally {
+    stmt.reset();
+  }
+}
+
+function performSearch() {
+  buildDownloadListWithSearch(document.getElementById("searchbox").value);
 }
 
 // we should be using real URLs all the time, but until 
 // bug 239948 is fully fixed, this will do...
 function getLocalFileFromNativePathOrUrl(aPathOrUrl)
 {
   if (aPathOrUrl.substring(0,7) == "file://") {
 
     // if this is a URL, get the file from that
-    ioSvc = Components.classes["@mozilla.org/network/io-service;1"]
-      .getService(Components.interfaces.nsIIOService);
+    let ioSvc = Cc["@mozilla.org/network/io-service;1"].
+                getService(Ci.nsIIOService);
 
     // XXX it's possible that using a null char-set here is bad
     const fileUrl = ioSvc.newURI(aPathOrUrl, null, null).
-      QueryInterface(Components.interfaces.nsIFileURL);
-    return fileUrl.file.clone().
-      QueryInterface(Components.interfaces.nsILocalFile);
+                    QueryInterface(Ci.nsIFileURL);
+    return fileUrl.file.clone().QueryInterface(Ci.nsILocalFile);
 
   } else {
 
     // if it's a pathname, create the nsILocalFile directly
     var f = new nsLocalFile(aPathOrUrl);
 
     return f;
   }
 }
+
--- a/toolkit/mozapps/downloads/content/downloads.xul
+++ b/toolkit/mozapps/downloads/content/downloads.xul
@@ -19,16 +19,17 @@
 # The Initial Developer of the Original Code is
 # Netscape Communications Corporation.
 # Portions created by the Initial Developer are Copyright (C) 2001
 # the Initial Developer. All Rights Reserved.
 #
 # Contributor(s):
 #   Ben Goodger <ben@bengoodger.com> (v2.0)
 #   Blake Ross <blakeross@telocity.com>
+#   Shawn Wilsher <me@shawnwilsher.com> (v3.0)
 #
 # Alternatively, the contents of this file may be used under the terms of
 # either the GNU General Public License Version 2 or later (the "GPL"), or
 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 # in which case the provisions of the GPL or the LGPL are applicable instead
 # of those above. If you wish to allow use of your version of this file only
 # under the terms of either the GPL or the LGPL, and not to allow others to
 # use your version of this file under the terms of the MPL, indicate your
@@ -58,107 +59,118 @@
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         id="downloadManager" windowtype="Download:Manager"
         orient="vertical" title="&downloads.title;" statictitle="&downloads.title;"
         width="&window.width;" height="&window.height;" screenX="10" screenY="10"
         persist="width height screenX screenY sizemode"
         onload="Startup();" onunload="Shutdown();"
         onclose="return closeWindow(false);">
       
+  <script type="application/javascript" src="chrome://mozapps/content/downloads/downloads.js"/>
   <script type="application/javascript" src="chrome://mozapps/content/downloads/DownloadProgressListener.js"/>
-  <script type="application/javascript" src="chrome://mozapps/content/downloads/downloads.js"/>
   <script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
   <script type="application/javascript" src="chrome://global/content/nsDragAndDrop.js"/>
   <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
   
   <stringbundleset id="downloadSet">
     <stringbundle id="brandStrings" src="chrome://branding/locale/brand.properties"/>
     <stringbundle id="downloadStrings" src="chrome://mozapps/locale/downloads/downloads.properties"/>
   </stringbundleset>
 
   <commandset id="downloadsCommands"
               commandupdater="true"
               oncommandupdate="gDownloadViewController.onCommandUpdate();">
-    <command id="cmd_cleanUp" oncommand="gDownloadViewController.doCommand('cmd_cleanUp');"/>
-    <command id="cmd_remove"  oncommand="gDownloadViewController.doCommand('cmd_remove');"/>
+    <command id="cmd_cancel"
+             oncommand="gDownloadViewController.doCommand('cmd_cancel');"/>
+    <command id="cmd_open"
+             oncommand="gDownloadViewController.doCommand('cmd_open');"/>
+    <command id="cmd_pause"
+             oncommand="gDownloadViewController.doCommand('cmd_pause');"/>
+    <command id="cmd_pauseResume"
+             oncommand="gDownloadViewController.doCommand('cmd_pauseResume');"/>
+    <command id="cmd_remove"
+             oncommand="gDownloadViewController.doCommand('cmd_remove');"/>
+    <command id="cmd_resume"
+             oncommand="gDownloadViewController.doCommand('cmd_resume');"/>
+    <command id="cmd_retry"
+             oncommand="gDownloadViewController.doCommand('cmd_retry');"/>
+    <command id="cmd_show"
+             oncommand="gDownloadViewController.doCommand('cmd_show');"/>
+    <command id="cmd_showInfo"
+             oncommand="gDownloadViewController.doCommand('cmd_showInfo');"/>
   </commandset>
     
   <keyset id="downloadKeys">
-    <key id="key_cleanUp" keycode="VK_DELETE" command="cmd_cleanUp" modifiers="accel,shift"/>
+    <key id="key_pauseResume" key=" " command="cmd_pauseResume"/>
     <key id="key_remove"  keycode="VK_DELETE" command="cmd_remove"/>
     <key id="key_close"   key="&cmd.close.commandKey;"  oncommand="closeWindow(true);"    modifiers="accel"/>
 #ifdef XP_GNOME
     <key id="key_close2"  key="&cmd.close2Unix.commandKey;" oncommand="closeWindow(true);" modifiers="accel"/>
 #else
     <key id="key_close2"  key="&cmd.close2.commandKey;" oncommand="closeWindow(true);" modifiers="accel"/>
 #endif
     <key                  keycode="VK_ESCAPE"           oncommand="closeWindow(true);"/>
     <key id="key_info"    key="&cmd.info.commandKey;"   oncommand="onDownloadShowInfo();" modifiers="accel"/>
   </keyset>
   
   <vbox id="contextMenuPalette" hidden="true">
     <menuitem id="menuitem_pause" 
               label="&cmd.pause.label;" accesskey="&cmd.pause.accesskey;"
-              oncommand="fireEventForElement(gDownloadsView.selectedItem, 'pause');"/>
+              command="cmd_pause"/>
     <menuitem id="menuitem_resume" 
               label="&cmd.resume.label;" accesskey="&cmd.resume.accesskey;"
-              oncommand="fireEventForElement(gDownloadsView.selectedItem, 'resume');"/>
+              command="cmd_resume"/>
     <menuitem id="menuitem_cancel" 
               label="&cmd.cancel.label;" accesskey="&cmd.cancel.accesskey;"
-              oncommand="fireEventForElement(gDownloadsView.selectedItem, 'cancel');"/>
+              command="cmd_cancel"/>
 
     <menuitem id="menuitem_open" default="true"
               label="&cmd.open.label;" accesskey="&cmd.open.accesskey;"
-              oncommand="fireEventForElement(gDownloadsView.selectedItem, 'open');"/>
-    <menuitem id="menuitem_openWith" 
-              label="&cmd.openWith.label;" accesskey="&cmd.openWith.accesskey;"
-              oncommand="fireEventForElement(gDownloadsView.selectedItem, 'openWith');"/>
+              command="cmd_open"/>
     <menuitem id="menuitem_show"
 #ifdef XP_MACOSX
               label="&cmd.show.labelMac;"
               accesskey="&cmd.show.accesskeyMac;"
 #else
               label="&cmd.show.label;"
               accesskey="&cmd.show.accesskey;"
 #endif
-              oncommand="fireEventForElement(gDownloadsView.selectedItem, 'show');"/>
+              command="cmd_show"/>
 
     <menuitem id="menuitem_retry" default="true"
               label="&cmd.retry.label;" accesskey="&cmd.retry.accesskey;"
-              oncommand="fireEventForElement(gDownloadsView.selectedItem, 'retry');"/>
+              command="cmd_retry"/>
 
     <menuitem id="menuitem_remove"
               label="&cmd.remove.label;" accesskey="&cmd.remove.accesskey;"
-              oncommand="fireEventForElement(gDownloadsView.selectedItem, 'remove');"/>
-              
-    <menuseparator id="menuseparator_properties"/>              
-    <menuitem id="menuitem_properties" 
-              label="&cmd.properties.label;" accesskey="&cmd.properties.accesskey;"
-              oncommand="fireEventForElement(gDownloadsView.selectedItem, 'properties');"/>
+              command="cmd_remove"/>
   </vbox>
   
-  <popup id="downloadContextMenu" onpopupshowing="return buildContextMenu(event);"/>
+  <menupopup id="downloadContextMenu" onpopupshowing="return buildContextMenu(event);"/>
+
+  <!--Information popup-->
+  <panel id="information" orient="vertical" align="start">
+    <label id="information-title" flex="1"/>
+    <button type="image" crop="center" id="information-uri" flex="1"/>
+    <button type="image" crop="center" id="information-location" flex="1" command="cmd_show"/>
+  </panel>
 
   <richlistbox id="downloadView" flex="1" context="downloadContextMenu"
-        ondragover="nsDragAndDrop.dragOver(event, gDownloadDNDObserver);"
-        ondragdrop="nsDragAndDrop.drop(event, gDownloadDNDObserver);">
+               ondragover="nsDragAndDrop.dragOver(event, gDownloadDNDObserver);"
+               ondragdrop="nsDragAndDrop.drop(event, gDownloadDNDObserver);">
+    <label id="active-downloads" value="&activeDownloads.label;" hidden="true"/>
+    <label id="other-downloads" value="&completedDownloads.label;"
+           completedlabel="&completedDownloads.label;"
+           searchlabel="&searchResults.label;"/>
   </richlistbox>
-  
-  <hbox>
-    <hbox id="commandBar" flex="1">
-      <hbox align="center" flex="1" id="autodownloadInfo">
-        <label>&filesSavedTo.label;</label>
-        <toolbarbutton class="tabbable" id="saveToFolder" crop="right" flex="1"
-                       oncommand="onDownloadShowFolder();"
-                       tooltiptext="&showFolder.label;"/>
-      </hbox> 
-      <spring id="autodownloadSpring" hidden="true" flex="1"/>
-      <separator id="commandBarSeparator"/> 
-      <button id="cleanUpButton" 
-              label="&cmd.cleanUp.label;" accesskey="&cmd.cleanUp.accesskey;" tooltiptext="&cmd.cleanUp.tooltip;" 
-              command="cmd_cleanUp"/>
-    </hbox>
-    
+
+  <hbox id="search">
+    <textbox type="timed" timeout="500" id="searchbox"
+             oncommand="performSearch();"/>
+    <spacer flex="1"/>
+    <!-- TODO get advanced search working (Bug 390491)
+    <button label="Advanced Search"/>
+    -->
     <resizer id="windowResizer" dir="bottomright"/>
-  </hbox>  
+  </hbox>
 
 </window>
 
--- a/toolkit/mozapps/jar.mn
+++ b/toolkit/mozapps/jar.mn
@@ -3,18 +3,16 @@ toolkit.jar:
 * content/mozapps/downloads/helperApps.js                       (downloads/content/helperApps.js)
 * content/mozapps/downloads/unknownContentType.xul              (downloads/content/unknownContentType.xul)
 * content/mozapps/downloads/overrideHandler.js                  (downloads/content/overrideHandler.js)
 * content/mozapps/downloads/downloads.xul                       (downloads/content/downloads.xul)
 * content/mozapps/downloads/downloads.js                        (downloads/content/downloads.js)
 * content/mozapps/downloads/DownloadProgressListener.js         (downloads/content/DownloadProgressListener.js)
   content/mozapps/downloads/downloads.css                       (downloads/content/downloads.css)
 * content/mozapps/downloads/download.xml                        (downloads/content/download.xml)
-* content/mozapps/downloads/downloadProperties.xul              (downloads/content/downloadProperties.xul)
-* content/mozapps/downloads/downloadProperties.js               (downloads/content/downloadProperties.js)
 * content/mozapps/preferences/actionsshared.js                  (preferences/actionsshared.js)
 * content/mozapps/preferences/ocsp.js                           (preferences/ocsp.js)
 * content/mozapps/preferences/ocsp.xul                          (preferences/ocsp.xul)
 * content/mozapps/preferences/fontbuilder.js                    (preferences/fontbuilder.js)
 * content/mozapps/preferences/changemp.js                       (preferences/changemp.js)
 * content/mozapps/preferences/changemp.xul                      (preferences/changemp.xul)
 * content/mozapps/preferences/removemp.js                       (preferences/removemp.js)
 * content/mozapps/preferences/removemp.xul                      (preferences/removemp.xul)
deleted file mode 100644
index f3ca4a31149949f8edb5ff351789bb15f3eda5bf..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 260d22974bfc7ded063c6bc3d11e8972f7c78e57..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
new file mode 100644
index 0000000000000000000000000000000000000000..e834d071d73b89405b1337c6baa7a821950ab9c9
GIT binary patch
literal 5494
zc$`gG2|QF$`yNJP8(YK-vSmprGxnXag%(jLOSX_Ai7Z(LF_c|JA*0fsEEUNz!&tIT
zl&C3VC`)7;ni;d)|CGM}_nqJG%-nPD@4n}G&w0-CzVE$y^vD4bAz2|12qfa@VC%~L
zNBrpm5bm!BFC!BK+F|Z!i#i@x9>4+sOTy7V4?qAAfRYiYh(E@l;VfMMfR)W;EHrjv
z0RYC)WhJ!ZS0aYVmO$~&r?qdh$87Dp4WUqI2V%+c_~*t$0FZsOXI}iD9oxLr6!_Q`
zG<(zhWFdg7y4?Z-E6VADxsA}XjE0GllY1{PK99{pbATvkeUq9l3VjUv<*W)cCKw6@
z09`IDY$}CpX~c<LlqUdXG>exkfS5^iVelWT2iS}<CT-br1Bd45u-H`E4Av5@p)KI4
zzr$zWUjS(d_=wHXNnbKrJKF8X)ThFkpt#N7GKB1WGMvL<67j^Y0i`Zt`vvA;2xcQ;
zIXTGBKg&|TU2Iem(L*ZJMSM-_UIBg`fMC#E=K*F9eubt@KqsGvK<pwhXpQ{{Rx5i&
zqz3@*&E;vDmG9YDUdH7XmAk6DeszVGKlg^B0d^pLeOi*hHWY&?w6vgSh*(R`Gsy<C
zEAu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U)uixI^@k8
deleted file mode 100644
index 43855073b5a4c2e634a85b51743c5c4d87adc96a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/toolkit/themes/pinstripe/mozapps/downloads/downloads.css
+++ b/toolkit/themes/pinstripe/mozapps/downloads/downloads.css
@@ -1,101 +1,84 @@
-/* Download View */
 #downloadView {
-  margin: 0px;
+  margin: 0;
   border-bottom: 1px solid #8E8E8E;
-  padding: 0px;
-  -moz-appearance: none;
-}
-
-#downloadView .scrollbox-innerbox {
-  background: url("chrome://mozapps/skin/downloads/background-stripe.gif") #FFFFFF repeat;
-} 
-
-/* Download Manager Command Bar */
-#commandBar {
-	padding: 4px 16px 4px 0px;
-	-moz-box-align: center;
-}
-
-
-#cleanUpButton {
-  -moz-appearance: button-bevel;
-  min-width: 1px;
-  padding: 3px 6px;
-  margin: 0 10px 0 0;
-} 
-
-#commandBarSeparator {
-  display:none;
+  padding: 0;
 }
 
 /* Download View Items */
-download {
- padding: 4px 8px 4px 4px;
- height: 32px !important;
- min-height: 40px !important;
+richlistitem[type="download"] {
+  padding: 4px 8px 4px 4px;
+  min-height: 46px !important;
 }
 
-download[selected="true"] {
-    background-color: Highlight !important;
-    color: HighlightText;
-    background-image: none !important;
+richlistitem[type="download"] .name {
+  font-size: larger;
 }
 
-download[state="0"], download[state="-1"], download[state="4"] {
-  font: icon !important;
-  padding-bottom: 7px;
-  padding-top: 7px;
-  min-height: 80px !important;
-  background: url("chrome://mozapps/skin/downloads/background-gradient.gif") repeat;
+richlistitem[type="download"] button {
+  -moz-appearance: none;
+  min-height: 16px;
+  min-width: 16px;
+  max-height: 16px;
+  max-width: 16px;
+  padding: 0;
+  margin: 0 1px 0 1px;
 }
 
-vbox:first-child > label:last-child, hbox:last-child > label:last-child {
-  color: #666666;
-  font-size: 95%;
+#information {
+  -moz-appearance: none;
+  background-color: white;
+  width: 300px;
+  max-width: 300px;
 }
 
-download[selected="true"] vbox:first-child > label:last-child,
-download[selected="true"] hbox:last-child > label:last-child {
-  color: HighlightText;
+#information > button {
+  -moz-appearance: none;
+  margin: 0;
+  padding: 0;
+  width: 300px;
+}
+
+#information > button .button-text {
+  -moz-box-flex: 1;
+  text-align: left;
 }
 
-/* Download View Items, implementation */
-progressmeter {
-  margin: 6px 6px 4px 6px;
-  min-height:19px;
-  -moz-appearance: none;
+/**
+ * Images for buttons in the interface
+ */
+richlistitem[type="download"] button,
+#information-uri,
+#information-location {
+  list-style-image: url(chrome://mozapps/skin/downloads/buttons.png);
+}
+.cancel {
+  -moz-image-region: rect(0px, 32px, 16px, 16px);
 }
-
-.progress-bar {
-  background: url("chrome://mozapps/skin/downloads/progress-bar.gif") repeat-x !important;
-  border-left: 1px solid #D9D9D9 !important;
+.info {
+  -moz-image-region: rect(0px, 16px, 16px, 0px);
+}
+.open {
+  -moz-image-region: rect(16px, 32px, 32px, 16px);
 }
-
-download[state="4"] .progress-bar {
-  background: url("chrome://mozapps/skin/downloads/progress-bar-paused.gif") repeat-x !important;
+.pause {
+  -moz-image-region: rect(32px, 32px, 48px, 16px);
+}
+.resume {
+  -moz-image-region: rect(16px, 48px, 32px, 32px);
+}
+.retry {
+  -moz-image-region: rect(0px, 48px, 16px, 32px);
 }
 
-.progress-remainder {
-  background: url("chrome://mozapps/skin/downloads/progress-remainder.gif") repeat-x !important;
-  border-right: 1px solid #DEDEDE !important;
+#information-uri {
+  -moz-image-region: rect(16px, 16px, 32px, 0px);
 }
-
-label {
-  border: none !important;
+#information-location {
+  -moz-image-region: rect(32px, 16px, 48px, 0px);
 }
 
-dialog label {
-	color: #000000 !important;
-	font-size: 100% !important;
-    font: icon;
+/* prevent flickering when changing states */
+.downloadTypeIcon {
+  min-height: 32px;
+  min-width: 32px;
 }
-
-#saveToFolder .toolbarbutton-text {
-  text-align: left;
-  margin-left: 5px !important;
-  border: 1px solid transparent !important;
-}
-
-#saveToFolder:focus .toolbarbutton-text {
-  border: 1px solid -moz-mac-focusring !important;
-}
deleted file mode 100644
--- a/toolkit/themes/pinstripe/mozapps/downloads/downloads.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-
-<bindings id="downloadSkinBindings"
-          xmlns="http://www.mozilla.org/xbl"
-          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-          xmlns:xbl="http://www.mozilla.org/xbl">
-
-  <binding id="download-view" extends="chrome://mozapps/content/downloads/download.xml#download-view">
-    <content>
-      <xul:vbox flex="1" class="downloadViewInner1">
-        <xul:vbox flex="1" class="downloadViewInner2">
-          <children/>
-        </xul:vbox>
-      </xul:vbox>
-    </content>
-  </binding>
- 
-</bindings>
-
deleted file mode 100644
index 9f77291c0476ef020b82c33fa329ed33c9dd3fd0..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 91bc2fedc11d52069d8ac8c07d85d64249ae40a8..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 4b6356ed20251cb67a5853ef2b9656c39b597bb6..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/toolkit/themes/pinstripe/mozapps/jar.mn
+++ b/toolkit/themes/pinstripe/mozapps/jar.mn
@@ -1,21 +1,15 @@
 classic.jar:
 % skin mozapps classic/1.0 %skin/classic/mozapps/
 #ifndef MINIMO
-  skin/classic/mozapps/downloads/progress-bar-paused.gif          (downloads/progress-bar-paused.gif)
-  skin/classic/mozapps/downloads/progress-bar.gif                 (downloads/progress-bar.gif)
-  skin/classic/mozapps/downloads/progress-remainder.gif           (downloads/progress-remainder.gif)
-  skin/classic/mozapps/downloads/background-gradient.gif          (downloads/background-gradient.gif)
-  skin/classic/mozapps/downloads/background-stripe.gif            (downloads/background-stripe.gif)
-  skin/classic/mozapps/downloads/download-inprogress.png          (downloads/download-inprogress.png)
+  skin/classic/mozapps/downloads/buttons.png                      (downloads/buttons.png)
   skin/classic/mozapps/downloads/downloadIcon.png                 (downloads/downloadIcon.png)
   skin/classic/mozapps/downloads/downloads.css                    (downloads/downloads.css)
   skin/classic/mozapps/downloads/unknownContentType.css           (downloads/unknownContentType.css)
-  skin/classic/mozapps/downloads/downloads.xml                    (downloads/downloads.xml)
   skin/classic/mozapps/extensions/extensionItem.png               (extensions/extensionItem.png)
   skin/classic/mozapps/extensions/itemDisabledFader.png           (extensions/itemDisabledFader.png)
   skin/classic/mozapps/extensions/itemEnabledFader.png            (extensions/itemEnabledFader.png)
   skin/classic/mozapps/extensions/notifyBadges.png                (extensions/notifyBadges.png)
   skin/classic/mozapps/extensions/question.png                    (extensions/question.png)
   skin/classic/mozapps/extensions/themeGeneric.png                (extensions/themeGeneric.png)
   skin/classic/mozapps/extensions/viewButtons.png                 (extensions/viewButtons.png)
   skin/classic/mozapps/extensions/about.css                       (extensions/about.css)
new file mode 100644
index 0000000000000000000000000000000000000000..e834d071d73b89405b1337c6baa7a821950ab9c9
GIT binary patch
literal 5494
zc$`gG2|QF$`yNJP8(YK-vSmprGxnXag%(jLOSX_Ai7Z(LF_c|JA*0fsEEUNz!&tIT
zl&C3VC`)7;ni;d)|CGM}_nqJG%-nPD@4n}G&w0-CzVE$y^vD4bAz2|12qfa@VC%~L
zNBrpm5bm!BFC!BK+F|Z!i#i@x9>4+sOTy7V4?qAAfRYiYh(E@l;VfMMfR)W;EHrjv
z0RYC)WhJ!ZS0aYVmO$~&r?qdh$87Dp4WUqI2V%+c_~*t$0FZsOXI}iD9oxLr6!_Q`
zG<(zhWFdg7y4?Z-E6VADxsA}XjE0GllY1{PK99{pbATvkeUq9l3VjUv<*W)cCKw6@
z09`IDY$}CpX~c<LlqUdXG>exkfS5^iVelWT2iS}<CT-br1Bd45u-H`E4Av5@p)KI4
zzr$zWUjS(d_=wHXNnbKrJKF8X)ThFkpt#N7GKB1WGMvL<67j^Y0i`Zt`vvA;2xcQ;
zIXTGBKg&|TU2Iem(L*ZJMSM-_UIBg`fMC#E=K*F9eubt@KqsGvK<pwhXpQ{{Rx5i&
zq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em$#6qJkx)x>b1+-)iHJghejLu92~p<CWX6)8UHF=*|ovYtt&97
XbvV-*oj$qoXY6Qq#P)@?U)uixI^@k8
deleted file mode 100644
index e4feff048707c1f9f6ad2db950de7b8323b0543e..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100755
index ba202bc7b85e240405c16af56666e9ac39b6a846..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 84c5062ee9176f63a7bd3adef4455ef71fa2bcd3..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 9a1579381d0a2c37802e482ea4d859d5663ec229..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/toolkit/themes/winstripe/mozapps/downloads/downloads.css
+++ b/toolkit/themes/winstripe/mozapps/downloads/downloads.css
@@ -7,92 +7,86 @@
   margin: 10px 10px 5px 10px;
   border: 2px solid;
   -moz-border-top-colors: ThreeDShadow ThreeDDarkShadow;
   -moz-border-right-colors: ThreeDHighlight ThreeDLightShadow;
   -moz-border-bottom-colors: ThreeDHighlight ThreeDLightShadow;
   -moz-border-left-colors: ThreeDShadow ThreeDDarkShadow;
 }
 
-.downloadViewInner {
-  background-image: url("chrome://mozapps/skin/downloads/viewFader.png");
-  padding: 0px;
-}  
-
-/* Download Manager Command Bar */
-#commandBar {
-  padding: 0px 10px 5px 10px;
+/* Download View Items */
+richlistitem[type="download"] {
+  padding: 4px 8px 4px 4px;
+  min-height: 46px !important;
 }
 
-#cleanUpButton {
-  margin: 0px;
-  list-style-image: url("chrome://mozapps/skin/downloads/downloadCleanup.png");
+richlistitem[type="download"] .name {
+  font-size: larger;
 }
 
-#cleanUpButton .button-icon {
-  margin-top: 0px;
-  margin-bottom: 0px;
-  -moz-margin-start: 0px;
-  -moz-margin-end: 5px;
-}
-
-#cleanUpButton[disabled="true"] {
-  list-style-image: url("chrome://mozapps/skin/downloads/downloadCleanupDisabled.png");
+richlistitem[type="download"] button {
+  -moz-appearance: none;
+  min-height: 16px;
+  min-width: 16px;
+  max-height: 16px;
+  max-width: 16px;
+  padding: 0;
+  margin: 0 1px 0 1px;
 }
 
-#commandBarSeparator {
-  -moz-margin-start: 5px;
+#information {
+  -moz-appearance: none;
+  background-color: white;
+  width: 300px;
+  max-width: 300px;
 }
 
-/* Download View Items */
-download {
-  padding-top: 13px;
-  padding-bottom: 13px;
-  -moz-padding-start: 13px;
-  -moz-padding-end: 10px;
-  min-height: 25px;
-  border-bottom: 1px dotted #C0C0C0;
+#information > button {
+  -moz-appearance: none;
+  margin: 0;
+  padding: 0;
+  width: 300px;
+}
+
+#information > button .button-text {
+  -moz-box-flex: 1;
+  text-align: left;
 }
 
-download[selected="true"] {
-  background-image: url("chrome://mozapps/skin/downloads/downloadSelected.png") !important;
-  border-bottom: 1px dotted #7F9DB9;
+/**
+ * Images for buttons in the interface
+ */
+richlistitem[type="download"] button,
+#information-uri,
+#information-location {
+  list-style-image: url(chrome://mozapps/skin/downloads/buttons.png);
+}
+.cancel {
+  -moz-image-region: rect(0px, 32px, 16px, 16px);
 }
-
-download[state="0"], download[state="-1"], download[state="4"], 
-download[state="5"], download[state="6"] {
-  background-color: transparent;
-  background-image: url("chrome://mozapps/skin/downloads/downloadFader.png");
+.info {
+  -moz-image-region: rect(0px, 16px, 16px, 0px);
+}
+.open {
+  -moz-image-region: rect(16px, 32px, 32px, 16px);
 }
-
-/* Download View Items, implementation */
-.downloadContentBox {
-  opacity: 0.0;
+.pause {
+  -moz-image-region: rect(32px, 32px, 48px, 16px);
 }
-
-.downloadContentBox[animated="true"] {
-  opacity: 1.0;
+.resume {
+  -moz-image-region: rect(16px, 48px, 32px, 32px);
+}
+.retry {
+  -moz-image-region: rect(0px, 48px, 16px, 32px);
 }
 
-.downloadTypeIcon {
-  -moz-margin-end: 10px;
+#information-uri {
+  -moz-image-region: rect(16px, 16px, 32px, 0px);
 }
-
-#folderIcon {
-  width: 16px;
-  height: 16px;  
+#information-location {
+  -moz-image-region: rect(32px, 16px, 48px, 0px);
 }
 
-#folderName {
-  width: 0px;
+/* prevent flickering when changing states */
+.downloadTypeIcon {
+  min-height: 32px;
+  min-width: 32px;
 }
-
-#saveToFolder {
-  padding-top: 1px;
-  padding-bottom: 3px;
-  -moz-padding-start: 5px;
-  -moz-padding-end: 6px;
-}
-
-#saveToFolder .toolbarbutton-text {
-  text-align: left;
-  -moz-margin-start: 5px !important;
-}
deleted file mode 100644
--- a/toolkit/themes/winstripe/mozapps/downloads/downloads.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-
-<bindings id="downloadSkinBindings"
-          xmlns="http://www.mozilla.org/xbl"
-          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-          xmlns:xbl="http://www.mozilla.org/xbl">
-
-  <binding id="download-view" extends="chrome://mozapps/content/downloads/download.xml#download-view">
-    <content>
-      <xul:vbox flex="1" class="downloadViewInner">
-        <children/>
-      </xul:vbox>
-    </content>
-  </binding>
- 
-</bindings>
-
deleted file mode 100644
index f76bd72c094403d3fd880cdaf4f6a4a07ac45f5c..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 500425175d84e9bc2cc10c4e4c964fc1bf2854d9..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/toolkit/themes/winstripe/mozapps/jar.mn
+++ b/toolkit/themes/winstripe/mozapps/jar.mn
@@ -1,20 +1,15 @@
 classic.jar:
 % skin mozapps classic/1.0 %skin/classic/mozapps/
 #ifndef MINIMO
+        skin/classic/mozapps/downloads/buttons.png                    (downloads/buttons.png)
         skin/classic/mozapps/downloads/downloadIcon.png               (downloads/downloadIcon.png)
-        skin/classic/mozapps/downloads/downloadCleanup.png            (downloads/downloadCleanup.png)
-        skin/classic/mozapps/downloads/downloadCleanupDisabled.png    (downloads/downloadCleanupDisabled.png)
         skin/classic/mozapps/downloads/downloads.css                  (downloads/downloads.css)
-        skin/classic/mozapps/downloads/downloads.xml                  (downloads/downloads.xml)
-        skin/classic/mozapps/downloads/downloadsBG.png                (downloads/downloadsBG.png)
-        skin/classic/mozapps/downloads/downloadSelected.png           (downloads/downloadSelected.png)
         skin/classic/mozapps/downloads/unknownContentType.css         (downloads/unknownContentType.css)
-        skin/classic/mozapps/downloads/viewFader.png                  (downloads/viewFader.png)
         skin/classic/mozapps/extensions/about.css                     (extensions/about.css)
         skin/classic/mozapps/extensions/actionbuttons.png             (extensions/actionbuttons.png)
         skin/classic/mozapps/extensions/extensions.css                (extensions/extensions.css)
         skin/classic/mozapps/extensions/itemDisabledFader.png         (extensions/itemDisabledFader.png)
         skin/classic/mozapps/extensions/itemEnabledFader.png          (extensions/itemEnabledFader.png)
         skin/classic/mozapps/extensions/notifyBadges.png              (extensions/notifyBadges.png)
         skin/classic/mozapps/extensions/question.png                  (extensions/question.png)
         skin/classic/mozapps/extensions/update.css                    (extensions/update.css)