diff --git a/Quicksilver/Code-QuickStepInterface/QSObjectView.h b/Quicksilver/Code-QuickStepInterface/QSObjectView.h index f6eb6fd35..2641f1079 100644 --- a/Quicksilver/Code-QuickStepInterface/QSObjectView.h +++ b/Quicksilver/Code-QuickStepInterface/QSObjectView.h @@ -14,7 +14,7 @@ typedef enum { } QSObjectDropMode; -@interface QSObjectView : NSControl { +@interface QSObjectView : NSControl { NSString *searchString; BOOL dragImageDraw; BOOL dragAcceptDraw; diff --git a/Quicksilver/Code-QuickStepInterface/QSObjectView.m b/Quicksilver/Code-QuickStepInterface/QSObjectView.m index 5e5bdd6ef..f37942488 100644 --- a/Quicksilver/Code-QuickStepInterface/QSObjectView.m +++ b/Quicksilver/Code-QuickStepInterface/QSObjectView.m @@ -232,9 +232,15 @@ - (void)setSearchString:(NSString *)newSearchString { // [self setNeedsDisplay:YES]; } -- (NSDragOperation) draggingSourceOperationMaskForLocal:(BOOL)isLocal { - if (isLocal) return NSDragOperationMove; - else return ([[NSApp currentEvent] modifierFlags] & NSEventModifierFlagCommand) ? NSDragOperationNone : NSDragOperationEvery; +- (NSDragOperation)draggingSession:(NSDraggingSession *)session +sourceOperationMaskForDraggingContext:(NSDraggingContext) context { + switch (context) { + case NSDraggingContextWithinApplication: + return NSDragOperationMove; + case NSDraggingContextOutsideApplication: + default: + return ([[NSApp currentEvent] modifierFlags] & NSEventModifierFlagCommand) ? NSDragOperationNone : NSDragOperationEvery; + } } - (void)draggingSession:(NSDraggingSession *)session endedAtPoint:(NSPoint)screenPoint operation:(NSDragOperation)operation { diff --git a/Quicksilver/Code-QuickStepInterface/QSOutlineView.m b/Quicksilver/Code-QuickStepInterface/QSOutlineView.m index 439f12ec7..63a33189e 100644 --- a/Quicksilver/Code-QuickStepInterface/QSOutlineView.m +++ b/Quicksilver/Code-QuickStepInterface/QSOutlineView.m @@ -23,10 +23,16 @@ - (void)setHighlightColor:(NSColor *)aHighlightColor { - (BOOL)shouldCollapseAutoExpandedItemsForDeposited:(BOOL)deposited { return NO; } -- (NSDragOperation) draggingSourceOperationMaskForLocal:(BOOL)isLocal { - if (isLocal) return NSDragOperationMove; - else return NSDragOperationCopy; +- (NSDragOperation)draggingSession:(NSDraggingSession *)session sourceOperationMaskForDraggingContext:(NSDraggingContext)context { + switch (context) { + case NSDraggingContextWithinApplication: + return NSDragOperationMove; + case NSDraggingContextOutsideApplication: + default: + return NSDragOperationCopy; + } } + - (void)drawRow:(NSInteger)rowIndex clipRect:(NSRect)clipRect { if ([[self delegate] respondsToSelector:@selector(outlineView:itemIsSeparator:)] && [[self delegate] outlineView:self itemIsSeparator:[self itemAtRow:rowIndex]]) { diff --git a/Quicksilver/Code-QuickStepInterface/QSSearchObjectView.m b/Quicksilver/Code-QuickStepInterface/QSSearchObjectView.m index e588f8785..75b3c17f9 100644 --- a/Quicksilver/Code-QuickStepInterface/QSSearchObjectView.m +++ b/Quicksilver/Code-QuickStepInterface/QSSearchObjectView.m @@ -1717,11 +1717,10 @@ - (NSArray *)validAttributesForMarkedText { #pragma mark Drag and Drop -- (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation -{ +- (void)draggingSession:(NSDraggingSession *)session endedAtPoint:(NSPoint)screenPoint operation:(NSDragOperation)operation { [self updateHistory]; [self saveMnemonic]; - [super draggedImage:anImage endedAt:aPoint operation:operation]; + [super draggingSession:session endedAtPoint:screenPoint operation:operation]; } @end diff --git a/Quicksilver/Code-QuickStepInterface/QSTableView.m b/Quicksilver/Code-QuickStepInterface/QSTableView.m index ae7d54c2f..22d58347d 100644 --- a/Quicksilver/Code-QuickStepInterface/QSTableView.m +++ b/Quicksilver/Code-QuickStepInterface/QSTableView.m @@ -38,10 +38,14 @@ - (void)draggingExited:(id )sender { } -- (NSDragOperation) draggingSourceOperationMaskForLocal:(BOOL)isLocal { - //NSLog(@"source"); - if (isLocal) return NSDragOperationEvery; - else return NSDragOperationEvery; +- (NSDragOperation) draggingSession:(NSDraggingSession *)session sourceOperationMaskForDraggingContext:(NSDraggingContext)context { + switch (context) { + case NSDraggingContextWithinApplication: + return NSDragOperationEvery; + case NSDraggingContextOutsideApplication: + default: + return NSDragOperationEvery; + } } - (BOOL)isOpaque {