зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
ff58867654
Коммит
86af6ecafb
|
@ -227,10 +227,14 @@ function resumeDownload(aDownload)
|
||||||
|
|
||||||
function removeDownload(aDownload)
|
function removeDownload(aDownload)
|
||||||
{
|
{
|
||||||
|
removeFromView(aDownload);
|
||||||
gDownloadManager.removeDownload(aDownload.getAttribute("dlid"));
|
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)
|
function showDownload(aDownload)
|
||||||
|
@ -359,11 +363,6 @@ function showDownloadInfo(aDownload)
|
||||||
gDownloadInfoPopup.openPopup(button, "after_end", 0, 0, false, false);
|
gDownloadInfoPopup.openPopup(button, "after_end", 0, 0, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function retryDownload(aDownload)
|
|
||||||
{
|
|
||||||
gDownloadManager.retryDownload(aDownload.getAttribute("dlid"));
|
|
||||||
}
|
|
||||||
|
|
||||||
function copySourceLocation(aDownload)
|
function copySourceLocation(aDownload)
|
||||||
{
|
{
|
||||||
var uri = aDownload.getAttribute("uri");
|
var uri = aDownload.getAttribute("uri");
|
||||||
|
@ -663,6 +662,13 @@ function openExternal(aFile)
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
//// Utility functions
|
//// 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.
|
* Builds the default view that the download manager starts out with.
|
||||||
*/
|
*/
|
||||||
|
|
Загрузка…
Ссылка в новой задаче