X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/289532452089421ddadbd4726a8469511a19ab76..bf9ce7b55ec8d1e4a8f2dd8ca2c2b6e9f86b57b7:/src/gtk1/dialog.cpp?ds=sidebyside diff --git a/src/gtk1/dialog.cpp b/src/gtk1/dialog.cpp index 1646b771cb..8076294532 100644 --- a/src/gtk1/dialog.cpp +++ b/src/gtk1/dialog.cpp @@ -2,7 +2,6 @@ // Name: src/gtk1/dialog.cpp // Purpose: // Author: Robert Roebling -// Id: $Id$ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -19,6 +18,7 @@ #endif // WX_PRECOMP #include "wx/evtloop.h" +#include "wx/modalhook.h" #include #include @@ -137,7 +137,7 @@ void wxDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) s_closing.Append(this); - wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); + wxCommandEvent cancelEvent(wxEVT_BUTTON, wxID_CANCEL); cancelEvent.SetEventObject( this ); HandleWindowEvent(cancelEvent); s_closing.DeleteObject(this); @@ -182,6 +182,8 @@ void wxDialog::SetModal( bool WXUNUSED(flag) ) int wxDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + if (IsModal()) { wxFAIL_MSG( wxT("wxDialog:ShowModal called twice") );