X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/449110cd746414d5f77db428babe20b84720c73a..dd9f8b6bb6935360a8271dc3e8749fb026b601a8:/src/msw/wince/filedlgwce.cpp diff --git a/src/msw/wince/filedlgwce.cpp b/src/msw/wince/filedlgwce.cpp index 218f15e5dc..20dbe03368 100644 --- a/src/msw/wince/filedlgwce.cpp +++ b/src/msw/wince/filedlgwce.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: src/msw/wince/filedlgwce.cpp -// Purpose: wxFileDialog for WinCE (SmartPhone) +// Purpose: wxFileDialog implementation for smart phones driven by WinCE // Author: Julian Smart // Modified by: // Created: 01/02/97 @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma implementation "filedlg.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -31,13 +27,14 @@ // Only use this for MS SmartPhone. Use standard file dialog // for Pocket PC. -#if wxUSE_FILEDLG && wxUSE_SMARTPHONE +#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" @@ -71,12 +68,14 @@ wxFileDialog::wxFileDialog(wxWindow *parent, 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; @@ -116,19 +115,19 @@ int wxFileDialog::ShowModal() wxWindow* parentWindow = GetParent(); if (!parentWindow) 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; } -#endif // wxUSE_FILEDLG +void wxFileDialog::GetFilenames(wxArrayString& files) const +{ + files = m_fileNames; +} +#endif // wxUSE_FILEDLG && __SMARTPHONE__ && __WXWINCE__