X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6bc3b8e9680e8aa3d50ae4bb41dad22c6dd3ce1b..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/mac/classic/button.cpp diff --git a/src/mac/classic/button.cpp b/src/mac/classic/button.cpp index 3ce18b2e27..912de02fb6 100644 --- a/src/mac/classic/button.cpp +++ b/src/mac/classic/button.cpp @@ -17,6 +17,7 @@ #include "wx/button.h" #include "wx/panel.h" +#include "wx/stockitem.h" #if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) @@ -28,12 +29,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;