aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPConnectionController.h1
-rw-r--r--Source/SPConnectionControllerDelegate.m16
2 files changed, 9 insertions, 8 deletions
diff --git a/Source/SPConnectionController.h b/Source/SPConnectionController.h
index a069253b..e8ee5e9d 100644
--- a/Source/SPConnectionController.h
+++ b/Source/SPConnectionController.h
@@ -172,6 +172,7 @@
BOOL favoriteNameFieldWasTouched;
#ifndef SP_REFACTOR /* ivars */
+ NSArray *draggedNodes;
NSImage *folderImage;
SPTreeNode *favoritesRoot;
diff --git a/Source/SPConnectionControllerDelegate.m b/Source/SPConnectionControllerDelegate.m
index 5230ff5a..c0bdf5d8 100644
--- a/Source/SPConnectionControllerDelegate.m
+++ b/Source/SPConnectionControllerDelegate.m
@@ -168,12 +168,14 @@ static NSString *SPDatabaseImage = @"database-small";
return NO;
}
-
+
[pboard declareTypes:[NSArray arrayWithObject:SPFavoritesPasteboardDragType] owner:self];
- //[pboard setData:[NSKeyedArchiver archivedDataWithRootObject:items] forType:SPFavoritesPasteboardDragType];
- [pboard setData:[NSData data] forType:SPFavoritesPasteboardDragType];
+
+ BOOL result = [pboard setData:[NSData data] forType:SPFavoritesPasteboardDragType];
- return YES;
+ draggedNodes = items;
+
+ return result;
}
- (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id <NSDraggingInfo>)info proposedItem:(id)item proposedChildIndex:(NSInteger)index
@@ -213,11 +215,9 @@ static NSString *SPDatabaseImage = @"database-small";
[menuItem setState:NSOffState];
}
- NSArray *nodes = [self selectedFavoriteNodes];
-
- //NSArray *nodes = [NSKeyedUnarchiver unarchiveObjectWithData:[[info draggingPasteboard] dataForType:SPFavoritesPasteboardDragType]];
+ NSArray *nodes = draggedNodes;
- //if (![nodes count]) return acceptedDrop;
+ if (![nodes count]) return acceptedDrop;
if ([node isGroup]) {
if (index == NSOutlineViewDropOnItemIndex) {