diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-12-01 21:42:58 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-12-01 21:42:58 +0000 |
commit | 842e85a37b698be1245dee0948a1abd99973638c (patch) | |
tree | b9e642508660110488fdf4d90e3bd2c3c6dd9181 /Source/SPTableContent.m | |
parent | a7981fb1f88c16fbd0f7732a03d63f599d94309b (diff) | |
download | sequelpro-842e85a37b698be1245dee0948a1abd99973638c.tar.gz sequelpro-842e85a37b698be1245dee0948a1abd99973638c.tar.bz2 sequelpro-842e85a37b698be1245dee0948a1abd99973638c.zip |
• Bundle Editor / Bundle commands
- enabled trigger support to run a command if db, table, or table row was changed
- HTML output window will be ordered out without making it the key window to remain the first responder
• SPTableTExtFieldCell
- forgotten to remove expansionFrameWithFrame: method
Diffstat (limited to 'Source/SPTableContent.m')
-rw-r--r-- | Source/SPTableContent.m | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 393e0e94..b8656845 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -3866,6 +3866,26 @@ } [self updateCountText]; + + NSArray *triggeredCommands = [[NSApp delegate] bundleCommandsForTrigger:SPBundleTriggerActionTableRowChanged]; + 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]) { + [[[NSApp delegate] onMainThread] executeBundleItemForApp:aMenuItem]; + } + else if([[data objectAtIndex:1] isEqualToString:SPBundleScopeDataTable]) { + if([[[[[NSApp mainWindow] firstResponder] class] description] isEqualToString:@"SPCopyTable"]) + [[[[NSApp mainWindow] firstResponder] onMainThread] executeBundleItemForDataTable:aMenuItem]; + } + else if([[data objectAtIndex:1] isEqualToString:SPBundleScopeInputField]) { + if([[[NSApp mainWindow] firstResponder] isKindOfClass:[NSTextView class]]) + [[[[NSApp mainWindow] firstResponder] onMainThread] executeBundleItemForInputField:aMenuItem]; + } + } + } /** |