mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-14 18:53:50 +00:00
Fix a few naming convention violations.
Make dragView.... use the columns its passed, rather than computing from scratch.
This commit is contained in:
1 parent
4476dad395
commit
af53c271c7
1 file changed
+14
-24
+14
-24
@@ -200,10 +200,11 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
|
||||
unsigned _destinationDragStyle;
|
||||
BOOL _isSelectingSession;
|
||||
CPIndexSet _draggedRowIndexes;
|
||||
_dropOperationDrawingView _dropOperationFeedbackView;
|
||||
CPDragOperation _dragOperationDefaultMask;
|
||||
int _retargetedDropRow;
|
||||
CPDragOperation _retargetedDropOperation;
|
||||
|
||||
_CPDropOperationDrawingView _dropOperationFeedbackView;
|
||||
CPDragOperation _dragOperationDefaultMask;
|
||||
int _retargetedDropRow;
|
||||
CPDragOperation _retargetedDropOperation;
|
||||
|
||||
BOOL _disableAutomaticResizing @accessors(property=disableAutomaticResizing);
|
||||
BOOL _lastColumnShouldSnap;
|
||||
@@ -277,7 +278,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
|
||||
_retargetedDropOperation = nil;
|
||||
_dragOperationDefaultMask = nil;
|
||||
_destinationDragStyle = CPTableViewDraggingDestinationFeedbackStyleRegular;
|
||||
_dropOperationFeedbackView = [[_dropOperationDrawingView alloc] initWithFrame:_CGRectMakeZero()];
|
||||
_dropOperationFeedbackView = [[_CPDropOperationDrawingView alloc] initWithFrame:_CGRectMakeZero()];
|
||||
[self addSubview:_dropOperationFeedbackView];
|
||||
[_dropOperationFeedbackView setHidden:YES];
|
||||
[_dropOperationFeedbackView setTableView:self];
|
||||
@@ -1778,33 +1779,22 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
|
||||
// We have to fetch all the data views for the selected rows and columns
|
||||
// After that we can copy these add them to a transparent drag view and use that drag view
|
||||
// to make it appear we are dragging images of those rows (as you would do in regular Cocoa)
|
||||
var firstExposedColumn = [_exposedColumns firstIndex],
|
||||
firstExposedRow = [_exposedRows firstIndex],
|
||||
exposedColumnsLength = [_exposedColumns lastIndex] - firstExposedColumn + 1,
|
||||
exposedRowsLength = [_exposedRows lastIndex] - firstExposedRow + 1,
|
||||
columns = [],
|
||||
rows = [];
|
||||
|
||||
[_exposedColumns getIndexes:columns maxCount:-1 inIndexRange:CPMakeRange(firstExposedColumn, exposedColumnsLength)];
|
||||
[theDraggedRows getIndexes:rows maxCount:-1 inIndexRange:CPMakeRange(firstExposedRow, exposedRowsLength)];
|
||||
|
||||
var columnIndex = [columns count];
|
||||
|
||||
var columnIndex = [theTableColumns count];
|
||||
while (columnIndex--)
|
||||
{
|
||||
var column = columns[columnIndex],
|
||||
tableColumn = [_tableColumns objectAtIndex:column],
|
||||
rowIndex = [rows count];
|
||||
var tableColumn = [theTableColumns objectAtIndex:columnIndex],
|
||||
row = [theDraggedRows firstIndex];
|
||||
|
||||
while (rowIndex--)
|
||||
while (row !== CPNotFound)
|
||||
{
|
||||
var row = rows[rowIndex];
|
||||
var dataView = [self _newDataViewForRow:row tableColumn:tableColumn];
|
||||
|
||||
[dataView setFrame:[self frameOfDataViewAtColumn:column row:row]];
|
||||
[dataView setFrame:[self frameOfDataViewAtColumn:columnIndex row:row]];
|
||||
[dataView setObjectValue:[self _objectValueForTableColumn:tableColumn row:row]];
|
||||
|
||||
[view addSubview:dataView];
|
||||
|
||||
row = [theDraggedRows indexGreaterThanIndex:row];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3327,7 +3317,7 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
|
||||
|
||||
@end
|
||||
|
||||
@implementation _dropOperationDrawingView : CPView
|
||||
@implementation _CPDropOperationDrawingView : CPView
|
||||
{
|
||||
unsigned dropOperation @accessors;
|
||||
CPTableView tableView @accessors;
|
||||
|
||||
Reference in new issue
Block a user