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
This commit is contained in:
Stefan Csomor
2008-06-26 12:47:11 +00:00
parent 770756327c
commit d2a6e31b73

View File

@@ -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;