From: Robert Roebling Date: Sat, 27 Nov 2004 23:21:12 +0000 (+0000) Subject: Avoid error message when closing message X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f1dec25f3133c76bf4d2b8b8e0985175f52ac0f5 Avoid error message when closing message dialog with the X field from the WM. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30801 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/gtk/msgdlg.h b/include/wx/gtk/msgdlg.h index 1f142a6dce..31bbf814cf 100644 --- a/include/wx/gtk/msgdlg.h +++ b/include/wx/gtk/msgdlg.h @@ -31,6 +31,7 @@ public: const wxString& caption = wxMessageBoxCaptionStr, long style = wxOK|wxCENTRE, const wxPoint& pos = wxDefaultPosition); + ~wxMessageDialog(); int ShowModal(); virtual bool Show( bool WXUNUSED(show) = true ) { return false; }; diff --git a/include/wx/gtk1/msgdlg.h b/include/wx/gtk1/msgdlg.h index 1f142a6dce..31bbf814cf 100644 --- a/include/wx/gtk1/msgdlg.h +++ b/include/wx/gtk1/msgdlg.h @@ -31,6 +31,7 @@ public: const wxString& caption = wxMessageBoxCaptionStr, long style = wxOK|wxCENTRE, const wxPoint& pos = wxDefaultPosition); + ~wxMessageDialog(); int ShowModal(); virtual bool Show( bool WXUNUSED(show) = true ) { return false; }; diff --git a/src/gtk/msgdlg.cpp b/src/gtk/msgdlg.cpp index 4ee201a9f2..66a4b47b66 100644 --- a/src/gtk/msgdlg.cpp +++ b/src/gtk/msgdlg.cpp @@ -95,6 +95,11 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent, GTK_WINDOW(m_parent->m_widget)); } +wxMessageDialog::~wxMessageDialog() +{ + m_widget = NULL; +} + int wxMessageDialog::ShowModal() { gint result = gtk_dialog_run(GTK_DIALOG(m_widget)); diff --git a/src/gtk1/msgdlg.cpp b/src/gtk1/msgdlg.cpp index 4ee201a9f2..66a4b47b66 100644 --- a/src/gtk1/msgdlg.cpp +++ b/src/gtk1/msgdlg.cpp @@ -95,6 +95,11 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent, GTK_WINDOW(m_parent->m_widget)); } +wxMessageDialog::~wxMessageDialog() +{ + m_widget = NULL; +} + int wxMessageDialog::ShowModal() { gint result = gtk_dialog_run(GTK_DIALOG(m_widget));