Bug 810048 - Show filename as title for downloads. r=mleibovic

This commit is contained in:
Wes Johnston 2012-11-12 09:38:34 -08:00
parent c783ddb78e
commit 12a4eadc8a
2 changed files with 5 additions and 8 deletions

View File

@ -80,8 +80,6 @@ var Downloads = {
}
};
if (!aTitle)
aTitle = Strings.browser.GetStringFromName("alertDownloads");
if (!aIcon)
aIcon = URI_GENERIC_ICON_DOWNLOAD;
@ -94,7 +92,7 @@ var Downloads = {
let download = aSubject.QueryInterface(Ci.nsIDownload);
let msgKey = "";
if (aTopic == "dl-start") {
msgKey = "alertDownloadsStart";
msgKey = "alertDownloadsStart2";
if (!this._progressAlert) {
if (!this._dlmgr)
this._dlmgr = Cc["@mozilla.org/download-manager;1"].getService(Ci.nsIDownloadManager);
@ -104,11 +102,11 @@ var Downloads = {
NativeWindow.toast.show(Strings.browser.GetStringFromName("alertDownloadsToast"), "long");
} else if (aTopic == "dl-done") {
msgKey = "alertDownloadsDone";
msgKey = "alertDownloadsDone2";
}
if (msgKey)
this.showAlert(download, Strings.browser.formatStringFromName(msgKey, [download.displayName], 1));
this.showAlert(download, Strings.browser.GetStringFromName(msgKey), download.displayName);
},
QueryInterface: function (aIID) {

View File

@ -13,9 +13,8 @@ alertAddonsInstalled=Installation complete. Restart required.
alertAddonsInstalledNoRestart=Installation complete
alertAddonsFail=Installation failed
alertDownloads=Downloads
alertDownloadsStart=Downloading: %S
alertDownloadsDone=%S has finished downloading
alertDownloadsStart2=Download starting
alertDownloadsDone2=Download complete
alertCantOpenDownload=Can't open file. Tap to save it.
alertDownloadsSize=Download too big
alertDownloadsNoSpace=Not enough storage space