X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..ce29e4fbe5d8f0c0e6972da064446204e59e9905:/src/gtk/msgdlg.cpp diff --git a/src/gtk/msgdlg.cpp b/src/gtk/msgdlg.cpp index 97ce07c616..6ca4915481 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) @@ -89,8 +89,16 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent, else gtk_dialog_set_default_response(GTK_DIALOG(m_widget), GTK_RESPONSE_YES); } + + if (parent) + gtk_window_set_transient_for(GTK_WINDOW(m_widget), + GTK_WINDOW(m_parent->m_widget)); } +wxMessageDialog::~wxMessageDialog() +{ +} + int wxMessageDialog::ShowModal() { gint result = gtk_dialog_run(GTK_DIALOG(m_widget)); @@ -104,6 +112,8 @@ int wxMessageDialog::ShowModal() // fall through case GTK_RESPONSE_CANCEL: + case GTK_RESPONSE_DELETE_EVENT: + case GTK_RESPONSE_CLOSE: return wxID_CANCEL; case GTK_RESPONSE_OK: return wxID_OK;