X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cdc48273b49b0b90d9587a1ecc5935d38a160620..refs/heads/master:/src/gtk1/dialog.cpp diff --git a/src/gtk1/dialog.cpp b/src/gtk1/dialog.cpp index 54bac5264f..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 @@ -43,8 +43,6 @@ BEGIN_EVENT_TABLE(wxDialog,wxDialogBase) EVT_CLOSE (wxDialog::OnCloseWindow) END_EVENT_TABLE() -IMPLEMENT_DYNAMIC_CLASS(wxDialog,wxTopLevelWindow) - void wxDialog::Init() { m_returnCode = 0; @@ -139,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); @@ -184,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") );