X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4e78e1738e4242e489c6c4d4cd3b9b0c3a8e4743..f98bd6d6cf33f0475b5d737a2968b42b7ea0009f:/src/mac/carbon/utils.cpp?ds=sidebyside diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index b9e206197a..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 | kDataBrowserListViewTypeSelectColumn;; + columnDesc.propertyDesc.propertyFlags = kDataBrowserListViewSortableColumn | kDataBrowserListViewTypeSelectColumn; #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 - columnDesc.propertyDesc.propertyFlags = kDataBrowserListViewNoGapForIconInHeaderButton; + columnDesc.propertyDesc.propertyFlags |= kDataBrowserListViewNoGapForIconInHeaderButton; #endif verify_noerr( AddColumn( &columnDesc, kDataBrowserListViewAppendColumn ) );