From a733492856e139253ef8e912b6a5c23d1a12cf57 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sun, 28 Nov 2004 13:08:26 +0000 Subject: [PATCH] Reverted changes that set m_widget to NULL in native GTK+ dialogs for now. The problem persists, that when quitting the native file dialog with ESC, the dialog will be destroyed twice. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/filedlg.cpp | 7 +++---- src/gtk/msgdlg.cpp | 1 - src/gtk1/filedlg.cpp | 7 +++---- src/gtk1/msgdlg.cpp | 1 - 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp index 6234348501..20bc8b0558 100644 --- a/src/gtk/filedlg.cpp +++ b/src/gtk/filedlg.cpp @@ -108,10 +108,10 @@ static void gtk_filedialog_response_callback(GtkWidget *w, { wxapp_install_idle_handler(); - if (response == GTK_RESPONSE_CANCEL) - gtk_filedialog_cancel_callback(w, dialog); - else + if (response == GTK_RESPONSE_ACCEPT) gtk_filedialog_ok_callback(w, dialog); + else + gtk_filedialog_cancel_callback(w, dialog); } //----------------------------------------------------------------------------- @@ -182,7 +182,6 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, wxFileDialog::~wxFileDialog() { - m_widget = NULL; } void wxFileDialog::GetFilenames(wxArrayString& files) const diff --git a/src/gtk/msgdlg.cpp b/src/gtk/msgdlg.cpp index 66a4b47b66..6ca4915481 100644 --- a/src/gtk/msgdlg.cpp +++ b/src/gtk/msgdlg.cpp @@ -97,7 +97,6 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent, wxMessageDialog::~wxMessageDialog() { - m_widget = NULL; } int wxMessageDialog::ShowModal() diff --git a/src/gtk1/filedlg.cpp b/src/gtk1/filedlg.cpp index 6234348501..20bc8b0558 100644 --- a/src/gtk1/filedlg.cpp +++ b/src/gtk1/filedlg.cpp @@ -108,10 +108,10 @@ static void gtk_filedialog_response_callback(GtkWidget *w, { wxapp_install_idle_handler(); - if (response == GTK_RESPONSE_CANCEL) - gtk_filedialog_cancel_callback(w, dialog); - else + if (response == GTK_RESPONSE_ACCEPT) gtk_filedialog_ok_callback(w, dialog); + else + gtk_filedialog_cancel_callback(w, dialog); } //----------------------------------------------------------------------------- @@ -182,7 +182,6 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, wxFileDialog::~wxFileDialog() { - m_widget = NULL; } void wxFileDialog::GetFilenames(wxArrayString& files) const diff --git a/src/gtk1/msgdlg.cpp b/src/gtk1/msgdlg.cpp index 66a4b47b66..6ca4915481 100644 --- a/src/gtk1/msgdlg.cpp +++ b/src/gtk1/msgdlg.cpp @@ -97,7 +97,6 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent, wxMessageDialog::~wxMessageDialog() { - m_widget = NULL; } int wxMessageDialog::ShowModal() -- 2.45.2