- char *f = wxFileSelector(_("PostScript file"),
- wxPathOnly(wxThePrintSetupData->GetPrinterFile()),
- wxFileNameFromPath(wxThePrintSetupData->GetPrinterFile()),
- "ps", "*.ps", 0, this);
- if (f)
- wxThePrintSetupData->SetPrinterFile(f);
- else
- return;
+ wxString f = wxFileSelector(_("PostScript file"),
+ wxPathOnly(wxThePrintSetupData->GetPrinterFile()),
+ wxFileNameFromPath(wxThePrintSetupData->GetPrinterFile()),
+ "ps", "*.ps", 0, this);
+ if ( f.IsEmpty() )
+ return;
+
+ wxThePrintSetupData->SetPrinterFile(f);