X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0a67a93b17c37c018f60e662645ee2a44ba4e58e..594f0f5bf1355fb8d58f403d3ebacc1c1767c429:/src/mac/button.cpp diff --git a/src/mac/button.cpp b/src/mac/button.cpp index c67c470acf..b8689ca0fd 100644 --- a/src/mac/button.cpp +++ b/src/mac/button.cpp @@ -13,6 +13,8 @@ #pragma implementation "button.h" #endif +#include "wx/defs.h" + #include "wx/button.h" #include "wx/panel.h" @@ -20,7 +22,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) #endif -#include +#include "wx/mac/uma.h" // Button @@ -35,7 +37,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, MacPreControlCreate( parent , id , label , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , true , 0 , 0 , 1, + m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, kControlPushButtonProc , (long) this ) ; wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ; @@ -51,11 +53,12 @@ void wxButton::SetDefault() wxPanel *panel = wxDynamicCast(parent, wxPanel); if ( panel ) { - btnOldDefault = panel->GetDefaultItem(); + btnOldDefault = wxDynamicCast(panel->GetDefaultItem(), + wxButton); panel->SetDefaultItem(this); } -#ifdef __UNIX__ +#ifdef __DARWIN__ Boolean inData; if ( btnOldDefault && btnOldDefault->m_macControl ) {