use wxString::Format(), calling string.Format() has no effect patch 1267345)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -530,8 +530,7 @@ bool wxToolBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
|
|||||||
OSStatus err = 0;
|
OSStatus err = 0;
|
||||||
|
|
||||||
#if wxMAC_USE_NATIVE_TOOLBAR
|
#if wxMAC_USE_NATIVE_TOOLBAR
|
||||||
wxString labelStr;
|
wxString labelStr = wxString::Format(wxT("%xd"), (int)this);
|
||||||
labelStr.Format(wxT("%xd"), (int)this);
|
|
||||||
err = HIToolbarCreate( wxMacCFStringHolder(labelStr, wxFont::GetDefaultEncoding() ) , 0 ,
|
err = HIToolbarCreate( wxMacCFStringHolder(labelStr, wxFont::GetDefaultEncoding() ) , 0 ,
|
||||||
(HIToolbarRef*) &m_macHIToolbarRef );
|
(HIToolbarRef*) &m_macHIToolbarRef );
|
||||||
|
|
||||||
@@ -1087,8 +1086,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos),
|
|||||||
|
|
||||||
#if wxMAC_USE_NATIVE_TOOLBAR
|
#if wxMAC_USE_NATIVE_TOOLBAR
|
||||||
HIToolbarItemRef item ;
|
HIToolbarItemRef item ;
|
||||||
wxString labelStr;
|
wxString labelStr = wxString::Format(wxT("%xd"), (int)tool);
|
||||||
labelStr.Format(wxT("%xd"), (int)tool);
|
|
||||||
err = HIToolbarItemCreate(
|
err = HIToolbarItemCreate(
|
||||||
wxMacCFStringHolder(labelStr, wxFont::GetDefaultEncoding()),
|
wxMacCFStringHolder(labelStr, wxFont::GetDefaultEncoding()),
|
||||||
kHIToolbarItemCantBeRemoved | kHIToolbarItemAnchoredLeft | kHIToolbarItemAllowDuplicates, &item );
|
kHIToolbarItemCantBeRemoved | kHIToolbarItemAnchoredLeft | kHIToolbarItemAllowDuplicates, &item );
|
||||||
@@ -1120,8 +1118,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos),
|
|||||||
// FIXME: doesn't work yet...
|
// FIXME: doesn't work yet...
|
||||||
{
|
{
|
||||||
HIToolbarItemRef item;
|
HIToolbarItemRef item;
|
||||||
wxString labelStr;
|
wxString labelStr = wxString::Format( wxT("%xd"), (int) tool );
|
||||||
labelStr.Format( wxT("%xd"), (int) tool );
|
|
||||||
result = HIToolbarItemCreate( wxMacCFStringHolder(labelStr, wxFont::GetDefaultEncoding()),
|
result = HIToolbarItemCreate( wxMacCFStringHolder(labelStr, wxFont::GetDefaultEncoding()),
|
||||||
kHIToolbarItemCantBeRemoved | kHIToolbarItemAnchoredLeft | kHIToolbarItemAllowDuplicates,
|
kHIToolbarItemCantBeRemoved | kHIToolbarItemAnchoredLeft | kHIToolbarItemAllowDuplicates,
|
||||||
&item );
|
&item );
|
||||||
@@ -1173,8 +1170,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos),
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxString errMsg;
|
wxString errMsg = wxString::Format( wxT("wxToolBar::DoInsertTool - failure [%ld]"), (long) err );
|
||||||
errMsg.Format( wxT("wxToolBar::DoInsertTool - failure [%ld]"), (long) err );
|
|
||||||
wxASSERT_MSG( false, errMsg.c_str() );
|
wxASSERT_MSG( false, errMsg.c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user