aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-10-27 01:24:00 +0000
committerrowanbeentje <rowan@beent.je>2009-10-27 01:24:00 +0000
commita99b0940d264ffbc4c525c5f17049f64e391ccc3 (patch)
tree2a8c20d71f0d15ff66bf464805542cf1f0e8b9cd /Source/TableDocument.m
parent9e6adb426de189704f0d0fe09b926b286dbb813e (diff)
downloadsequelpro-a99b0940d264ffbc4c525c5f17049f64e391ccc3.tar.gz
sequelpro-a99b0940d264ffbc4c525c5f17049f64e391ccc3.tar.bz2
sequelpro-a99b0940d264ffbc4c525c5f17049f64e391ccc3.zip
- Set up TableSource to respond to task notifications to prepare for threaded queries
- Alter task notifications to pass the TableDocument as the notification object so that only the current window responds to the notification, allowing other windows to be fully used while a window is performing a task
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r--Source/TableDocument.m12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 2515dde2..40428e53 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -1132,7 +1132,7 @@
_isWorking = YES;
[dbTablesTableView setEnabled:NO];
[historyControl setEnabled:NO];
- [[NSNotificationCenter defaultCenter] postNotificationName:SPDocumentTaskStartNotification object:[mainToolbar selectedItemIdentifier]];
+ [[NSNotificationCenter defaultCenter] postNotificationName:SPDocumentTaskStartNotification object:self];
// Reset the progress indicator
taskDisplayIsIndeterminate = YES;
@@ -1209,7 +1209,7 @@
_isWorking = NO;
[dbTablesTableView setEnabled:YES];
[historyControl setEnabled:YES];
- [[NSNotificationCenter defaultCenter] postNotificationName:SPDocumentTaskEndNotification object:[mainToolbar selectedItemIdentifier]];
+ [[NSNotificationCenter defaultCenter] postNotificationName:SPDocumentTaskEndNotification object:self];
}
/**
@@ -3002,6 +3002,14 @@
}
/**
+ * Return the identifier for the currently selected toolbar item, or nil if none is selected.
+ */
+- (NSString *)selectedToolbarItemIdentifier;
+{
+ return [mainToolbar selectedItemIdentifier];
+}
+
+/**
* toolbar delegate method
*/
- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)willBeInsertedIntoToolbar