X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..0576cd9ebe3430bdf7acf69e1dd1df92273f32ad:/demos/forty/forty.cpp diff --git a/demos/forty/forty.cpp b/demos/forty/forty.cpp index 7df7acf9a6..24902505bb 100644 --- a/demos/forty/forty.cpp +++ b/demos/forty/forty.cpp @@ -26,6 +26,7 @@ #include "forty.h" #include "card.h" #include "scoredg.h" +#include "forty.xpm" #if wxUSE_HTML #include "wx/textfile.h" @@ -124,7 +125,7 @@ const wxColour& FortyApp::TextColour() { if (!m_textColour) { - m_textColour = new wxColour(_T("BLACK")); + m_textColour = new wxColour(*wxBLACK); } return *m_textColour; @@ -141,9 +142,7 @@ FortyFrame::FortyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos #ifdef __WXMSW__ SetIcon(wxIcon(_T("CardsIcon"))); #else -#ifdef GTK_TBD - SetIcon(wxIcon(Cards_bits, Cards_width, Cards_height)); -#endif + SetIcon(wxIcon(forty_xpm)); #endif // Make a menu bar @@ -196,11 +195,12 @@ FortyFrame::FortyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); topsizer->Add( m_canvas, 1, wxEXPAND | wxALL, 0); SetSizer( topsizer ); - topsizer->SetSizeHints( this ); #if wxUSE_STATUSBAR CreateStatusBar(); #endif // wxUSE_STATUSBAR + + topsizer->SetSizeHints( this ); } void FortyFrame::OnCloseWindow(wxCloseEvent& event) @@ -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; } -