git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39527
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// wxGenericFileButton
// ----------------------------------------------------------------------------
// wxGenericFileButton
// ----------------------------------------------------------------------------
-static wxString s_message, s_wildcard;
-
bool wxGenericFileDirButton::Create( wxWindow *parent, wxWindowID id,
const wxString &label, const wxString &path,
const wxString &message, const wxString &wildcard,
bool wxGenericFileDirButton::Create( wxWindow *parent, wxWindowID id,
const wxString &label, const wxString &path,
const wxString &message, const wxString &wildcard,
// create the dialog associated with this button
m_path = path;
// create the dialog associated with this button
m_path = path;
- s_message = message;
- s_wildcard = wildcard;
-
- m_dialog = NULL;
- return true;
+ return CreateDialog(message, wildcard);
}
void wxGenericFileDirButton::OnButtonClick(wxCommandEvent& WXUNUSED(ev))
{
}
void wxGenericFileDirButton::OnButtonClick(wxCommandEvent& WXUNUSED(ev))
{
- CreateDialog(s_message, s_wildcard);
-
if (m_dialog->ShowModal() == wxID_OK)
{
// save the path
if (m_dialog->ShowModal() == wxID_OK)
{
// save the path
wxFileDirPickerEvent event(GetEventType(), this, GetId(), m_path);
GetEventHandler()->ProcessEvent(event);
}
wxFileDirPickerEvent event(GetEventType(), this, GetId(), m_path);
GetEventHandler()->ProcessEvent(event);
}
}
#endif // wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL
}
#endif // wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL