From d2a6e31b73b421479858bb7458f362b013a8c7c6 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 26 Jun 2008 12:47:11 +0000 Subject: [PATCH] updating help texts, fixes #9647 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/toolbar.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/mac/carbon/toolbar.cpp b/src/mac/carbon/toolbar.cpp index e66caf7141..b78b25f5ae 100644 --- a/src/mac/carbon/toolbar.cpp +++ b/src/mac/carbon/toolbar.cpp @@ -1147,6 +1147,13 @@ bool wxToolBar::Realize() #if wxMAC_USE_NATIVE_TOOLBAR CFIndex currentPosition = 0; bool insertAll = false; + wxFont f; + wxFontEncoding enc; + f = GetFont(); + if ( f.IsOk() ) + enc = f.GetEncoding(); + else + enc = wxFont::GetDefaultEncoding(); #endif node = m_tools.GetFirst(); @@ -1191,6 +1198,11 @@ bool wxToolBar::Realize() HIToolbarItemRef hiItemRef = tool->GetToolbarItemRef(); if ( hiItemRef != NULL ) { + // since setting the help texts is non-virtual we have to update + // the strings now + HIToolbarItemSetHelpText( hiItemRef, + wxMacCFStringHolder( tool->GetShortHelp(), enc ), + wxMacCFStringHolder( tool->GetLongHelp(), enc ) ); if ( insertAll || (tool->GetIndex() != currentPosition) ) { OSStatus err = noErr;