X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/065e208ec09e3d08d51d9604497f92f53c210f93..890976b89fe8d308c048f52e1ca0df287c8259a6:/src/cocoa/button.mm diff --git a/src/cocoa/button.mm b/src/cocoa/button.mm index 5bd7101249..a4955ccb28 100644 --- a/src/cocoa/button.mm +++ b/src/cocoa/button.mm @@ -16,6 +16,7 @@ #include "wx/log.h" #endif +#include "wx/stockitem.h" #include "wx/cocoa/autorelease.h" #import @@ -27,10 +28,12 @@ END_EVENT_TABLE() WX_IMPLEMENT_COCOA_OWNER(wxButton,NSButton,NSControl,NSView) bool wxButton::Create(wxWindow *parent, wxWindowID winid, - const wxString& label, const wxPoint& pos, + const wxString& lbl, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name) { + wxString label((lbl.empty() && wxIsStockID(winid))?wxGetStockLabel(winid):lbl); + wxAutoNSAutoreleasePool pool; wxLogTrace(wxTRACE_COCOA,wxT("Creating control with id=%d"),winid); if(!CreateControl(parent,winid,pos,size,style,validator,name))