projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Hopefully fixed library names generated by wx-config for OS/2's PM port.
[wxWidgets.git]
/
src
/
mac
/
classic
/
button.cpp
diff --git
a/src/mac/classic/button.cpp
b/src/mac/classic/button.cpp
index cbd8e743eda1a21d44ae1e2a50b89cc7dfab9939..912de02fb67ed1007e0e740d4678796c6e88ab4d 100644
(file)
--- a/
src/mac/classic/button.cpp
+++ b/
src/mac/classic/button.cpp
@@
-6,7
+6,7
@@
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWi
dget
s licence
+// Licence: wxWi
ndow
s licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
@@
-17,6
+17,7
@@
#include "wx/button.h"
#include "wx/panel.h"
#include "wx/button.h"
#include "wx/panel.h"
+#include "wx/stockitem.h"
#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
#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 ;
static const int kMacOSXHorizontalBorder = 2 ;
static const int kMacOSXVerticalBorder = 4 ;
-bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& l
abe
l,
+bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& l
b
l,
const wxPoint& pos,
const wxSize& size, long style,
const wxValidator& validator,
const wxString& name)
{
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;
if ( !wxButtonBase::Create(parent, id, pos, size, style, validator, name) )
return false;
@@
-48,7
+53,7
@@
bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
MacPreControlCreate( parent , id , label , pos , size ,style, validator , name , &bounds , title ) ;
MacPreControlCreate( parent , id , label , pos , size ,style, validator , name , &bounds , title ) ;
- m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
+ m_macControl =
(WXWidget)
::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
kControlPushButtonProc , (long) this ) ;
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
kControlPushButtonProc , (long) this ) ;
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;