void wxGenericFileDirButton::OnButtonClick(wxCommandEvent& WXUNUSED(ev)) { wxScopedPtr<wxDialog> p(CreateDialog()); if (p->ShowModal() == wxID_OK) { // save updated path in m_path UpdatePathFromDialog(p.get()); // fire an event wxFileDirPickerEvent event(GetEventType(), this, GetId(), m_path); GetEventHandler()->ProcessEvent(event); } }
void wxFileButton::OnDialogOK(wxCommandEvent& ev) { // the wxFileDialog associated with the GtkFileChooserButton has been closed // using the OK button, thus the selected file has changed... if (ev.GetId() == wxID_OK) { // ...update our path UpdatePathFromDialog(m_dialog); // ...and fire an event wxFileDirPickerEvent event(wxEVT_COMMAND_FILEPICKER_CHANGED, this, GetId(), m_path); HandleWindowEvent(event); } }