aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
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