mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
fix for 34651 r=sfraser a=leaf
This commit is contained in:
parent
1ad23c1543
commit
5dd14170f8
@ -150,7 +150,12 @@ NS_IMETHODIMP nsFilePicker::Show(PRInt16 *retval)
|
||||
mFile.Append(fileBuffer);
|
||||
}
|
||||
|
||||
return((PRBool)result);
|
||||
if (result)
|
||||
*retval = returnOK;
|
||||
else
|
||||
*retval = returnCancel;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
@ -222,7 +227,10 @@ NS_IMETHODIMP nsFilePicker::AppendFilter(const PRUnichar *aTitle,
|
||||
|
||||
NS_IMETHODIMP nsFilePicker::GetFile(nsILocalFile **aFile)
|
||||
{
|
||||
/*NS_ENSURE_ARG_POINTER(*aFile); */
|
||||
NS_ENSURE_ARG_POINTER(aFile);
|
||||
|
||||
if (mFile.IsEmpty())
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsILocalFile> file(do_CreateInstance("component://mozilla/file/local"));
|
||||
|
||||
|
@ -713,9 +713,9 @@ function RevealSearchPanel()
|
||||
var fp = Components.classes["component://mozilla/filepicker"].createInstance(nsIFilePicker);
|
||||
fp.init(window, bundle.GetStringFromName("openFile"), nsIFilePicker.modeOpen);
|
||||
fp.setFilters(nsIFilePicker.filterAll);
|
||||
fp.show();
|
||||
|
||||
openNewWindowWith(fp.fileURL.spec);
|
||||
if (fp.show() == nsIFilePicker.returnOK) {
|
||||
openNewWindowWith(fp.fileURL.spec);
|
||||
}
|
||||
} catch (ex) { }
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user