X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0d2d29b16a4fa79e8c72a4ecb3f4a381dc186e87..f98bd6d6cf33f0475b5d737a2968b42b7ea0009f:/src/mac/carbon/utils.cpp diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index b4ac2b78d6..33f2e098ce 100644 --- a/src/mac/carbon/utils.cpp +++ b/src/mac/carbon/utils.cpp @@ -1646,11 +1646,11 @@ bool wxMacDataItem::IsLessThan(wxMacDataItemBrowserControl *owner , const wxMacDataItem* otherItem = dynamic_cast(rhs); bool retval = false; - if ( sortProperty == m_colId && owner->GetSortOrder() != SortOrder_None){ + if ( sortProperty == m_colId ){ retval = m_label.CmpNoCase( otherItem->m_label) < 0; } - else if ( owner->GetSortOrder() == SortOrder_None || sortProperty == kNumericOrderColumnId ) + else if ( sortProperty == kNumericOrderColumnId ) retval = m_order < otherItem->m_order; return retval; @@ -1703,16 +1703,6 @@ wxMacDataItemBrowserControl::wxMacDataItemBrowserControl( wxWindow* peer , const m_clientDataItemsType = wxClientData_None; } -ListSortOrder wxMacDataItemBrowserControl::GetSortOrder() const -{ - return m_sortOrder; -} - -void wxMacDataItemBrowserControl::SetSortOrder(const ListSortOrder sort) -{ - m_sortOrder = sort; -} - wxMacDataItem* wxMacDataItemBrowserControl::CreateItem() { return new wxMacDataItem(); @@ -1910,9 +1900,9 @@ void wxMacDataItemBrowserControl::InsertColumn(int colId, DataBrowserPropertyTyp columnDesc.propertyDesc.propertyID = (kMinColumnId + colId); columnDesc.propertyDesc.propertyType = colType; - columnDesc.propertyDesc.propertyFlags = kDataBrowserListViewDefaultColumnFlags | kDataBrowserListViewNoGapForIconInHeaderButton; -#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2 - columnDesc.propertyDesc.propertyFlags |= kDataBrowserListViewTypeSelectColumn; + columnDesc.propertyDesc.propertyFlags = kDataBrowserListViewSortableColumn | kDataBrowserListViewTypeSelectColumn; +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 + columnDesc.propertyDesc.propertyFlags |= kDataBrowserListViewNoGapForIconInHeaderButton; #endif verify_noerr( AddColumn( &columnDesc, kDataBrowserListViewAppendColumn ) );