if (response == GTK_RESPONSE_ACCEPT)
gtk_filedialog_ok_callback(w, dialog);
- else
+ else if (response == GTK_RESPONSE_CANCEL)
+ gtk_filedialog_cancel_callback(w, dialog);
+ else // "delete"
+ {
gtk_filedialog_cancel_callback(w, dialog);
+ dialog->m_destroyed_by_delete = TRUE;
+ }
}
//-----------------------------------------------------------------------------
wildCard, style, pos)
{
m_needParent = FALSE;
+ m_destroyed_by_delete = FALSE;
if (!PreCreation(parent, pos, wxDefaultSize) ||
!CreateBase(parent, wxID_ANY, pos, wxDefaultSize, style,
wxFileDialog::~wxFileDialog()
{
+ if (m_destroyed_by_delete)
+ m_widget = NULL;
}
void wxFileDialog::GetFilenames(wxArrayString& files) const