]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/button.cpp
Add test that wxABI_VERSION is not set when compiling the library
[wxWidgets.git] / src / motif / button.cpp
index a1afbd74be9c620718f22689b541896c25959471..56494fcfeefb9531b37f306d01e61b023dbcd3d0 100644 (file)
@@ -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;
 
@@ -71,7 +76,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
     m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("button",
         xmPushButtonWidgetClass,
         parentWidget,
-        wxFont::GetFontTag(), m_font.GetFontType(XtDisplay(parentWidget)),
+        wxFont::GetFontTag(), m_font.GetFontTypeC(XtDisplay(parentWidget)),
         XmNlabelString, text(),
         XmNrecomputeSize, False,
         // See comment for wxButton::SetDefault