Bug 394546 - "Paused retried downloads keep updating status" [p=edilee@gmail.com (Edward Lee [Mardak]) r=sdwilsh a1.9=mconnor]

This commit is contained in:
reed%reedloden.com 2007-09-19 06:06:34 +00:00
Родитель ff58867654
Коммит 86af6ecafb
1 изменённых файлов: 14 добавлений и 8 удалений

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

@ -227,10 +227,14 @@ function resumeDownload(aDownload)
function removeDownload(aDownload)
{
removeFromView(aDownload);
gDownloadManager.removeDownload(aDownload.getAttribute("dlid"));
let index = gDownloadsView.selectedIndex;
gDownloadsView.removeChild(aDownload);
gDownloadsView.selectedIndex = Math.min(index, gDownloadsView.itemCount - 1);
}
function retryDownload(aDownload)
{
removeFromView(aDownload);
gDownloadManager.retryDownload(aDownload.getAttribute("dlid"));
}
function showDownload(aDownload)
@ -359,11 +363,6 @@ function showDownloadInfo(aDownload)
gDownloadInfoPopup.openPopup(button, "after_end", 0, 0, false, false);
}
function retryDownload(aDownload)
{
gDownloadManager.retryDownload(aDownload.getAttribute("dlid"));
}
function copySourceLocation(aDownload)
{
var uri = aDownload.getAttribute("uri");
@ -663,6 +662,13 @@ function openExternal(aFile)
///////////////////////////////////////////////////////////////////////////////
//// Utility functions
function removeFromView(aDownload)
{
let index = gDownloadsView.selectedIndex;
gDownloadsView.removeChild(aDownload);
gDownloadsView.selectedIndex = Math.min(index, gDownloadsView.itemCount - 1);
}
/**
* Builds the default view that the download manager starts out with.
*/