git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36098
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
parentWindow = wxTheApp->GetTopWindow();
wxString str = wxGetTextFromUser(m_message, _("File"), m_fileName, parentWindow);
- if (str)
- {
- m_fileName = str;
- m_fileNames.Add(str);
- return wxID_OK;
- }
- else
- {
+ if (str.empty())
return wxID_CANCEL;
- }
+
+ m_fileName = str;
+ m_fileNames.Add(str);
+ return wxID_OK;
}
void wxFileDialog::GetFilenames(wxArrayString& files) const
wxFFileInputStream stream(filename);
if (stream.Ok())
return LoadFile(buffer, stream);
- else
- return false;
+
+ return false;
}
bool wxRichTextFileHandler::SaveFile(wxRichTextBuffer *buffer, const wxString& filename)
wxFFileOutputStream stream(filename);
if (stream.Ok())
return SaveFile(buffer, stream);
- else
- return false;
+
+ return false;
}
#endif // wxUSE_STREAMS