Bug 716862 - add virus scan indeterminate mode to the list of taskbar modes displayed when the dl manager is not open. r=felipe.
authorJim Mathies <jmathies@mozilla.com>
Fri, 13 Jan 2012 17:55:01 -0600
changeset 84432 9b2f2f9242531212b0071ff3377fb9c989ee51cd
parent 84431 1feecb1dad1fdfb87dfea3622f7398e135a99d3a
child 84433 254f355a4a9605a1879326ffdc2ac8e0215c35b8
push id21848
push usermak77@bonardo.net
push dateSat, 14 Jan 2012 09:02:20 +0000
treeherdermozilla-central@27a7f197c6fc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs716862
milestone12.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 716862 - add virus scan indeterminate mode to the list of taskbar modes displayed when the dl manager is not open. r=felipe.
toolkit/mozapps/downloads/DownloadTaskbarProgress.jsm
--- a/toolkit/mozapps/downloads/DownloadTaskbarProgress.jsm
+++ b/toolkit/mozapps/downloads/DownloadTaskbarProgress.jsm
@@ -215,29 +215,31 @@ var DownloadTaskbarProgressUpdater =
   _totalTransferred: 0,
 
   /**
    * Update the active window's taskbar indicator with the current state. There
    * are two cases here:
    * 1. If the active window is the download window, then we always update
    *    the taskbar indicator.
    * 2. If the active window isn't the download window, then we update only if
-   *    the status is Normal, i.e. one or more downloads are currently
-   *    progressing. If we aren't, then we clear the indicator.
+   *    the status is normal or indeterminate. i.e. one or more downloads are
+   *    currently progressing or in scan mode. If we aren't, then we clear the
+   *    indicator.
    */
   _updateTaskbar: function DTPU_updateTaskbar()
   {
     if (!this._activeTaskbarProgress) {
       return;
     }
 
     // If the active window is not the download manager window, set the state
-    // only if it is Normal
+    // only if it is normal or indeterminate.
     if (this._activeWindowIsDownloadWindow ||
-        (this._taskbarState == Ci.nsITaskbarProgress.STATE_NORMAL)) {
+        (this._taskbarState == Ci.nsITaskbarProgress.STATE_NORMAL ||
+         this._taskbarState == Ci.nsITaskbarProgress.STATE_INDETERMINATE)) {
       this._activeTaskbarProgress.setProgressState(this._taskbarState,
                                                    this._totalTransferred,
                                                    this._totalSize);
     }
     // Clear any state otherwise
     else {
       this._clearTaskbar();
     }