* Source/NSTableView.m: Whitespace changes to conform to coding

standards.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24049 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ratmice 2006-11-07 10:46:10 +00:00
parent 21acbeb85f
commit 959f0eaff3
2 changed files with 38 additions and 29 deletions

View file

@ -1,3 +1,8 @@
2006-11-07 Matt Rice <ratmice@gmail.com>
* Source/NSTableView.m: Whitespace changes to conform to coding
standards.
2006-11-07 Matt Rice <ratmice@gmail.com> 2006-11-07 Matt Rice <ratmice@gmail.com>
* Source/NSTableView.m (-mouseDown): Only call editWithFrame: from a * Source/NSTableView.m (-mouseDown): Only call editWithFrame: from a

View file

@ -3351,9 +3351,9 @@ static inline float computePeriod(NSPoint mouseLocationWin,
return 0.01; return 0.01;
} }
- (void) _trackCellAtColumn:(int)columnIndex - (void) _trackCellAtColumn: (int) columnIndex
row:(int)rowIndex row: (int) rowIndex
withEvent:(NSEvent *)theEvent withEvent: (NSEvent *) theEvent
{ {
NSTableColumn *tb; NSTableColumn *tb;
NSCell *cell; NSCell *cell;
@ -3370,8 +3370,8 @@ static inline float computePeriod(NSPoint mouseLocationWin,
otherwise validation on a cell being edited could otherwise validation on a cell being edited could
cause the cell we are selecting to get it's objectValue */ cause the cell we are selecting to get it's objectValue */
cell = [[tb dataCellForRow: rowIndex] copy]; cell = [[tb dataCellForRow: rowIndex] copy];
originalValue = RETAIN([self _objectValueForTableColumn:tb originalValue = RETAIN([self _objectValueForTableColumn: tb
row:rowIndex]); row: rowIndex]);
[cell setObjectValue: originalValue]; [cell setObjectValue: originalValue];
cellFrame = [self frameOfCellAtColumn: columnIndex cellFrame = [self frameOfCellAtColumn: columnIndex
row: rowIndex]; row: rowIndex];
@ -3385,7 +3385,7 @@ static inline float computePeriod(NSPoint mouseLocationWin,
if ([cell trackMouse: theEvent if ([cell trackMouse: theEvent
inRect: cellFrame inRect: cellFrame
ofView: self ofView: self
untilMouseUp:[[cell class] untilMouseUp: [[cell class]
prefersTrackingUntilMouseUp]]) prefersTrackingUntilMouseUp]])
{ {
id newValue = [cell objectValue]; id newValue = [cell objectValue];
@ -3405,7 +3405,7 @@ static inline float computePeriod(NSPoint mouseLocationWin,
RELEASE(cell); RELEASE(cell);
} }
- (BOOL) _startDragOperationWithEvent:(NSEvent *)theEvent - (BOOL) _startDragOperationWithEvent: (NSEvent *) theEvent
{ {
NSPasteboard *pboard; NSPasteboard *pboard;
NSArray *rows; NSArray *rows;
@ -3492,9 +3492,9 @@ static inline float computePeriod(NSPoint mouseLocationWin,
if (![self _isCellEditableColumn: _clickedColumn row: _clickedRow ]) if (![self _isCellEditableColumn: _clickedColumn row: _clickedRow ])
{ {
// Send double-action but don't edit // Send double-action but don't edit
[self _trackCellAtColumn:_clickedColumn [self _trackCellAtColumn: _clickedColumn
row:_clickedRow row: _clickedRow
withEvent:theEvent]; withEvent: theEvent];
if (_clickedRow != -1) if (_clickedRow != -1)
[self sendAction: _doubleAction to: _target]; [self sendAction: _doubleAction to: _target];
} }
@ -3626,9 +3626,9 @@ static inline float computePeriod(NSPoint mouseLocationWin,
* track the cell with the old mouseDown event * track the cell with the old mouseDown event
* then it will get the current event mouseUp. * then it will get the current event mouseUp.
*/ */
[self _trackCellAtColumn:_clickedColumn [self _trackCellAtColumn: _clickedColumn
row:_clickedRow row: _clickedRow
withEvent:theEvent]; withEvent: theEvent];
} }
} }
else else
@ -3674,7 +3674,7 @@ static inline float computePeriod(NSPoint mouseLocationWin,
selectionMode); selectionMode);
} }
if ([self _startDragOperationWithEvent:theEvent]) if ([self _startDragOperationWithEvent: theEvent])
{ {
return; return;
} }
@ -3713,9 +3713,9 @@ static inline float computePeriod(NSPoint mouseLocationWin,
// if the cell wants to track until mouse up, // if the cell wants to track until mouse up,
// which could cause selections if the mouse leaves the // which could cause selections if the mouse leaves the
// cell frame? // cell frame?
[self _trackCellAtColumn:_clickedColumn [self _trackCellAtColumn: _clickedColumn
row:_clickedRow row: _clickedRow
withEvent:theEvent]; withEvent: theEvent];
} }
/* /*
* Since we may have tracked a cell which may have caused * Since we may have tracked a cell which may have caused
@ -4078,7 +4078,7 @@ static inline float computePeriod(NSPoint mouseLocationWin,
- (void) setFrame: (NSRect)frameRect - (void) setFrame: (NSRect)frameRect
{ {
NSRect tmpRect = frameRect; NSRect tmpRect = frameRect;
if ([_super_view respondsToSelector:@selector(documentVisibleRect)]) if ([_super_view respondsToSelector: @selector(documentVisibleRect)])
{ {
float rowsHeight = ((_numberOfRows * _rowHeight) + 1); float rowsHeight = ((_numberOfRows * _rowHeight) + 1);
NSRect docRect = [(NSClipView *)_super_view documentVisibleRect]; NSRect docRect = [(NSClipView *)_super_view documentVisibleRect];
@ -4100,7 +4100,7 @@ static inline float computePeriod(NSPoint mouseLocationWin,
{ {
NSSize tmpSize = frameSize; NSSize tmpSize = frameSize;
if ([_super_view respondsToSelector:@selector(documentVisibleRect)]) if ([_super_view respondsToSelector: @selector(documentVisibleRect)])
{ {
float rowsHeight = ((_numberOfRows * _rowHeight) + 1); float rowsHeight = ((_numberOfRows * _rowHeight) + 1);
NSRect docRect = [(NSClipView *)_super_view documentVisibleRect]; NSRect docRect = [(NSClipView *)_super_view documentVisibleRect];
@ -4120,9 +4120,9 @@ static inline float computePeriod(NSPoint mouseLocationWin,
- (void) viewWillMoveToSuperview:(NSView *)newSuper - (void) viewWillMoveToSuperview:(NSView *)newSuper
{ {
[super viewWillMoveToSuperview:newSuper]; [super viewWillMoveToSuperview: newSuper];
/* need to potentially enlarge to fill the documentRect of the clip view */ /* need to potentially enlarge to fill the documentRect of the clip view */
[self setFrame:_frame]; [self setFrame: _frame];
} }
- (void) sizeToFit - (void) sizeToFit
@ -4984,7 +4984,7 @@ static inline float computePeriod(NSPoint mouseLocationWin,
switch ([(NSNumber *)textMovement intValue]) switch ([(NSNumber *)textMovement intValue])
{ {
case NSReturnTextMovement: case NSReturnTextMovement:
[self _editNextCellAfterRow:row inColumn:column]; [self _editNextCellAfterRow: row inColumn: column];
// Send action ? // Send action ?
break; break;
case NSTabTextMovement: case NSTabTextMovement:
@ -5584,19 +5584,23 @@ static inline float computePeriod(NSPoint mouseLocationWin,
} }
} }
- (void) _editNextCellAfterRow:(int)row inColumn:(int)column - (void) _editNextCellAfterRow: (int) row
inColumn: (int) column
{ {
if (++row >= _numberOfRows) if (++row >= _numberOfRows)
row = 0; row = 0;
if ([self _shouldSelectRow:row]) if ([self _shouldSelectRow: row])
{ {
[self selectRowIndexes:[NSIndexSet indexSetWithIndex:row] [self selectRowIndexes: [NSIndexSet indexSetWithIndex: row]
byExtendingSelection:NO]; byExtendingSelection: NO];
if ([self _isCellEditableColumn:column row:row]) if ([self _isCellEditableColumn: column row:row])
{ {
[self editColumn:column row:row withEvent:nil select:YES]; [self editColumn: column
row: row
withEvent: nil
select: YES];
} }
} }
} }