diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-03-25 08:59:35 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-03-25 08:59:35 +0000 |
commit | 74cb1152eeb0dcc83f12ea6cf040eacc4e15c551 (patch) | |
tree | 71ff5a4d8a069b3f2c8d46be4fe2a4854e42f9fc /Frameworks/MCPKit/MCPFoundationKit | |
parent | 32e858b26923b371a93e800687a13edf1254e445 (diff) | |
download | sequelpro-74cb1152eeb0dcc83f12ea6cf040eacc4e15c551.tar.gz sequelpro-74cb1152eeb0dcc83f12ea6cf040eacc4e15c551.tar.bz2 sequelpro-74cb1152eeb0dcc83f12ea6cf040eacc4e15c551.zip |
• Navigator
- make usage of a notification sent by the [MCPConnection queryDbStructure] to update the navigator, and this decouples a doc window and MCPConnection from the navigator
- minimized the tree update - now connectionID-based
- any tree update will be now performed on main thread and waits until done to avoid 'overlapping' updates triggered by different notifications which normally ended up in an inchoate tree display
Diffstat (limited to 'Frameworks/MCPKit/MCPFoundationKit')
-rw-r--r-- | Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h | 4 | ||||
-rw-r--r-- | Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h index 25ef7d36..5fa3fe86 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h @@ -67,9 +67,7 @@ static inline NSData* NSStringDataUsingLossyEncoding(NSString* self, NSInteger e - (NSString *)onReconnectShouldUseEncoding:(id)connection; - (void)noConnectionAvailable:(id)connection; - (MCPConnectionCheck)connectionLost:(id)connection; -- (void)updateNavigator:(id)sender; -- (NSString *)connectionID; - +- (NSString*)connectionID; @end @interface MCPConnection : NSObject diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m index 94fb4434..0685d162 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m @@ -44,7 +44,7 @@ const char *kMCPConnectionDefaultSocket = MYSQL_UNIX_ADDR; const NSUInteger kMCPConnection_Not_Inited = 1000; const NSUInteger kLengthOfTruncationForLog = 100; -static BOOL sTruncateLongFieldInLogs = YES; +static BOOL sTruncateLongFieldInLogs = YES; /** * Privte API @@ -1365,7 +1365,7 @@ void performThreadedKeepAlive(void *ptr) // Reset the query cancelled boolean queryCancelled = NO; - + // If no connection is present, return nil. if (!mConnected) { // Write a log entry @@ -2033,12 +2033,12 @@ void performThreadedKeepAlive(void *ptr) } uniqueDbIdentifier = [[NSDictionary dictionaryWithDictionary:uniqueIdentifier] retain]; - - if(delegate && [delegate respondsToSelector:@selector(updateNavigator:)]) - [[self delegate] updateNavigator:self]; + // Notify that the structure querying has been performed + [[NSNotificationCenter defaultCenter] postNotificationName:@"SPDBStructureWasUpdated" object:delegate]; isQueryingDbStructure = NO; [queryPool release]; + return; } mysql_close(structConnection); |