X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6dc2e8233023023f7e3ced53be717bc61e9888ca..fc32630a5e03e60a67d4ef53fc59985ea087b451:/src/common/fldlgcmn.cpp?ds=sidebyside diff --git a/src/common/fldlgcmn.cpp b/src/common/fldlgcmn.cpp index 71c0a977ce..7c6e7fda2c 100644 --- a/src/common/fldlgcmn.cpp +++ b/src/common/fldlgcmn.cpp @@ -35,8 +35,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxFileDialogBase, wxDialog) void wxFileDialogBase::Init() { - m_filterIndex = + m_filterIndex = 0; m_windowStyle = 0; + m_extraControl = NULL; + m_extraControlCreator = NULL; } bool wxFileDialogBase::Create(wxWindow *parent, @@ -149,6 +151,23 @@ wxString wxFileDialogBase::AppendExtension(const wxString &filePath, return filePath + ext; } +bool wxFileDialogBase::SetExtraControlCreator(ExtraControlCreatorFunction c) +{ + wxCHECK_MSG( !m_extraControlCreator, false, + "wxFileDialog::SetExtraControl() called second time" ); + + m_extraControlCreator = c; + return SupportsExtraControl(); +} + +bool wxFileDialogBase::CreateExtraControl() +{ + if (!m_extraControlCreator || m_extraControl) + return false; + m_extraControl = (*m_extraControlCreator)(this); + return true; +} + //---------------------------------------------------------------------------- // wxFileDialog convenience functions //----------------------------------------------------------------------------