Chnaged over to new way of getting file urls

git-svn-id: svn://10.0.0.236/trunk@26585 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rods%netscape.com
1999-04-06 23:03:30 +00:00
parent b60b9cf5ae
commit 85f6ce34ad

View File

@@ -861,20 +861,29 @@ nsBrowserAppCore::OpenWindow()
fileWidget->SetFilterList(5, titles, filters);
fileWidget->Create(nsnull, title, eMode_load, nsnull, nsnull);
PRBool result = fileWidget->Show();
#if 0 // Old way
nsAutoString fileURL;
PRBool result = fileWidget->Show();
if (result) {
nsString fileName;
nsString dirName;
fileWidget->GetFile(fileName);
nsAutoString fileURL;
BuildFileURL(nsAutoCString(fileName), fileURL);
printf("If I could open a new window with [%s] I would.\n", (const char *)nsAutoCString(fileURL));
}
printf("If I could open a new window with [%s] I would.\n", (const char *)nsAutoCString(fileURL));
#else // New Way
nsFileSpec fileSpec;
fileWidget->GetFile(fileSpec);
nsFileURL fileURL(fileSpec);
printf("If I could open a new window with [%s] I would.\n", (const char *)nsAutoCString(fileURL.GetAsString()));
#endif
NS_RELEASE(fileWidget);
return NS_OK;
return NS_OK;
}
//----------------------------------------