aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionControllerDelegate.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-05-09 11:54:15 +0000
committerstuconnolly <stuart02@gmail.com>2012-05-09 11:54:15 +0000
commit9131db394c46f10260fcec1a1df5216b140e2bc2 (patch)
treec22c7f4d75eae131ccb9f44f00f3675d7076b500 /Source/SPConnectionControllerDelegate.m
parent688da863bf88089d5bea4a6982b8eb59a578491c (diff)
downloadsequelpro-9131db394c46f10260fcec1a1df5216b140e2bc2.tar.gz
sequelpro-9131db394c46f10260fcec1a1df5216b140e2bc2.tar.bz2
sequelpro-9131db394c46f10260fcec1a1df5216b140e2bc2.zip
Fix gcc warnings.
Diffstat (limited to 'Source/SPConnectionControllerDelegate.m')
-rw-r--r--Source/SPConnectionControllerDelegate.m20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/SPConnectionControllerDelegate.m b/Source/SPConnectionControllerDelegate.m
index bc6800c3..35b69aeb 100644
--- a/Source/SPConnectionControllerDelegate.m
+++ b/Source/SPConnectionControllerDelegate.m
@@ -191,15 +191,15 @@ static NSString *SPDatabaseImage = @"database-small";
return result;
}
-- (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id <NSDraggingInfo>)info proposedItem:(id)item proposedChildIndex:(NSInteger)index
+- (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id <NSDraggingInfo>)info proposedItem:(id)item proposedChildIndex:(NSInteger)childIndex
{
NSDragOperation result = NSDragOperationNone;
// Prevent dropping favorites on other favorites (non-groups)
- if ((index == NSOutlineViewDropOnItemIndex) && (![item isGroup])) return result;
+ if ((childIndex == NSOutlineViewDropOnItemIndex) && (![item isGroup])) return result;
if ([info draggingSource] == outlineView) {
- [outlineView setDropItem:item dropChildIndex:index];
+ [outlineView setDropItem:item dropChildIndex:childIndex];
result = NSDragOperationMove;
}
@@ -207,7 +207,7 @@ static NSString *SPDatabaseImage = @"database-small";
return result;
}
-- (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <NSDraggingInfo>)info item:(id)item childIndex:(NSInteger)index
+- (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <NSDraggingInfo>)info item:(id)item childIndex:(NSInteger)childIndex
{
BOOL acceptedDrop = NO;
@@ -231,13 +231,13 @@ static NSString *SPDatabaseImage = @"database-small";
if (![draggedNodes count]) return acceptedDrop;
if ([node isGroup]) {
- if (index == NSOutlineViewDropOnItemIndex) {
- index = 0;
+ if (childIndex == NSOutlineViewDropOnItemIndex) {
+ childIndex = 0;
}
}
else {
- if (index == NSOutlineViewDropOnItemIndex) {
- index = 0;
+ if (childIndex == NSOutlineViewDropOnItemIndex) {
+ childIndex = 0;
}
}
@@ -251,13 +251,13 @@ static NSString *SPDatabaseImage = @"database-small";
{
// Remove the node from its old location
NSInteger oldIndex = [childNodeArray indexOfObject:treeNode];
- NSInteger newIndex = index;
+ NSInteger newIndex = childIndex;
if (oldIndex != NSNotFound) {
[childNodeArray removeObjectAtIndex:oldIndex];
- if (index > oldIndex) {
+ if (childIndex > oldIndex) {
newIndex--;
}
}