aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableSource.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-11-04 01:15:53 +0000
committerrowanbeentje <rowan@beent.je>2009-11-04 01:15:53 +0000
commit48d02b7080cadc507b1e7897c54ce2a8cf149acf (patch)
treef45eba9b97c71e1579580d790e9c9aa00088b26a /Source/TableSource.m
parent0d5acfadf8d43ab3889f50456f5dc7ff42bf1a12 (diff)
downloadsequelpro-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/TableSource.m')
-rw-r--r--Source/TableSource.m15
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/TableSource.m b/Source/TableSource.m
index f5900bc5..2111a498 100644
--- a/Source/TableSource.m
+++ b/Source/TableSource.m
@@ -47,7 +47,7 @@ loads aTable, put it in an array, update the tableViewColumns and reload the tab
id extra;
int i;
SPSQLParser *fieldParser;
- BOOL enableInteraction = ![tableDocumentInstance isWorking];
+ BOOL enableInteraction = ![[tableDocumentInstance selectedToolbarItemIdentifier] isEqualToString:MAIN_TOOLBAR_TABLE_STRUCTURE] || ![tableDocumentInstance isWorking];
// Check whether a save of the current row is required.
if ( ![self saveRowOnDeselect] ) return;
@@ -1057,10 +1057,8 @@ returns a dictionary containing enum/set field names as key and possible values
- (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_TABLE_STRUCTURE])
+ // Only proceed if this view is selected.
+ if (![[tableDocumentInstance selectedToolbarItemIdentifier] isEqualToString:MAIN_TOOLBAR_TABLE_STRUCTURE])
return;
[tableSourceView setEnabled:NO];
@@ -1083,8 +1081,7 @@ returns a dictionary containing enum/set field names as key and possible values
{
// Only re-enable elements if the current tab is the structure view
- if ([aNotification object] != tableDocumentInstance
- || ![[[aNotification object] selectedToolbarItemIdentifier] isEqualToString:MAIN_TOOLBAR_TABLE_STRUCTURE])
+ if (![[tableDocumentInstance selectedToolbarItemIdentifier] isEqualToString:MAIN_TOOLBAR_TABLE_STRUCTURE])
return;
BOOL editingEnabled = ([tablesListInstance tableType] == SP_TABLETYPE_TABLE);
@@ -1471,11 +1468,11 @@ would result in a position change.
[[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