]> git.saurik.com Git - wxWidgets.git/commitdiff
Show labels for controls in wxOSX/Carbon toolbars.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 2 Apr 2010 19:30:29 +0000 (19:30 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 2 Apr 2010 19:30:29 +0000 (19:30 +0000)
Add a call to HIToolbarItemSetLabel().

Closes #11885.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/carbon/toolbar.cpp

index f3a127ab469322438a0e982347a9db29381263ce..35b9bd4ff87ceb0c643c62b58fed0bcfbc71e864 100644 (file)
@@ -1322,6 +1322,10 @@ bool wxToolBar::Realize()
                             wxFAIL_MSG("Reference count of native tool was illegal before removal");
                         }
                         wxASSERT( IsValidControlHandle(tool->GetControl()->GetPeer()->GetControlRef() )) ;
                             wxFAIL_MSG("Reference count of native tool was illegal before removal");
                         }
                         wxASSERT( IsValidControlHandle(tool->GetControl()->GetPeer()->GetControlRef() )) ;
+
+                        wxString label = tool->GetLabel();
+                        if ( !label.empty() )
+                            HIToolbarItemSetLabel( hiItemRef, wxCFStringRef(label, GetFont().GetEncoding()) );
                     }
                 }
 
                     }
                 }