X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6bc3b8e9680e8aa3d50ae4bb41dad22c6dd3ce1b..f516d986371b7643efda569d64ae19e75d221411:/src/mac/classic/button.cpp diff --git a/src/mac/classic/button.cpp b/src/mac/classic/button.cpp index 3ce18b2e27..681d761703 100644 --- a/src/mac/classic/button.cpp +++ b/src/mac/classic/button.cpp @@ -9,18 +9,13 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "button.h" -#endif - #include "wx/defs.h" #include "wx/button.h" #include "wx/panel.h" +#include "wx/stockitem.h" -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) -#endif #include "wx/mac/uma.h" // Button @@ -28,12 +23,16 @@ IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) static const int kMacOSXHorizontalBorder = 2 ; static const int kMacOSXVerticalBorder = 4 ; -bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, +bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& lbl, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name) { + wxString label(lbl); + if (label.empty() && wxIsStockID(id)) + label = wxGetStockLabel(id); + if ( !wxButtonBase::Create(parent, id, pos, size, style, validator, name) ) return false;