X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/692f921af50867cfc5d6fb7ce0af1debf070b1cf..3cd94a0d119ade811cd876a309cfe6d28b5c36dd:/src/mac/control.cpp?ds=inline diff --git a/src/mac/control.cpp b/src/mac/control.cpp index b56dee0d18..945441b4ea 100644 --- a/src/mac/control.cpp +++ b/src/mac/control.cpp @@ -68,15 +68,17 @@ pascal OSStatus wxMacSetupControlBackground( ControlRef iControl , SInt16 iMessa switch( iMessage ) { case kControlMsgSetUpBackground : - wxControl* wx = (wxControl*) GetControlReference( iControl ) ; - if ( wx != NULL && wx->IsKindOf( CLASSINFO( wxControl ) ) ) - { - wxDC::MacSetupBackgroundForCurrentPort( wx->MacGetBackgroundBrush() ) ; -// SetThemeBackground( iDepth , iIsColor ) ; - } - else { - status = paramErr ; + wxControl* wx = (wxControl*) GetControlReference( iControl ) ; + if ( wx != NULL && wx->IsKindOf( CLASSINFO( wxControl ) ) ) + { + wxDC::MacSetupBackgroundForCurrentPort( wx->MacGetBackgroundBrush() ) ; + // SetThemeBackground( iDepth , iIsColor ) ; + } + else + { + status = paramErr ; + } } break ; default : @@ -145,7 +147,7 @@ wxControl::~wxControl() void wxControl::SetLabel(const wxString& title) { - m_label = title ; + m_label = wxStripMenuCodes(title) ; if ( (ControlHandle) m_macControl ) { @@ -153,9 +155,9 @@ void wxControl::SetLabel(const wxString& title) wxString label ; if( wxApp::s_macDefaultEncodingIsPC ) - label = wxMacMakeMacStringFromPC( title ) ; + label = wxMacMakeMacStringFromPC( m_label ) ; else - label = title ; + label = m_label ; #if TARGET_CARBON c2pstrcpy( (StringPtr) maclabel , label ) ;