#pragma hdrstop
#endif
-#if wxUSE_FILEDLG && !wxUSE_SMARTPHONE
+#if wxUSE_FILEDLG && !defined(__SMARTPHONE__)
#ifndef WX_PRECOMP
#include "wx/utils.h"
}
}
+void wxFileDialog::GetFilenames(wxArrayString& files) const
+{
+ files = m_fileNames;
+}
+
void wxFileDialog::SetPath(const wxString& path)
{
wxString ext;
*fileNameBuffer = wxT('\0');
*titleBuffer = wxT('\0');
+#if WXWIN_COMPATIBILITY_2_4
long msw_flags = 0;
if ( (m_dialogStyle & wxHIDE_READONLY) || (m_dialogStyle & wxSAVE) )
msw_flags |= OFN_HIDEREADONLY;
+#else
+ long msw_flags = OFN_HIDEREADONLY;
+#endif
+
if ( m_dialogStyle & wxFILE_MUST_EXIST )
msw_flags |= OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;
{
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);
dir += _T('\\');
m_path = dir + m_fileName;
+ m_filterIndex = (int)of.nFilterIndex - 1;
}
else
{
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
{