X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6fa6d65956285379aa1d99b76d92db76aaecf11e..773809f57ce343eaf5134db4a5946e5085d37e6f:/src/common/fldlgcmn.cpp?ds=sidebyside diff --git a/src/common/fldlgcmn.cpp b/src/common/fldlgcmn.cpp index ab3908303e..b621b6a07f 100644 --- a/src/common/fldlgcmn.cpp +++ b/src/common/fldlgcmn.cpp @@ -9,13 +9,13 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + #if wxUSE_FILEDLG #include "wx/filedlg.h" @@ -151,12 +151,12 @@ wxString wxFileDialogBase::AppendExtension(const wxString &filePath, return filePath + ext; } -bool wxFileDialogBase::SetExtraControlCreator(ExtraControlCreatorFunction c) +bool wxFileDialogBase::SetExtraControlCreator(ExtraControlCreatorFunction creator) { wxCHECK_MSG( !m_extraControlCreator, false, "wxFileDialog::SetExtraControl() called second time" ); - m_extraControlCreator = c; + m_extraControlCreator = creator; return SupportsExtraControl(); } @@ -313,7 +313,8 @@ static wxString wxDefaultFileSelector(bool load, } return wxFileSelector(prompt, wxEmptyString, default_name, ext, wild, - load ? wxFD_OPEN : wxFD_SAVE, parent); + load ? (wxFD_OPEN | wxFD_FILE_MUST_EXIST) : wxFD_SAVE, + parent); } //----------------------------------------------------------------------------