diff options
author | rowanbeentje <rowan@beent.je> | 2012-10-14 16:09:45 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-10-14 16:09:45 +0000 |
commit | dc45c654aab99cbccecda192396dc8baefd5690e (patch) | |
tree | a1b0a16eb468e191177c3617fc1f3c73c3e4750f /Source/SPConnectionControllerInitializer.m | |
parent | 7d14dae0476ee3e3ab7c2fac391c506ac320d5ea (diff) | |
download | sequelpro-dc45c654aab99cbccecda192396dc8baefd5690e.tar.gz sequelpro-dc45c654aab99cbccecda192396dc8baefd5690e.tar.bz2 sequelpro-dc45c654aab99cbccecda192396dc8baefd5690e.zip |
- In the SPMySQL.framework, separate framework-triggered connections and disconnections from external actions, and use that separation to perform safer disconnects
- When closing a database document, add a new notification, and use that to resolve retain cycles affecting connection processes
- Improve connection controller disconnection when the document is closed, fixing crashes, by building on those two features (addresses Issue #1396)
- Use some of the new functionality to improve SSH and MySQL connection cancellation, making both cancelable in the interface and making both respond much more quickly
Diffstat (limited to 'Source/SPConnectionControllerInitializer.m')
-rw-r--r-- | Source/SPConnectionControllerInitializer.m | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/SPConnectionControllerInitializer.m b/Source/SPConnectionControllerInitializer.m index b3f06691..2f4d725e 100644 --- a/Source/SPConnectionControllerInitializer.m +++ b/Source/SPConnectionControllerInitializer.m @@ -85,7 +85,6 @@ static NSString *SPConnectionViewNibName = @"ConnectionView"; sshTunnel = nil; mySQLConnection = nil; cancellingConnection = NO; - mySQLConnectionCancelled = NO; favoriteNameFieldWasAutogenerated = NO; [self loadNib]; @@ -169,6 +168,11 @@ static NSString *SPConnectionViewNibName = @"ConnectionView"; */ - (void)registerForNotifications { + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(_documentWillClose:) + name:SPDocumentWillCloseNotification + object:dbDocument]; + #ifndef SP_REFACTOR [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(scrollViewFrameChanged:) |