X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/89654c9a49d71c031a9c6319ef75dcb7c546341c..539fb7a26cb7caadea92a88fc82c417f29140b0f:/src/msw/filedlg.cpp?ds=sidebyside diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index 0e78e0168f..8677731279 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -157,13 +157,12 @@ int wxFileDialog::ShowModal() { msw_flags |= OFN_NOCHANGEDIR; } -/* chris elliott for some reason this does not work usefully if no extension - is given, as it test for junk instead of junk.ext + if ( m_dialogStyle & wxOVERWRITE_PROMPT ) { msw_flags |= OFN_OVERWRITEPROMPT; } -*/ + OPENFILENAME of; wxZeroMemory(of); @@ -368,18 +367,6 @@ int wxFileDialog::ShowModal() m_fileNames.Add(m_fileName); m_dir = wxPathOnly(fileNameBuffer); } - //=== Simulating the wxOVERWRITE_PROMPT >>============================ - //should we also test for file save style ?? - if ( (m_dialogStyle & wxOVERWRITE_PROMPT) && - ::wxFileExists( fileNameBuffer ) ) - { - wxString messageText; - messageText.Printf(_("File '%s' already exists.\nDo you want to replace it?"), fileNameBuffer); - if ( wxMessageBox(messageText, _("Save File As"), wxYES_NO | wxICON_EXCLAMATION ) != wxYES ) - { - success = FALSE; - } - } } else {