aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseDocument.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-12-01 14:57:27 +0000
committerBibiko <bibiko@eva.mpg.de>2010-12-01 14:57:27 +0000
commita7981fb1f88c16fbd0f7732a03d63f599d94309b (patch)
tree2dd7166d8a2b141651e9485fa31c9007295da9f4 /Source/SPDatabaseDocument.m
parent40b1a5d57e6445f5a644521018ceb7762b3b59b8 (diff)
downloadsequelpro-a7981fb1f88c16fbd0f7732a03d63f599d94309b.tar.gz
sequelpro-a7981fb1f88c16fbd0f7732a03d63f599d94309b.tar.bz2
sequelpro-a7981fb1f88c16fbd0f7732a03d63f599d94309b.zip
• progress on trigger support for Bundle commands
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r--Source/SPDatabaseDocument.m17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 309679fe..02889b5e 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -5301,6 +5301,23 @@
[[parentWindow onMainThread] makeFirstResponder:[tablesListInstance valueForKeyPath:@"tablesListView"]];
}
+ NSArray *triggeredCommands = [[NSApp delegate] bundleCommandsForTrigger:SPBundleTriggerActionDatabaseChanged];
+ for(NSString* cmdPath in triggeredCommands) {
+ NSArray *data = [cmdPath componentsSeparatedByString:@"|"];
+ NSMenuItem *aMenuItem = [[[NSMenuItem alloc] init] autorelease];
+ [aMenuItem setTag:0];
+ [aMenuItem setToolTip:[data objectAtIndex:0]];
+ if([[data objectAtIndex:1] isEqualToString:SPBundleScopeGeneral]) {
+ ;
+ }
+ else if([[data objectAtIndex:1] isEqualToString:SPBundleScopeInputField]) {
+ ;
+ }
+ else if([[data objectAtIndex:1] isEqualToString:SPBundleScopeDataTable]) {
+ ;
+ }
+ }
+
// If a the table has changed, update the selection
if (![targetItemName isEqualToString:[self table]]) {
if (targetItemName) {