Bug 245829: update download manager title bar when number of active downloads changes; r=mconnor

This commit is contained in:
gandalf%firefox.pl 2005-03-21 16:18:25 +00:00
Родитель 85014169e2
Коммит bab9cbf69e
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -412,6 +412,7 @@ function onDownloadRetry(aEvent)
// 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;
@ -445,8 +446,10 @@ function onUpdateProgress()
mean = Math.floor((mean / base) * 100);
}
if (gLastComputedMean == -1 || mean != gLastComputedMean) {
if (mean != gLastComputedMean || gLastActiveDownloads != numActiveDownloads) {
gLastComputedMean = mean;
gLastActiveDownloads = numActiveDownloads;
var strings = document.getElementById("downloadStrings");
var title;