aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CustomQuery.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-06-01 00:10:02 +0000
committerrowanbeentje <rowan@beent.je>2010-06-01 00:10:02 +0000
commita2d64457e1c52d2d72863407537e950c80595231 (patch)
treeef59124222e77a56bcf88ce446626bd6aa6e8eed /Source/CustomQuery.m
parentf5e5d40e5e9569470e52cbaaba4d4352dc2a71d7 (diff)
downloadsequelpro-a2d64457e1c52d2d72863407537e950c80595231.tar.gz
sequelpro-a2d64457e1c52d2d72863407537e950c80595231.tar.bz2
sequelpro-a2d64457e1c52d2d72863407537e950c80595231.zip
- Ensure start/end query notifications are sent on the main thread to avoid the interface being updated from the wrong thread on listeners
- Add a "Support Files" folder to MCPKit, containing NSNotificationAdditions to support main thread notifications from within MCPKit
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r--Source/CustomQuery.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index 3585eb16..b5ba5306 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -503,7 +503,7 @@
[tableDocumentInstance setQueryMode:SPCustomQueryQueryMode];
// Notify listeners that a query has started
- [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:tableDocumentInstance];
+ [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadWithName:@"SMySQLQueryWillBePerformed" object:tableDocumentInstance];
// Start the notification timer to allow notifications to be shown even if frontmost for long queries
[[SPGrowlController sharedGrowlController] setVisibilityForNotificationName:@"Query Finished"];
@@ -740,7 +740,7 @@
[customQueryView performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:YES];
// Notify any listeners that the query has completed
- [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:tableDocumentInstance];
+ [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadWithName:@"SMySQLQueryHasBeenPerformed" object:tableDocumentInstance];
// Perform the Growl notification for query completion
[[SPGrowlController sharedGrowlController] notifyWithTitle:@"Query Finished"
@@ -794,7 +794,7 @@
[customQueryView setTableInstance:self withTableData:resultData withColumns:cqColumnDefinition withTableName:resultTableName withConnection:mySQLConnection];
//query finished
- [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:tableDocumentInstance];
+ [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadWithName:@"SMySQLQueryHasBeenPerformed" object:tableDocumentInstance];
// Query finished Growl notification
[[SPGrowlController sharedGrowlController] notifyWithTitle:@"Query Finished"