Correct the definition of NSDragOperation and all its usages.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31754 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2010-12-22 16:16:14 +00:00
parent 3a9b7dbab3
commit de9abfb7ee
11 changed files with 49 additions and 34 deletions

View file

@ -180,7 +180,7 @@ static GSDragView *sharedDragView = nil;
return dragPasteboard;
}
- (int) draggingSequenceNumber
- (NSInteger) draggingSequenceNumber
{
return dragSequence;
}
@ -190,7 +190,7 @@ static GSDragView *sharedDragView = nil;
return dragSource;
}
- (unsigned int) draggingSourceOperationMask
- (NSDragOperation) draggingSourceOperationMask
{
// Mix in possible modifiers
return dragMask & operationMask;
@ -250,7 +250,7 @@ static GSDragView *sharedDragView = nil;
// Unset the target window
targetWindowRef = 0;
targetMask = NSDragOperationAll;
targetMask = NSDragOperationEvery;
destExternal = NO;
NSDebugLLog(@"NSDragging", @"Start drag with %@", [pboard types]);
@ -423,7 +423,7 @@ static GSDragView *sharedDragView = nil;
- (BOOL) _updateOperationMask: (NSEvent*) theEvent
{
unsigned int mod = [theEvent modifierFlags];
unsigned int oldOperationMask = operationMask;
NSDragOperation oldOperationMask = operationMask;
if (operationMask == NSDragOperationIgnoresModifiers)
{
@ -444,7 +444,7 @@ static GSDragView *sharedDragView = nil;
}
else
{
operationMask = NSDragOperationAll;
operationMask = NSDragOperationEvery;
}
return (operationMask != oldOperationMask);
@ -477,7 +477,7 @@ static GSDragView *sharedDragView = nil;
NSCursor *newCursor;
NSString *name;
NSString *iname;
int mask;
NSDragOperation mask;
mask = dragMask & operationMask;
@ -775,7 +775,7 @@ static GSDragView *sharedDragView = nil;
NSDebugLLog(@"NSDragging", @"got GSAppKitDraggingStatus\n");
if ((int)[theEvent data1] == targetWindowRef)
{
unsigned int newTargetMask = [theEvent data2];
NSDragOperation newTargetMask = (NSDragOperation)[theEvent data2];
if (newTargetMask != targetMask)
{
@ -919,7 +919,7 @@ static GSDragView *sharedDragView = nil;
// Reset drag mask when we switch from external to internal or back
if (oldDestExternal != destExternal)
{
unsigned int newMask;
NSDragOperation newMask;
newMask = [dragSource draggingSourceOperationMaskForLocal: !destExternal];
if (newMask != dragMask)

View file

@ -165,7 +165,7 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
return NSDragOperationNone;
}
- (unsigned int) draggingSourceOperationMaskForLocal: (BOOL)flag
- (NSDragOperation) draggingSourceOperationMaskForLocal: (BOOL)flag
{
return NSDragOperationCopy;
}

View file

@ -342,7 +342,7 @@ static Class imageCellClass;
[super mouseDown: theEvent];
}
- (unsigned int) draggingSourceOperationMaskForLocal: (BOOL)isLocal
- (NSDragOperation) draggingSourceOperationMaskForLocal: (BOOL)isLocal
{
return NSDragOperationCopy;
}

View file

@ -137,7 +137,7 @@ setPath(NSBrowser *browser, NSString *path)
return NSDragOperationNone;
}
return NSDragOperationAll;
return NSDragOperationEvery;
}
- (BOOL) performDragOperation: (id<NSDraggingInfo>)sender

View file

@ -77,7 +77,7 @@ static NSTableViewDropOperation oldDropOperation;
static NSTableViewDropOperation currentDropOperation;
static int currentDropRow;
static int lastQuarterPosition;
static unsigned currentDragOperation;
static NSDragOperation currentDragOperation;
/*
* Nib compatibility struct. This structure is used to
@ -6095,7 +6095,7 @@ This method is deprecated, use -columnIndexesInRect:. */
}
- (unsigned int) draggingSourceOperationMaskForLocal: (BOOL)isLocal
- (NSDragOperation) draggingSourceOperationMaskForLocal: (BOOL)isLocal
{
if (isLocal)
{
@ -6107,7 +6107,7 @@ This method is deprecated, use -columnIndexesInRect:. */
}
}
- (void) setDraggingSourceOperationMask: (unsigned int)mask
- (void) setDraggingSourceOperationMask: (NSDragOperation)mask
forLocal: (BOOL)isLocal
{
if (isLocal)
@ -6127,11 +6127,10 @@ This method is deprecated, use -columnIndexesInRect:. */
oldDropRow = -1;
lastQuarterPosition = -1;
oldDraggingRect = NSMakeRect(0.,0., 0., 0.);
currentDragOperation = NSDragOperationAll;
currentDragOperation = NSDragOperationEvery;
return currentDragOperation;
}
- (void) draggingExited: (id <NSDraggingInfo>) sender
{
[self setNeedsDisplayInRect: oldDraggingRect];
@ -6145,7 +6144,7 @@ This method is deprecated, use -columnIndexesInRect:. */
int row;
int quarterPosition, positionInRow;
int currentRow;
unsigned dragOperation;
NSDragOperation dragOperation;
p = [self convertPoint: p fromView: nil];
/* This is a crude method of scrolling the view while dragging so

View file

@ -4922,7 +4922,7 @@ other than copy/paste or dragging. */
*/
// dragging of text, colors and files
- (unsigned int)draggingSourceOperationMaskForLocal:(BOOL)isLocal
- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal
{
return (NSDragOperationGeneric | NSDragOperationCopy);
}

View file

@ -317,7 +317,7 @@ NSString *GSMovableToolbarItemPboardType = @"GSMovableToolbarItemPboardType";
//nothing to do
}
- (unsigned int) draggingSourceOperationMaskForLocal: (BOOL)isLocal
- (NSDragOperation) draggingSourceOperationMaskForLocal: (BOOL)isLocal
{
return isLocal ? NSDragOperationGeneric : NSDragOperationNone;
}
@ -808,7 +808,7 @@ NSString *GSMovableToolbarItemPboardType = @"GSMovableToolbarItemPboardType";
//nothing to do
}
- (unsigned int) draggingSourceOperationMaskForLocal: (BOOL)isLocal
- (NSDragOperation) draggingSourceOperationMaskForLocal: (BOOL)isLocal
{
return isLocal ? NSDragOperationGeneric : NSDragOperationNone;
}