Fixing bug 240723. Cleaning up nsIFilePicker a bit, no more nsIDOMWindowInternal, and use our string classes and not raw strings. r=caillon@gmail.com, sr=bzbarsky@mit.edu

git-svn-id: svn://10.0.0.236/trunk@155308 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%mozilla.jstenback.com
2004-04-21 23:38:22 +00:00
parent 7016eb5340
commit 0be91628bc
27 changed files with 299 additions and 565 deletions

View File

@@ -272,9 +272,8 @@ nsFileControlFrame::MouseClick(nsIDOMEvent* aMouseEvent)
if (!doc)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMWindowInternal> parentWindow = do_QueryInterface(doc->GetScriptGlobalObject());
if (!parentWindow)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMWindow> parentWindow =
do_QueryInterface(doc->GetScriptGlobalObject());
// Get Loc title
nsString title;
@@ -285,7 +284,7 @@ nsFileControlFrame::MouseClick(nsIDOMEvent* aMouseEvent)
if (!filePicker)
return NS_ERROR_FAILURE;
result = filePicker->Init(parentWindow, title.get(), nsIFilePicker::modeOpen);
result = filePicker->Init(parentWindow, title, nsIFilePicker::modeOpen);
if (NS_FAILED(result))
return result;
@@ -303,7 +302,7 @@ nsFileControlFrame::MouseClick(nsIDOMEvent* aMouseEvent)
nsAutoString leafName;
currentFile->GetLeafName(leafName);
if (!leafName.IsEmpty()) {
filePicker->SetDefaultString(leafName.get());
filePicker->SetDefaultString(leafName);
}
// set directory