X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0e4a70455ad405f2ce61cb2a5fdd8a394afb8b23..7e4fb3b8168f4f2dbf2f8a246d3e094a8ccba194:/src/gtk/msgdlg.cpp diff --git a/src/gtk/msgdlg.cpp b/src/gtk/msgdlg.cpp index eaa3d7cf3a..4e3eb6d2ff 100644 --- a/src/gtk/msgdlg.cpp +++ b/src/gtk/msgdlg.cpp @@ -22,10 +22,10 @@ #if wxUSE_MSGDLG && defined(__WXGTK20__) && !defined(__WXGPE__) +#include "wx/msgdlg.h" #include "wx/gtk/private.h" #include -#include "wx/msgdlg.h" #include "wx/intl.h" IMPLEMENT_CLASS(wxMessageDialog, wxDialog) @@ -90,13 +90,22 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent, gtk_dialog_set_default_response(GTK_DIALOG(m_widget), GTK_RESPONSE_YES); } - if (parent) + if (m_parent) gtk_window_set_transient_for(GTK_WINDOW(m_widget), GTK_WINDOW(m_parent->m_widget)); } +wxMessageDialog::~wxMessageDialog() +{ +} + int wxMessageDialog::ShowModal() { + // This should be necessary, but otherwise the + // parent TLW will disappear.. + if (m_parent) + gtk_window_present( GTK_WINDOW(m_parent->m_widget) ); + gint result = gtk_dialog_run(GTK_DIALOG(m_widget)); gtk_widget_destroy(m_widget); m_widget = NULL;