aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPNavigatorController.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2011-05-14 17:26:18 +0000
committerstuconnolly <stuart02@gmail.com>2011-05-14 17:26:18 +0000
commit2dbae24c7735ead0524bd9847af6ea99d8654ec6 (patch)
tree87dbed4317214da2aa9e2aed493fd7b798b3e2bc /Source/SPNavigatorController.m
parent160728cd29519794b47b3a09b139ce9d604883f0 (diff)
downloadsequelpro-2dbae24c7735ead0524bd9847af6ea99d8654ec6.tar.gz
sequelpro-2dbae24c7735ead0524bd9847af6ea99d8654ec6.tar.bz2
sequelpro-2dbae24c7735ead0524bd9847af6ea99d8654ec6.zip
Bring outline view branch up to date with trunk (r3279:r3306).
Diffstat (limited to 'Source/SPNavigatorController.m')
-rw-r--r--Source/SPNavigatorController.m13
1 files changed, 4 insertions, 9 deletions
diff --git a/Source/SPNavigatorController.m b/Source/SPNavigatorController.m
index be24948b..1c17dd25 100644
--- a/Source/SPNavigatorController.m
+++ b/Source/SPNavigatorController.m
@@ -39,11 +39,6 @@
static SPNavigatorController *sharedNavigatorController = nil;
-#ifndef SP_REFACTOR /* pasteboard types */
-#define DragFromNavigatorPboardType @"SPDragFromNavigatorPboardType"
-#define DragTableDataFromNavigatorPboardType @"SPDragTableDataFromNavigatorPboardType"
-#endif
-
@implementation SPNavigatorController
#ifndef SP_REFACTOR /* unused sort func */
@@ -146,7 +141,7 @@ static NSComparisonResult compareStrings(NSString *s1, NSString *s2, void* conte
prefs = [NSUserDefaults standardUserDefaults];
[self setWindowFrameAutosaveName:@"SPNavigator"];
- [outlineSchema2 registerForDraggedTypes:[NSArray arrayWithObjects:DragTableDataFromNavigatorPboardType, DragFromNavigatorPboardType, NSStringPboardType, nil]];
+ [outlineSchema2 registerForDraggedTypes:[NSArray arrayWithObjects:SPNavigatorTableDataPasteboardDragType, SPNavigatorPasteboardDragType, NSStringPboardType, nil]];
[outlineSchema2 setDraggingSourceOperationMask:NSDragOperationEvery forLocal:YES];
[outlineSchema2 setDraggingSourceOperationMask:NSDragOperationEvery forLocal:NO];
@@ -1108,7 +1103,7 @@ static NSComparisonResult compareStrings(NSString *s1, NSString *s2, void* conte
- (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items toPasteboard:(NSPasteboard *)pboard
{
// Provide data for our custom type, and simple NSStrings.
- [pboard declareTypes:[NSArray arrayWithObjects:DragTableDataFromNavigatorPboardType, DragFromNavigatorPboardType, NSStringPboardType, nil] owner:self];
+ [pboard declareTypes:[NSArray arrayWithObjects:SPNavigatorTableDataPasteboardDragType, SPNavigatorPasteboardDragType, NSStringPboardType, nil] owner:self];
// Collect the actual schema paths without leading connection ID
NSMutableArray *draggedItems = [NSMutableArray array];
@@ -1125,7 +1120,7 @@ static NSComparisonResult compareStrings(NSString *s1, NSString *s2, void* conte
NSKeyedArchiver *archiver = [[[NSKeyedArchiver alloc] initForWritingWithMutableData:arraydata] autorelease];
[archiver encodeObject:draggedItems forKey:@"itemdata"];
[archiver finishEncoding];
- [pboard setData:arraydata forType:DragFromNavigatorPboardType];
+ [pboard setData:arraydata forType:SPNavigatorPasteboardDragType];
if([draggedItems count] == 1) {
NSArray *pathComponents = [[draggedItems objectAtIndex:0] componentsSeparatedByString:SPUniqueSchemaDelimiter];
@@ -1134,7 +1129,7 @@ static NSComparisonResult compareStrings(NSString *s1, NSString *s2, void* conte
[pboard setString:[NSString stringWithFormat:@"CREATE TABLE IF NOT EXISTS %@ SELECT * FROM %@",
[[pathComponents lastObject] backtickQuotedString],
[pathComponents componentsJoinedByPeriodAndBacktickQuoted]
- ] forType:DragTableDataFromNavigatorPboardType];
+ ] forType:SPNavigatorTableDataPasteboardDragType];
}
}
// For external destinations provide a comma separated string