X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..0bbe61b8c18a1795189f0cf73cc61c14a0fb846d:/src/msw/wince/filedlgwce.cpp diff --git a/src/msw/wince/filedlgwce.cpp b/src/msw/wince/filedlgwce.cpp index e0b6acb5d5..20dbe03368 100644 --- a/src/msw/wince/filedlgwce.cpp +++ b/src/msw/wince/filedlgwce.cpp @@ -29,11 +29,12 @@ #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" @@ -67,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; @@ -114,16 +117,12 @@ 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