X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dcf924a345ea8ffbc1cf6b40b5f75c6005e504c0..da4b7ffc783b90227e05df7484121c5435ae8985:/src/gtk1/filedlg.cpp diff --git a/src/gtk1/filedlg.cpp b/src/gtk1/filedlg.cpp index 7513762b20..f2c2c99011 100644 --- a/src/gtk1/filedlg.cpp +++ b/src/gtk1/filedlg.cpp @@ -116,7 +116,13 @@ wxFileDialog::wxFileDialog( wxWindow *parent, const wxString& message, { m_needParent = FALSE; - PreCreation( parent, -1, pos, wxDefaultSize, style | wxDIALOG_MODAL, "filedialog" ); + if (!PreCreation( parent, pos, wxDefaultSize ) || + !CreateBase( parent, -1, pos, wxDefaultSize, style | wxDIALOG_MODAL, wxDefaultValidator, _T("filedialog") )) + { + wxFAIL_MSG( _T("wxXX creation failed") ); + return; + } + m_message = message; m_path = _T(""); m_fileName = defaultFileName; @@ -165,7 +171,11 @@ void wxFileDialog::SetPath(const wxString& path) { wxString ext; wxSplitPath(path, &m_dir, &m_fileName, &ext); - m_fileName += ext; + if (!ext.IsEmpty()) + { + m_fileName += _T("."); + m_fileName += ext; + } } }