aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionControllerInitializer.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-01-24 23:19:17 +0000
committerstuconnolly <stuart02@gmail.com>2012-01-24 23:19:17 +0000
commit816c870b93ad7bd3078d8b7a700e24354adfe4af (patch)
treedb67cc86569ec8b0bf830685ac2ff77c9e34d9fb /Source/SPConnectionControllerInitializer.m
parent91c69ffc2010a95bd18a6d21cc8665d810ed4128 (diff)
downloadsequelpro-816c870b93ad7bd3078d8b7a700e24354adfe4af.tar.gz
sequelpro-816c870b93ad7bd3078d8b7a700e24354adfe4af.tar.bz2
sequelpro-816c870b93ad7bd3078d8b7a700e24354adfe4af.zip
Tidy up.
Diffstat (limited to 'Source/SPConnectionControllerInitializer.m')
-rw-r--r--Source/SPConnectionControllerInitializer.m113
1 files changed, 94 insertions, 19 deletions
diff --git a/Source/SPConnectionControllerInitializer.m b/Source/SPConnectionControllerInitializer.m
index 5c11f301..34f9ca40 100644
--- a/Source/SPConnectionControllerInitializer.m
+++ b/Source/SPConnectionControllerInitializer.m
@@ -35,6 +35,7 @@ static NSString *SPConnectionViewNibName = @"ConnectionView";
- (void)_reloadFavoritesViewData;
- (void)_selectNode:(SPTreeNode *)node;
+
- (SPTreeNode *)_favoriteNodeForFavoriteID:(NSInteger)favoriteID;
@end
@@ -128,27 +129,101 @@ static NSString *SPConnectionViewNibName = @"ConnectionView";
*/
- (void)registerForNotifications
{
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(scrollViewFrameChanged:) name:NSViewFrameDidChangeNotification object:nil];
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(scrollViewFrameChanged:)
+ name:NSViewFrameDidChangeNotification
+ object:nil];
// Registered to be notified of changes to connection information
- [self addObserver:self forKeyPath:SPFavoriteNameKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
- [self addObserver:self forKeyPath:SPFavoriteHostKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
- [self addObserver:self forKeyPath:SPFavoriteUserKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
- [self addObserver:self forKeyPath:SPFavoriteDatabaseKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
- [self addObserver:self forKeyPath:SPFavoriteSocketKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
- [self addObserver:self forKeyPath:SPFavoritePortKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
- [self addObserver:self forKeyPath:SPFavoriteUseSSLKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
- [self addObserver:self forKeyPath:SPFavoriteSSHHostKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
- [self addObserver:self forKeyPath:SPFavoriteSSHUserKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
- [self addObserver:self forKeyPath:SPFavoriteSSHPortKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
- [self addObserver:self forKeyPath:SPFavoriteSSHKeyLocationEnabledKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
- [self addObserver:self forKeyPath:SPFavoriteSSHKeyLocationKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
- [self addObserver:self forKeyPath:SPFavoriteSSLKeyFileLocationEnabledKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
- [self addObserver:self forKeyPath:SPFavoriteSSLKeyFileLocationKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
- [self addObserver:self forKeyPath:SPFavoriteSSLCertificateFileLocationEnabledKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
- [self addObserver:self forKeyPath:SPFavoriteSSLCertificateFileLocationKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
- [self addObserver:self forKeyPath:SPFavoriteSSLCACertFileLocationEnabledKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
- [self addObserver:self forKeyPath:SPFavoriteSSLCACertFileLocationKey options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:NULL];
+ [self addObserver:self
+ forKeyPath:SPFavoriteNameKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
+ [self addObserver:self
+ forKeyPath:SPFavoriteHostKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
+ [self addObserver:self
+ forKeyPath:SPFavoriteUserKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
+ [self addObserver:self
+ forKeyPath:SPFavoriteDatabaseKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
+ [self addObserver:self
+ forKeyPath:SPFavoriteSocketKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
+ [self addObserver:self
+ forKeyPath:SPFavoritePortKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
+ [self addObserver:self
+ forKeyPath:SPFavoriteUseSSLKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
+ [self addObserver:self
+ forKeyPath:SPFavoriteSSHHostKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
+ [self addObserver:self
+ forKeyPath:SPFavoriteSSHUserKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
+ [self addObserver:self
+ forKeyPath:SPFavoriteSSHPortKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
+ [self addObserver:self
+ forKeyPath:SPFavoriteSSHKeyLocationEnabledKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
+ [self addObserver:self
+ forKeyPath:SPFavoriteSSHKeyLocationKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
+ [self addObserver:self
+ forKeyPath:SPFavoriteSSLKeyFileLocationEnabledKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
+ [self addObserver:self
+ forKeyPath:SPFavoriteSSLKeyFileLocationKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
+ [self addObserver:self
+ forKeyPath:SPFavoriteSSLCertificateFileLocationEnabledKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
+ [self addObserver:self
+ forKeyPath:SPFavoriteSSLCertificateFileLocationKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
+ [self addObserver:self
+ forKeyPath:SPFavoriteSSLCACertFileLocationEnabledKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
+ [self addObserver:self
+ forKeyPath:SPFavoriteSSLCACertFileLocationKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
}
/**