Bug 562043 - Set the default save folder to the default download folder [Save PDF] [r=vingtetun]

This commit is contained in:
Mark Finkle 2010-05-04 00:40:34 -04:00
Родитель e73b502b66
Коммит 77653a7da3
1 изменённых файлов: 3 добавлений и 0 удалений

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

@ -1034,6 +1034,9 @@ var PageActions = {
picker.defaultExtension = "pdf";
picker.defaultString = contentWindow.document.title + ".pdf";
let dnldMgr = Cc["@mozilla.org/download-manager;1"].getService(Ci.nsIDownloadManager);
picker.displayDirectory = dnldMgr.defaultDownloadsDirectory;
let rv = picker.show();
if (rv == Ci.nsIFilePicker.returnCancel)
return;