From: Włodzimierz Skiba <abx@abx.art.pl>
Date: Thu, 24 Aug 2006 16:33:28 +0000 (+0000)
Subject: Follow OnOK changes in wxDialog.
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8394f0a06bb5c84fbde2e2449e7bf72a1347fb66?ds=inline

Follow OnOK changes in wxDialog.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/demos/forty/forty.cpp b/demos/forty/forty.cpp
index 5e3525e256..350889ce4a 100644
--- a/demos/forty/forty.cpp
+++ b/demos/forty/forty.cpp
@@ -304,10 +304,6 @@ FortyFrame::ToggleCardSize(wxCommandEvent& event)
 // stAboutDialog
 //----------------------------------------------------------------------------
 
-BEGIN_EVENT_TABLE(FortyAboutDialog,wxDialog)
-    EVT_BUTTON(wxID_CLOSE, wxDialog::OnOK)
-END_EVENT_TABLE()
-
 FortyAboutDialog::FortyAboutDialog( wxWindow *parent, wxWindowID id, const wxString &title,
     const wxPoint &position, const wxSize& size, long style ) :
     wxDialog( parent, id, title, position, size, style )
@@ -367,6 +363,7 @@ bool FortyAboutDialog::AddControls(wxWindow* parent)
     wxButton *item2 = new wxButton( parent, wxID_CLOSE );
     item2->SetDefault();
     item2->SetFocus();
+    SetAffirmativeId(wxID_CLOSE);
 
     item0->Add( item2, 0, wxALIGN_RIGHT|wxALL, 5 );
 
@@ -378,4 +375,3 @@ bool FortyAboutDialog::AddControls(wxWindow* parent)
 
     return true;
 }
-
diff --git a/demos/forty/forty.h b/demos/forty/forty.h
index 91b847749d..2763590151 100644
--- a/demos/forty/forty.h
+++ b/demos/forty/forty.h
@@ -85,9 +85,6 @@ public:
         long style = wxDEFAULT_DIALOG_STYLE );
 
     bool AddControls(wxWindow* parent);
-
-private:
-    DECLARE_EVENT_TABLE()
 };
 
 #define ID_ABOUT_HTML_WINDOW    1000