aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CustomQuery.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-11-05 00:00:23 +0000
committerrowanbeentje <rowan@beent.je>2009-11-05 00:00:23 +0000
commit4cc035fd625bc2ee76927cf9e7649af829ce8482 (patch)
tree170a8ac6da319e002f48e1ca561f55f5177d4209 /Source/CustomQuery.m
parent97fd0957cef34210caece133fee16a370e5b9f5d (diff)
downloadsequelpro-4cc035fd625bc2ee76927cf9e7649af829ce8482.tar.gz
sequelpro-4cc035fd625bc2ee76927cf9e7649af829ce8482.tar.bz2
sequelpro-4cc035fd625bc2ee76927cf9e7649af829ce8482.zip
- Alter query start/stop notifications to apply to only the originating window, regardless of key state, by passing in and looking for the table document instance
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r--Source/CustomQuery.m10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index c05d87f7..93567aa5 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -389,7 +389,7 @@
[tableDocumentInstance setQueryMode:SP_QUERYMODE_CUSTOMQUERY];
// Notify listeners that a query has started
- [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:tableDocumentInstance];
// Start the notification timer to allow notifications to be shown even if frontmost for long queries
[[SPGrowlController sharedGrowlController] setVisibilityForNotificationName:@"Query Finished"];
@@ -688,7 +688,7 @@
[streamingResult release];
// Notify any listeners that the query has completed
- [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:tableDocumentInstance];
// Perform the Growl notification for query completion
[[SPGrowlController sharedGrowlController] notifyWithTitle:@"Query Finished"
@@ -734,7 +734,7 @@
[customQueryView setTableInstance:self withTableData:fullResult withColumns:cqColumnDefinition withTableName:resultTableName withConnection:mySQLConnection];
//query finished
- [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:tableDocumentInstance];
// Query finished Growl notification
[[SPGrowlController sharedGrowlController] notifyWithTitle:@"Query Finished"
@@ -1376,7 +1376,7 @@
// Check if the IDstring identifies the current field bijectively
int numberOfPossibleUpdateRows = [[[[mySQLConnection queryString:[NSString stringWithFormat:@"SELECT COUNT(*) FROM %@.%@ %@", [[columnDefinition objectForKey:@"db"] backtickQuotedString], [tableForColumn backtickQuotedString], fieldIDQueryString]] fetchRowAsArray] objectAtIndex:0] intValue];
if(numberOfPossibleUpdateRows == 1) {
- // [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
+ // [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:tableDocumentInstance];
NSString *newObject = nil;
if ( [anObject isKindOfClass:[NSCalendarDate class]] ) {
@@ -1405,7 +1405,7 @@
[columnDefinition objectForKey:@"db"], [tableForColumn backtickQuotedString],
[columnDefinition objectForKey:@"db"], [tableForColumn backtickQuotedString], [columnName backtickQuotedString], newObject, fieldIDQueryString]];
- // [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+ // [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:tableDocumentInstance];
// Check for errors while UPDATE
if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {