From 3147da3bb5611d63636a998c2aca806c524b5111 Mon Sep 17 00:00:00 2001 From: "pavlov%netscape.com" Date: Fri, 31 Mar 2000 04:19:59 +0000 Subject: [PATCH] few more changes --- .../filepicker/res/content/filepicker.js | 34 +------------------ .../filepicker/res/content/filepicker.xul | 2 +- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/xpfe/components/filepicker/res/content/filepicker.js b/xpfe/components/filepicker/res/content/filepicker.js index 65f5ac9379d..e5db3a0ebef 100644 --- a/xpfe/components/filepicker/res/content/filepicker.js +++ b/xpfe/components/filepicker/res/content/filepicker.js @@ -100,7 +100,7 @@ function onOK() if (isFile) { retvals.directory = file.parent.path; ret = nsIFilePicker.returnOK; - } else if (isDirectory) { + } else if (isDir) { if (!sfile.equals(file)) { gotoDirectory(file.path); } @@ -338,35 +338,3 @@ function gotoDirectory(directoryName) { sfile.normalize(); loadDirectory(); } - - - -function textEntered(name) { - var file = Components.classes[nsILocalFile_PROGID].createInstance(nsILocalFile); - file.initWithPath(name); - dump("*** " + file + "\n*** " + file.path + "\n"); - if (file.exists()) { - if (file.isDirectory()) { - if (!sfile.equals(file)) { - gotoDirectory(name); - } - return; - } else if (file.isFile()) { - retvals.file = file; - window.close(); - } - } else { - /* look for something in our current directory */ - var nfile = sfile.clone(); - nfile.append(file.path); - dump(nfile.path); - if (nfile.isFile()) { - retvals.file = nfile; - window.close(); - } else if (nfile.isDirectory()) { - gotoDirectory(nfile.path); - } else { - dump("can't find file \"" + nfile.path + "\""); - } - } -} diff --git a/xpfe/components/filepicker/res/content/filepicker.xul b/xpfe/components/filepicker/res/content/filepicker.xul index 5a8fda17c58..f7460db6d69 100644 --- a/xpfe/components/filepicker/res/content/filepicker.xul +++ b/xpfe/components/filepicker/res/content/filepicker.xul @@ -41,7 +41,7 @@ - +