#if wxUSE_FILEDLG && defined(__SMARTPHONE__) && defined(__WXWINCE__)
+#include "wx/filedlg.h"
+
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/msgdlg.h"
#include "wx/dialog.h"
- #include "wx/filedlg.h"
#include "wx/filefn.h"
#include "wx/intl.h"
#include "wx/log.h"
const wxString& defaultFileName,
const wxString& wildCard,
long style,
- const wxPoint& WXUNUSED(pos))
+ const wxPoint& WXUNUSED(pos),
+ const wxSize& WXUNUSED(sz),
+ const wxString& WXUNUSED(name))
{
m_message = message;
- m_dialogStyle = style;
- if ( ( m_dialogStyle & wxMULTIPLE ) && ( m_dialogStyle & wxSAVE ) )
- m_dialogStyle &= ~wxMULTIPLE;
+ m_windowStyle = style;
+ if ( ( m_windowStyle & wxFD_MULTIPLE ) && ( m_windowStyle & wxFD_SAVE ) )
+ m_windowStyle &= ~wxFD_MULTIPLE;
m_parent = parent;
m_path = wxEmptyString;
m_fileName = defaultFileName;
paths.Empty();
wxString dir(m_dir);
- if ( m_dir.Last() != _T('\\') )
- dir += _T('\\');
+ if ( m_dir.Last() != wxT('\\') )
+ dir += wxT('\\');
size_t count = m_fileNames.GetCount();
for ( size_t n = 0; n < count; n++ )
void wxFileDialog::SetPath(const wxString& path)
{
wxString ext;
- wxSplitPath(path, &m_dir, &m_fileName, &ext);
+ wxFileName::SplitPath(path, &m_dir, &m_fileName, &ext);
if ( !ext.empty() )
- m_fileName << _T('.') << ext;
+ m_fileName << wxT('.') << ext;
}
int wxFileDialog::ShowModal()
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