From 994e29084969b05bbbae7b33b3e9dfef8b218514 Mon Sep 17 00:00:00 2001 From: "mgalli%geckonnection.com" Date: Tue, 14 Feb 2006 16:57:14 +0000 Subject: [PATCH] Fixes to the Set Folder. --- minimo/chrome/content/preferences/preferences.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/minimo/chrome/content/preferences/preferences.js b/minimo/chrome/content/preferences/preferences.js index bb0f99c99ce..2a2665501f7 100644 --- a/minimo/chrome/content/preferences/preferences.js +++ b/minimo/chrome/content/preferences/preferences.js @@ -163,6 +163,7 @@ function downloadChooseFolder() { var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); var refLocalFile = Components.classes["@mozilla.org/file/local;1"].createInstance(nsIFile ); fp.init(window, null, nsIFilePicker.modeSave); + fp.defaultString="save_file_here"; const nsILocalFile = Components.interfaces.nsILocalFile; var customDirPref = document.getElementById("downloadDir"); @@ -173,12 +174,14 @@ function downloadChooseFolder() { fp.displayDirectory = fileCustomDirFile; } fp.appendFilters(nsIFilePicker.filterAll); + var returnFilePickerValue=fp.show(); + if (returnFilePickerValue == nsIFilePicker.returnOK) { var file = fp.file.QueryInterface(nsILocalFile); - var filepath = fp.file.QueryInterface(nsIFile); + var currentDirPref = document.getElementById("downloadDir"); - customDirPref.value = currentDirPref.value = file.path; + customDirPref.value = currentDirPref.value = file.parent.path; } }