From 4cebfbcd133759774c9e71669d603d03063d724d Mon Sep 17 00:00:00 2001 From: daboe01 Date: Thu, 14 Aug 2014 22:57:05 +0200 Subject: [PATCH] removed collectionViewDidChangeSelection --- AppKit/CPCollectionView.j | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/AppKit/CPCollectionView.j b/AppKit/CPCollectionView.j index 5dbd5da53..40b1ffa03 100644 --- a/AppKit/CPCollectionView.j +++ b/AppKit/CPCollectionView.j @@ -40,9 +40,8 @@ var CPCollectionViewDelegate_collectionView_acceptDrop_index_dropOperation_ CPCollectionViewDelegate_collectionView_dataForItemsAtIndexes_forType_ = 1 << 4, CPCollectionViewDelegate_collectionView_validateDrop_proposedIndex_dropOperation_ = 1 << 5, CPCollectionViewDelegate_collectionView_didDoubleClickOnItemAtIndex_ = 1 << 6, - CPCollectionViewDelegate_collectionViewDidChangeSelection_ = 1 << 7, - CPCollectionViewDelegate_collectionView_menuForItemAtIndex_ = 1 << 8, - CPCollectionViewDelegate_collectionView_draggingViewForItemsAtIndexes_withEvent_offset = 1 << 9; + CPCollectionViewDelegate_collectionView_menuForItemAtIndex_ = 1 << 7, + CPCollectionViewDelegate_collectionView_draggingViewForItemsAtIndexes_withEvent_offset = 1 << 8; @protocol CPCollectionViewDelegate @@ -57,7 +56,6 @@ var CPCollectionViewDelegate_collectionView_acceptDrop_index_dropOperation_ - (CPMenu)collectionView:(CPCollectionView)collectionView menuForItemAtIndex:(CPInteger)anIndex; - (CPView)collectionView:(CPCollectionView)collectionView dragginViewForItemsAtIndexes:(CPIndexSet)indexes withEvent:(CPEvent)event offset:(CGPoint)dragImageOffset; - (void)collectionView:(CPCollectionView)collectionView didDoubleClickOnItemAtIndex:(int)index; -- (void)collectionViewDidChangeSelection:(CPCollectionView)collectionView; @end @@ -71,10 +69,6 @@ var CPCollectionViewDelegate_collectionView_acceptDrop_index_dropOperation_ @par Delegate Methods - @delegate - (void)collectionViewDidChangeSelection:(CPCollectionView)collectionView; - DEPRECATED: Please do not use. - @param collectionView the collection view who's selection changed - @delegate - (void)collectionView:(CPCollectionView)collectionView didDoubleClickOnItemAtIndex:(int)index; Called when the user double-clicks on an item in the collection view. @param collectionView the collection view that received the double-click @@ -236,9 +230,6 @@ var HORIZONTAL_MARGIN = 2; if ([_delegate respondsToSelector:@selector(collectionView:didDoubleClickOnItemAtIndex:)]) _implementedDelegateMethods |= CPCollectionViewDelegate_collectionView_didDoubleClickOnItemAtIndex_; - if ([_delegate respondsToSelector:@selector(collectionViewDidChangeSelection:)]) - _implementedDelegateMethods |= CPCollectionViewDelegate_collectionViewDidChangeSelection_; - if ([_delegate respondsToSelector:@selector(collectionView:menuForItemAtIndex:)]) _implementedDelegateMethods |= CPCollectionViewDelegate_collectionView_menuForItemAtIndex_; @@ -473,12 +464,6 @@ var HORIZONTAL_MARGIN = 2; var binderClass = [[self class] _binderClassForBinding:@"selectionIndexes"]; [[binderClass getBinding:@"selectionIndexes" forObject:self] reverseSetValueFor:@"selectionIndexes"]; - - if ([_delegate respondsToSelector:@selector(collectionViewDidChangeSelection:)]) - { - CPLog.warn("The delegate method collectionViewDidChangeSelection: is deprecated and will be removed in a future version, please bind to selectionIndexes instead."); - [_delegate collectionViewDidChangeSelection:self]; - } } /*! @@ -1514,17 +1499,6 @@ Not supported. Use -collectionView:dataForItemsAtIndexes:fortype: return [_delegate collectionView:self didDoubleClickOnItemAtIndex:index]; } -/*! - @ignore - Call delegate collectionViewDidChangeSelection -*/ -- (void)_sendDelegateCollectionViewDidChangeSelection:(CPCollectionView)collectionView -{ - if (!(_implementedDelegateMethods & CPCollectionViewDelegate_collectionViewDidChangeSelection_)) - return; - - return [_delegate collectionViewDidChangeSelection:self]; -} /*! @ignore