aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPCopyTable.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-11-26 11:33:18 +0000
committerBibiko <bibiko@eva.mpg.de>2010-11-26 11:33:18 +0000
commite586eaef2eadcf3eccbb6f81d33bf005081451f2 (patch)
tree91db75a6b0975cb7053b8449716be648416d19ff /Source/SPCopyTable.m
parent0898dd7e4da0becb043f3ae3d37ccc4c0c13c44e (diff)
downloadsequelpro-e586eaef2eadcf3eccbb6f81d33bf005081451f2.tar.gz
sequelpro-e586eaef2eadcf3eccbb6f81d33bf005081451f2.tar.bz2
sequelpro-e586eaef2eadcf3eccbb6f81d33bf005081451f2.zip
• Bundle Command support
- added shell var SP_ICON_FILE - a bundle command which outputs its result as HTML window will write the data in the same window, ie it won't be create each time a new window; the window will be identified by the bundle's uuid - fixed issue while saving a short-cut in keybinding.dict format, now it ignores possible diacritics - maybe bug in ShortcutRecorder for method [aRecorder keyCharsIgnoringModifiers] since in the objectValue it's set correctly
Diffstat (limited to 'Source/SPCopyTable.m')
-rw-r--r--Source/SPCopyTable.m17
1 files changed, 15 insertions, 2 deletions
diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m
index 4de00d00..6b746099 100644
--- a/Source/SPCopyTable.m
+++ b/Source/SPCopyTable.m
@@ -943,8 +943,21 @@ NSInteger MENU_EDIT_COPY_AS_SQL = 2003;
}
else if([action isEqualToString:SPBundleOutputActionShowAsHTML]) {
- SPBundleHTMLOutputController *c = [[SPBundleHTMLOutputController alloc] init];
- [c displayHTMLContent:output withOptions:nil];
+ BOOL correspondingWindowFound = NO;
+ for(id win in [NSApp windows]) {
+ if([[win delegate] isKindOfClass:[SPBundleHTMLOutputController class]]) {
+ if([[[win delegate] windowUUID] isEqualToString:[cmdData objectForKey:SPBundleFileUUIDKey]]) {
+ correspondingWindowFound = YES;
+ [[win delegate] displayHTMLContent:output withOptions:nil];
+ break;
+ }
+ }
+ }
+ if(!correspondingWindowFound) {
+ SPBundleHTMLOutputController *c = [[SPBundleHTMLOutputController alloc] init];
+ [c setWindowUUID:[cmdData objectForKey:SPBundleFileUUIDKey]];
+ [c displayHTMLContent:output withOptions:nil];
+ }
}
}
} else {