mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 02:50:48 +00:00
* Source/NSTableView.m (mouseDown:): Rename some local variables
to be less ambiguous. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24068 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1fcec7ffe9
commit
edf055a980
2 changed files with 17 additions and 14 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2006-11-10 Matt Rice <ratmice@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSTableView.m (mouseDown:): Rename some local variables
|
||||||
|
to be less ambiguous.
|
||||||
|
|
||||||
2006-11-10 Matt Rice <ratmice@gmail.com>
|
2006-11-10 Matt Rice <ratmice@gmail.com>
|
||||||
|
|
||||||
* Headers/AppKit/NSTableView.h: Add ivar for
|
* Headers/AppKit/NSTableView.h: Add ivar for
|
||||||
|
|
|
@ -3530,10 +3530,10 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
||||||
NSEvent *lastEvent;
|
NSEvent *lastEvent;
|
||||||
NSIndexSet *oldSelectedRows;
|
NSIndexSet *oldSelectedRows;
|
||||||
BOOL startedPeriodicEvents = NO;
|
BOOL startedPeriodicEvents = NO;
|
||||||
BOOL mouseUp = NO;
|
BOOL mouseBelowView = NO;
|
||||||
BOOL done = NO;
|
BOOL done = NO;
|
||||||
BOOL mouseMoved = NO;
|
BOOL mouseMoved = NO;
|
||||||
BOOL draggingPossible = [self _isDraggingSource];
|
BOOL dragOperationPossible = [self _isDraggingSource];
|
||||||
NSRect visibleRect = [self convertRect: [self visibleRect]
|
NSRect visibleRect = [self convertRect: [self visibleRect]
|
||||||
toView: nil];
|
toView: nil];
|
||||||
float minYVisible = NSMinY (visibleRect);
|
float minYVisible = NSMinY (visibleRect);
|
||||||
|
@ -3624,10 +3624,10 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
||||||
shouldComputeNewSelection = YES;
|
shouldComputeNewSelection = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (draggingPossible == YES)
|
if (dragOperationPossible == YES)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* dragging is still possible so
|
* a dragging operation is still possible so
|
||||||
* selections were never dragged,
|
* selections were never dragged,
|
||||||
* and a drag operation was never attempted.
|
* and a drag operation was never attempted.
|
||||||
* the cell was clicked,
|
* the cell was clicked,
|
||||||
|
@ -3655,13 +3655,13 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
||||||
mouseMoved = YES;
|
mouseMoved = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (draggingPossible == YES)
|
if (dragOperationPossible == YES)
|
||||||
{
|
{
|
||||||
if ([_selectedRows containsIndex:_clickedRow] == NO
|
if ([_selectedRows containsIndex:_clickedRow] == NO
|
||||||
|| (_verticalMotionDrag == NO
|
|| (_verticalMotionDrag == NO
|
||||||
&& fabs(mouseLocationWin.y - initialLocation.y) > 2))
|
&& fabs(mouseLocationWin.y - initialLocation.y) > 2))
|
||||||
{
|
{
|
||||||
draggingPossible = NO;
|
dragOperationPossible = NO;
|
||||||
}
|
}
|
||||||
else if ((fabs(mouseLocationWin.x - initialLocation.x) >= 4)
|
else if ((fabs(mouseLocationWin.x - initialLocation.x) >= 4)
|
||||||
|| (_verticalMotionDrag
|
|| (_verticalMotionDrag
|
||||||
|
@ -3673,7 +3673,7 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
draggingPossible = NO;
|
dragOperationPossible = NO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3739,21 +3739,20 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
||||||
withPeriod: oldPeriod];
|
withPeriod: oldPeriod];
|
||||||
startedPeriodicEvents = YES;
|
startedPeriodicEvents = YES;
|
||||||
if (mouseLocationWin.y <= minYVisible)
|
if (mouseLocationWin.y <= minYVisible)
|
||||||
mouseUp = NO;
|
mouseBelowView = YES;
|
||||||
else
|
else
|
||||||
mouseUp = YES;
|
mouseBelowView = NO;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NSPeriodic:
|
case NSPeriodic:
|
||||||
if (mouseUp == NO)
|
if (mouseBelowView == YES)
|
||||||
{
|
{
|
||||||
/* mouse below the table */
|
|
||||||
if (currentRow < _numberOfRows - 1)
|
if (currentRow < _numberOfRows - 1)
|
||||||
{
|
{
|
||||||
oldRow = currentRow;
|
oldRow = currentRow;
|
||||||
currentRow++;
|
currentRow++;
|
||||||
[self scrollRowToVisible: currentRow];
|
[self scrollRowToVisible: currentRow];
|
||||||
if (draggingPossible == NO)
|
if (dragOperationPossible == NO)
|
||||||
shouldComputeNewSelection = YES;
|
shouldComputeNewSelection = YES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3761,11 +3760,10 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
||||||
{
|
{
|
||||||
if (currentRow > 0)
|
if (currentRow > 0)
|
||||||
{
|
{
|
||||||
/* mouse above the table */
|
|
||||||
oldRow = currentRow;
|
oldRow = currentRow;
|
||||||
currentRow--;
|
currentRow--;
|
||||||
[self scrollRowToVisible: currentRow];
|
[self scrollRowToVisible: currentRow];
|
||||||
if (draggingPossible == NO)
|
if (dragOperationPossible == NO)
|
||||||
shouldComputeNewSelection = YES;
|
shouldComputeNewSelection = YES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue