X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..99f161bd9968326381cf183e9ebd42d873397ca7:/src/gtk1/msgdlg.cpp?ds=sidebyside diff --git a/src/gtk1/msgdlg.cpp b/src/gtk1/msgdlg.cpp index 26d9da5298..eaa3d7cf3a 100644 --- a/src/gtk1/msgdlg.cpp +++ b/src/gtk1/msgdlg.cpp @@ -6,7 +6,7 @@ // Created: 2003/02/28 // RCS-ID: $Id$ // Copyright: (c) Vaclav Slavik, 2003 -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) @@ -89,6 +89,10 @@ 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)); } int wxMessageDialog::ShowModal() @@ -104,6 +108,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;