diff options
author | rowanbeentje <rowan@beent.je> | 2008-11-15 02:46:46 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2008-11-15 02:46:46 +0000 |
commit | 2af8b4caa41b66311036b6f5a1009c8494f5bcab (patch) | |
tree | 5de344e6a097b69d98abcd0a51803b98a67116be | |
parent | 3a01614df41b55bf8f484646c1f7550610741ef1 (diff) | |
download | sequelpro-2af8b4caa41b66311036b6f5a1009c8494f5bcab.tar.gz sequelpro-2af8b4caa41b66311036b6f5a1009c8494f5bcab.tar.bz2 sequelpro-2af8b4caa41b66311036b6f5a1009c8494f5bcab.zip |
Clean up connection cancellations - When cancel is pressed in the connection sheet, close the associated window, and check whether a connection was opened before closing it and notifying of connection close via Growl.
-rw-r--r-- | TableDocument.m | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/TableDocument.m b/TableDocument.m index a7f33ea8..ec42b1a6 100644 --- a/TableDocument.m +++ b/TableDocument.m @@ -239,6 +239,7 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa - (IBAction)cancelConnectSheet:(id)sender { [NSApp endSheet:connectSheet]; + [tableWindow close]; } - (IBAction)closeSheet:(id)sender @@ -1442,7 +1443,7 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa - (void)windowWillClose:(NSNotification *)aNotification { - [self closeConnection]; + if ([mySQLConnection isConnected]) [self closeConnection]; [[NSNotificationCenter defaultCenter] removeObserver:self]; } |