aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionController.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2011-03-13 18:50:40 +0000
committerstuconnolly <stuart02@gmail.com>2011-03-13 18:50:40 +0000
commit1632c45fdd9d0b8fe1e0aef3e891e8bd5704df29 (patch)
treef2fc34195718108f7770900994443931b6b8807e /Source/SPConnectionController.m
parentc2cf0e39c3c59c3548bf39f0835ac552cdcd23f4 (diff)
downloadsequelpro-1632c45fdd9d0b8fe1e0aef3e891e8bd5704df29.tar.gz
sequelpro-1632c45fdd9d0b8fe1e0aef3e891e8bd5704df29.tar.bz2
sequelpro-1632c45fdd9d0b8fe1e0aef3e891e8bd5704df29.zip
Fix issue related to dragging a node to a group node that is being renamed as well as fix all warnings related to the connection outlinew view.
Diffstat (limited to 'Source/SPConnectionController.m')
-rw-r--r--Source/SPConnectionController.m20
1 files changed, 12 insertions, 8 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m
index da828cda..0362b9ae 100644
--- a/Source/SPConnectionController.m
+++ b/Source/SPConnectionController.m
@@ -118,9 +118,11 @@ static NSComparisonResult compareFavoritesUsingKey(id favorite1, id favorite2, v
connectionSSHKeychainItemName = nil;
connectionSSHKeychainItemAccount = nil;
+ isEditing = NO;
+ isConnecting = NO;
+
sshTunnel = nil;
mySQLConnection = nil;
- isConnecting = NO;
cancellingConnection = NO;
mySQLConnectionCancelled = NO;
@@ -519,7 +521,7 @@ static NSComparisonResult compareFavoritesUsingKey(id favorite1, id favorite2, v
// Perform sorting
[self _sortFavorites];
- if (previousSortItem > -1) [[[sender menu] itemAtIndex:previousSortItem] setState:NSOffState];
+ if ((NSInteger)previousSortItem > -1) [[[sender menu] itemAtIndex:previousSortItem] setState:NSOffState];
[[[sender menu] itemAtIndex:currentSortItem] setState:NSOnState];
}
@@ -637,7 +639,7 @@ static NSComparisonResult compareFavoritesUsingKey(id favorite1, id favorite2, v
/**
* Returns the selected favorite data dictionary or nil if nothing is selected.
*/
-- (NSDictionary *)selectedFavorite
+- (NSMutableDictionary *)selectedFavorite
{
SPTreeNode *node = [self selectedFavoriteNode];
@@ -714,7 +716,7 @@ static NSComparisonResult compareFavoritesUsingKey(id favorite1, id favorite2, v
SPTreeNode *selectedNode = [self selectedFavoriteNode];
- SPTreeNode *parent = ([selectedNode isGroup]) ? selectedNode : [selectedNode parentNode];
+ SPTreeNode *parent = ([selectedNode isGroup]) ? selectedNode : (SPTreeNode *)[selectedNode parentNode];
SPTreeNode *node = [favoritesController addFavoriteNodeWithData:favorite asChildOfNode:parent];
@@ -722,7 +724,7 @@ static NSComparisonResult compareFavoritesUsingKey(id favorite1, id favorite2, v
[self _selectNode:node];
[[[[NSApp delegate] preferenceController] generalPreferencePane] updateDefaultFavoritePopup];
-
+
favoriteNameFieldWasTouched = NO;
[favoritesOutlineView editColumn:0 row:[favoritesOutlineView selectedRow] withEvent:nil select:YES];
@@ -829,13 +831,15 @@ static NSComparisonResult compareFavoritesUsingKey(id favorite1, id favorite2, v
{
SPTreeNode *selectedNode = [self selectedFavoriteNode];
- SPTreeNode *parent = ([selectedNode isGroup]) ? selectedNode : [selectedNode parentNode];
+ SPTreeNode *parent = ([selectedNode isGroup]) ? selectedNode : (SPTreeNode *)[selectedNode parentNode];
SPTreeNode *node = [favoritesController addGroupNodeWithName:NSLocalizedString(@"New Folder", @"new folder placeholder name") asChildOfNode:parent];
[self _reloadFavoritesViewData];
[self _selectNode:node];
+ isEditing = YES;
+
[favoritesOutlineView editColumn:0 row:[favoritesOutlineView selectedRow] withEvent:nil select:YES];
}
@@ -928,7 +932,7 @@ static NSComparisonResult compareFavoritesUsingKey(id favorite1, id favorite2, v
SPTreeNode *selectedNode = [self selectedFavoriteNode];
- SPTreeNode *parent = ([selectedNode isGroup]) ? selectedNode : [selectedNode parentNode];
+ SPTreeNode *parent = ([selectedNode isGroup]) ? selectedNode : (SPTreeNode *)[selectedNode parentNode];
SPTreeNode *node = [favoritesController addFavoriteNodeWithData:favorite asChildOfNode:parent];
@@ -1322,7 +1326,7 @@ static NSComparisonResult compareFavoritesUsingKey(id favorite1, id favorite2, v
// Re-enable favorites table view
[favoritesOutlineView setEnabled:YES];
- [favoritesOutlineView display];
+ [(NSView *)favoritesOutlineView display];
mySQLConnectionCancelled = NO;