mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-23 21:17:52 +00:00
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:
parent
8496ff8efa
commit
96121b6b47
@ -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.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user