X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..921c65ed3d889117c600387cebb0bce2470cff8e:/src/motif/button.cpp diff --git a/src/motif/button.cpp b/src/motif/button.cpp index 76e5ab9276..93189fd2a7 100644 --- a/src/motif/button.cpp +++ b/src/motif/button.cpp @@ -6,7 +6,7 @@ // Created: 17/09/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) @@ -33,6 +33,7 @@ #pragma message enable nosimpint #endif +#include "wx/stockitem.h" #include "wx/motif/private.h" #include "wx/sysopt.h" @@ -45,12 +46,16 @@ IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) // Button -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( !CreateControl( parent, id, pos, size, style, validator, name ) ) return false;