]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/dataview.cpp
Correct format specifiers used to show wxIPV4address.
[wxWidgets.git] / src / osx / carbon / dataview.cpp
index 2e19bcd1e1959fdae841c19faebb9f22b809009a..ef441c892d00491683da82fb74af52c033b08289 100644 (file)
@@ -1183,7 +1183,7 @@ wxDataViewColumn* wxMacDataViewDataBrowserListViewControl::GetSortingColumn() co
 
 void wxMacDataViewDataBrowserListViewControl::Resort()
 {
-  (void) Resort();
+    (void) wxMacDataBrowserListViewControl::Resort();
 }
 
 //
@@ -1701,7 +1701,7 @@ wxMacDataViewDataBrowserListViewControl::DataBrowserDrawItemProc(DataBrowserItem
   {
       // make sure that 'Render' can draw only in the allowed area:
       dc->SetClippingRegion(content.left,content.top,content.right-content.left+1,content.bottom-content.top+1);
-      (void) (dataViewCustomRendererPtr->Render( cellrect, dc,
+      (void) (dataViewCustomRendererPtr->WXCallRender( cellrect, dc,
                                             ((state == kDataBrowserItemIsSelected) ? wxDATAVIEW_CELL_SELECTED : 0)));
       dc->DestroyClippingRegion(); // probably not necessary
   }
@@ -2092,8 +2092,7 @@ wxDataObjectComposite* wxMacDataViewDataBrowserListViewControl::GetDnDDataObject
                   dataObject->Add(textDataObject);
                 else
                 {
-                  delete textDataObject;
-                  textDataObject = NULL;
+                  wxDELETE(textDataObject);
                 }
               }
             } /* block */
@@ -2124,8 +2123,7 @@ wxDataObjectComposite* wxMacDataViewDataBrowserListViewControl::GetDnDDataObject
                       dataObject->Add(textDataObject);
                     else
                     {
-                      delete textDataObject;
-                      textDataObject = NULL;
+                      wxDELETE(textDataObject);
                     }
                   }
                   else // overwrite data because the 'utxt' flavor has priority over the 'TEXT' flavor
@@ -2283,14 +2281,11 @@ wxEllipsizeMode wxDataViewRenderer::GetEllipsizeMode() const
         return wxELLIPSIZE_NONE;
     if ( flags & kDataBrowserTruncateTextAtStart )
         return wxELLIPSIZE_START;
-    if ( flags & kDataBrowserTruncateTextMiddle )
-        return wxELLIPSIZE_MIDDLE;
     if ( flags & kDataBrowserTruncateTextAtEnd )
         return wxELLIPSIZE_END;
 
-    wxFAIL_MSG( "unknown flags" );
-
-    return wxELLIPSIZE_NONE;
+    // kDataBrowserTruncateTextMiddle == 0 so there is no need to test for it
+    return wxELLIPSIZE_MIDDLE;
 }
 
 void wxDataViewRenderer::SetNativeData(wxDataViewRendererNativeData* newNativeDataPtr)
@@ -2305,7 +2300,9 @@ IMPLEMENT_ABSTRACT_CLASS(wxDataViewRenderer,wxDataViewRendererBase)
 // wxDataViewCustomRenderer
 // ---------------------------------------------------------
 wxDataViewCustomRenderer::wxDataViewCustomRenderer(wxString const& varianttype, wxDataViewCellMode mode, int align)
-                         :wxDataViewRenderer(varianttype,mode,align), m_editorCtrlPtr(NULL), m_DCPtr(NULL)
+                         :wxDataViewCustomRendererBase(varianttype,mode,align),
+                          m_editorCtrlPtr(NULL),
+                          m_DCPtr(NULL)
 {
   SetNativeData(new wxDataViewRendererNativeData(kDataBrowserCustomType));
 }
@@ -2751,6 +2748,17 @@ void wxDataViewColumn::SetWidth(int width)
   }
 }
 
+void wxDataViewColumn::SetHidden(bool WXUNUSED(hidden))
+{
+    // How to do that?
+}
+
+bool wxDataViewColumn::IsHidden() const
+{
+    return true;
+}
+
+
 void wxDataViewColumn::SetAsSortKey(bool WXUNUSED(sort))
 {
     // see wxGTK native wxDataViewColumn implementation