]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/toolbar.cpp
moved win_gtk.h header to wx/gtk/private, it's for internal use only
[wxWidgets.git] / src / mac / carbon / toolbar.cpp
index 175ccb4872770cfd163c34104884421333a9eb47..627cb2aa1f54fbd3aec476c0e3be233bf4c0073f 100644 (file)
@@ -108,9 +108,8 @@ public:
                 DisposeControl( m_controlHandle );
             else
             {
-                // the embedded control is not under the responsibility of the tool, it will be disposed of in the
+                // the embedded control is not under the responsibility of the tool, it gets disposed of in the
                 // proper wxControl destructor
-                wxASSERT( IsValidControlHandle(GetControl()->GetPeer()->GetControlRef() )) ;
             }
             m_controlHandle = NULL ;
         }
@@ -188,8 +187,8 @@ public:
 
             HIToolbarItemSetHelpText(
                 m_toolbarItemRef,
-                wxMacCFStringHolder( GetShortHelp(), enc ),
-                wxMacCFStringHolder( GetLongHelp(), enc ) );
+                wxCFStringRef( GetShortHelp(), enc ),
+                wxCFStringRef( GetLongHelp(), enc ) );
         }
     }
 
@@ -832,7 +831,7 @@ bool wxToolBar::Create(
     {
         wxString labelStr = wxString::Format( wxT("%p"), this );
         err = HIToolbarCreate(
-          wxMacCFStringHolder( labelStr, wxFont::GetDefaultEncoding() ), 0,
+          wxCFStringRef( labelStr, wxFont::GetDefaultEncoding() ), 0,
           (HIToolbarRef*) &m_macHIToolbarRef );
 
         if (m_macHIToolbarRef != NULL)
@@ -1517,7 +1516,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
                     HIToolbarItemRef item;
                     wxString labelStr = wxString::Format(wxT("%p"), tool);
                     err = HIToolbarItemCreate(
-                        wxMacCFStringHolder(labelStr, wxFont::GetDefaultEncoding()),
+                        wxCFStringRef(labelStr, wxFont::GetDefaultEncoding()),
                         kHIToolbarItemCantBeRemoved | kHIToolbarItemAnchoredLeft | kHIToolbarItemAllowDuplicates, &item );
                     if (err  == noErr)
                     {
@@ -1527,7 +1526,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
                         InstallEventHandler(
                             HIObjectGetEventTarget(item), GetwxMacToolBarEventHandlerUPP(),
                             GetEventTypeCount(toolBarEventList), toolBarEventList, tool, NULL );
-                        HIToolbarItemSetLabel( item, wxMacCFStringHolder(label, m_font.GetEncoding()) );
+                        HIToolbarItemSetLabel( item, wxCFStringRef(label, m_font.GetEncoding()) );
                         HIToolbarItemSetImage( item, info2.u.imageRef );
                         HIToolbarItemSetCommandID( item, kHIToolbarCommandPressAction );
                         tool->SetToolbarItemRef( item );
@@ -1543,7 +1542,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
 
 #if 0
                 SetBevelButtonTextPlacement( m_controlHandle, kControlBevelButtonPlaceBelowGraphic );
-                SetControlTitleWithCFString( m_controlHandle , wxMacCFStringHolder( label, wxFont::GetDefaultEncoding() );
+                SetControlTitleWithCFString( m_controlHandle , wxCFStringRef( label, wxFont::GetDefaultEncoding() );
 #endif
 
                 InstallControlEventHandler(