diff options
author | rowanbeentje <rowan@beent.je> | 2009-11-04 01:15:53 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-11-04 01:15:53 +0000 |
commit | 48d02b7080cadc507b1e7897c54ce2a8cf149acf (patch) | |
tree | f45eba9b97c71e1579580d790e9c9aa00088b26a /Source/CustomQuery.m | |
parent | 0d5acfadf8d43ab3889f50456f5dc7ff42bf1a12 (diff) | |
download | sequelpro-48d02b7080cadc507b1e7897c54ce2a8cf149acf.tar.gz sequelpro-48d02b7080cadc507b1e7897c54ce2a8cf149acf.tar.bz2 sequelpro-48d02b7080cadc507b1e7897c54ce2a8cf149acf.zip |
- Add task support to all the main interface views
- Improve task support on previously supported views
- Use a threaded task load for all initial table loads
- Support threaded task loads for table content loads, reloads, sorts, and filters
- Improve upon previous threaded task loads by minimising view updates and supporting updates of the existing data arrays where valid
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r-- | Source/CustomQuery.m | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index 25c90dba..c05d87f7 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -2567,10 +2567,8 @@ - (void) startDocumentTaskForTab:(NSNotification *)aNotification { - // Only proceed if the current document is the notifying document, and only if - // this view is selected. - if ([aNotification object] != tableDocumentInstance - || ![[[aNotification object] selectedToolbarItemIdentifier] isEqualToString:MAIN_TOOLBAR_CUSTOM_QUERY]) + // Only proceed if this view is selected. + if (![[tableDocumentInstance selectedToolbarItemIdentifier] isEqualToString:MAIN_TOOLBAR_CUSTOM_QUERY]) return; [runSelectionButton setEnabled:NO]; @@ -2585,10 +2583,8 @@ - (void) endDocumentTaskForTab:(NSNotification *)aNotification { - // Only proceed if the current document is the notifying document, and only if - // this view is selected. - if ([aNotification object] != tableDocumentInstance - || ![[[aNotification object] selectedToolbarItemIdentifier] isEqualToString:MAIN_TOOLBAR_CUSTOM_QUERY]) + // Only proceed if this view is selected. + if (![[tableDocumentInstance selectedToolbarItemIdentifier] isEqualToString:MAIN_TOOLBAR_CUSTOM_QUERY]) return; if (selectionButtonCanBeEnabled) { @@ -2780,11 +2776,11 @@ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(startDocumentTaskForTab:) name:SPDocumentTaskStartNotification - object:nil]; + object:tableDocumentInstance]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(endDocumentTaskForTab:) name:SPDocumentTaskEndNotification - object:nil]; + object:tableDocumentInstance]; } - (void)dealloc |