]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/dialog.cpp
missing commit
[wxWidgets.git] / src / gtk1 / dialog.cpp
index 54bac5264ff20430f3fb380cb12375da5227cafd..c760fe0de2699bfc316d3d2d5bf6fa0e6a93c2d7 100644 (file)
@@ -19,6 +19,7 @@
 #endif // WX_PRECOMP
 
 #include "wx/evtloop.h"
+#include "wx/modalhook.h"
 
 #include <gdk/gdk.h>
 #include <gtk/gtk.h>
@@ -43,8 +44,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 +138,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 +183,8 @@ void wxDialog::SetModal( bool WXUNUSED(flag) )
 
 int wxDialog::ShowModal()
 {
+    WX_HOOK_MODAL_DIALOG();
+
     if (IsModal())
     {
        wxFAIL_MSG( wxT("wxDialog:ShowModal called twice") );