Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Quicksilver/Code-QuickStepInterface/QSObjectView.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ typedef enum {
} QSObjectDropMode;


@interface QSObjectView : NSControl {
@interface QSObjectView : NSControl <NSDraggingSource> {
NSString *searchString;
BOOL dragImageDraw;
BOOL dragAcceptDraw;
Expand Down
12 changes: 9 additions & 3 deletions Quicksilver/Code-QuickStepInterface/QSObjectView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 9 additions & 3 deletions Quicksilver/Code-QuickStepInterface/QSOutlineView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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]]) {
Expand Down
5 changes: 2 additions & 3 deletions Quicksilver/Code-QuickStepInterface/QSSearchObjectView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 8 additions & 4 deletions Quicksilver/Code-QuickStepInterface/QSTableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ - (void)draggingExited:(id <NSDraggingInfo>)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 {
Expand Down