]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/listctrl_mac.cpp
cleanup, fixing exports
[wxWidgets.git] / src / mac / carbon / listctrl_mac.cpp
index 6fbe91e190a2f84c55e4375b8842559bb35808cd..66046b29ca7f054a217468903abb6dce9d5bfb54 100644 (file)
@@ -980,13 +980,13 @@ bool wxListCtrl::SetColumn(int col, wxListItem& item)
 
         if (item.GetMask() & wxLIST_MASK_IMAGE && item.GetImage() != -1 )
         {
-            columnDesc.btnContentInfo.contentType = kControlContentIconRef;
             wxImageList* imageList = GetImageList(wxIMAGE_LIST_SMALL);
             if (imageList && imageList->GetImageCount() > 0 )
             {
                 wxBitmap bmp = imageList->GetBitmap( item.GetImage() );
-                IconRef icon = bmp.GetBitmapData()->GetIconRef();
+                IconRef icon = bmp.GetIconRef();
                 columnDesc.btnContentInfo.u.iconRef = icon;
+                columnDesc.btnContentInfo.contentType = kControlContentIconRef;
             }
         }
 
@@ -2510,9 +2510,7 @@ wxMacDataBrowserListCtrlControl::wxMacDataBrowserListCtrlControl( wxWindow *peer
 
     if ( style & wxLC_VRULES )
     {
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
         verify_noerr( DataBrowserChangeAttributes(m_controlRef, kDataBrowserAttributeListViewDrawColumnDividers, kDataBrowserAttributeNone) );
-#endif
     }
 
     verify_noerr( SetHiliteStyle(kDataBrowserTableViewFillHilite ) );
@@ -2731,13 +2729,13 @@ void wxMacDataBrowserListCtrlControl::DrawItem(
     {
 
         if (color.Ok())
-            labelColor = MAC_WXCOLORREF( color.GetPixel() );
+            color.GetRGBColor(&labelColor);
         else if (list->GetTextColour().Ok())
-            labelColor = MAC_WXCOLORREF( list->GetTextColour().GetPixel() );
+            list->GetTextColour().GetRGBColor(&labelColor);
 
         if (bgColor.Ok())
         {
-            backgroundColor = MAC_WXCOLORREF( bgColor.GetPixel() );
+            bgColor.GetRGBColor(&backgroundColor);
             CGContextSaveGState(context);
 
             CGContextSetRGBFillColor(context, (float)backgroundColor.red / (float)USHRT_MAX,
@@ -2756,7 +2754,7 @@ void wxMacDataBrowserListCtrlControl::DrawItem(
         wxImageList* imageList = list->GetImageList(wxIMAGE_LIST_SMALL);
         if (imageList && imageList->GetImageCount() > 0){
             wxBitmap bmp = imageList->GetBitmap(imgIndex);
-            IconRef icon = bmp.GetBitmapData()->GetIconRef();
+            IconRef icon = bmp.GetIconRef();
 
             CGContextSaveGState(context);
             CGContextTranslateCTM(context, 0,iconCGRect.origin.y + CGRectGetMaxY(iconCGRect));
@@ -2897,7 +2895,7 @@ OSStatus wxMacDataBrowserListCtrlControl::GetSetItemData(DataBrowserItemID itemI
                         wxImageList* imageList = list->GetImageList(wxIMAGE_LIST_SMALL);
                         if (imageList && imageList->GetImageCount() > 0){
                             wxBitmap bmp = imageList->GetBitmap(imgIndex);
-                            IconRef icon = bmp.GetBitmapData()->GetIconRef();
+                            IconRef icon = bmp.GetIconRef();
                             ::SetDataBrowserItemDataIcon(itemData, icon);
                         }
                     }