Bug 733297 - When saving a video from Page Info, the file picker title is 'Save Image'. r=jaws

This commit is contained in:
Raymond Lee 2012-05-21 14:26:18 +08:00
Родитель 650d8c335c
Коммит 2949b453e4
1 изменённых файлов: 10 добавлений и 2 удалений

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

@ -780,8 +780,16 @@ function saveMedia()
var item = getSelectedImage(tree);
var url = gImageView.data[tree.currentIndex][COL_IMAGE_ADDRESS];
if (url)
saveURL(url, null, "SaveImageTitle", false, false, makeURI(item.baseURI));
if (url) {
var titleKey = "SaveImageTitle";
if (item instanceof HTMLVideoElement)
titleKey = "SaveVideoTitle";
else if (item instanceof HTMLAudioElement)
titleKey = "SaveAudioTitle";
saveURL(url, null, titleKey, false, false, makeURI(item.baseURI));
}
}
else {
var odir = selectSaveFolder();