changes to make nsIFileSpecWithUI useful from javascript.

now, this works from js:

var filePicker = Components.classes["component://netscape/filespecwithui"].createInstance();
filePicker = filePicker.QueryInterface(Components.interfaces.nsIFileSpecWithUI);
file = filePicker.chooseFile("Select a file");
This commit is contained in:
sspitzer%netscape.com 1999-07-31 18:45:22 +00:00
Родитель eff2f13b29
Коммит 6857b11132
3 изменённых файлов: 11 добавлений и 0 удалений

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

@ -68,6 +68,7 @@ interface nsIFileSpecWithUI : nsIFileSpec
, in string extraFilterTitle
, in string extraFilter
);
string chooseFile(in string title);
void chooseDirectory(in string title);
};

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

@ -77,6 +77,14 @@ NS_IMETHODIMP nsFileSpecWithUIImpl::chooseOutputFile(
return mBaseFileSpec->setFromFileSpec(spec);
} // nsFileSpecImpl::chooseOutputFile
NS_IMETHODIMP nsFileSpecWithUIImpl::chooseFile(const char *title, char **_retval)
{
nsresult rv = chooseInputFile(title, eAllFiles, nsnull, nsnull);
if (NS_FAILED(rv)) return rv;
rv = GetURLString(_retval);
return rv;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecWithUIImpl::chooseInputFile(
const char *inTitle,

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

@ -37,6 +37,8 @@ class nsFileSpecWithUIImpl
NS_IMETHOD chooseOutputFile(const char *windowTitle, const char *suggestedLeafName);
NS_IMETHOD chooseFile(const char *title, char **_retval);
NS_IMETHOD chooseInputFile(
const char *title,
nsIFileSpecWithUI::StandardFilterMask standardFilterMask,