]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/control.cpp
Added wxMessageOutput as per the discussion on wx-dev.
[wxWidgets.git] / src / mac / control.cpp
index b56dee0d186b0f1114d6571817b4063df8ecb024..945441b4ea1faaf4a93f026316af07de2b18df4e 100644 (file)
@@ -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 ) ;