aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPAppController.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/SPAppController.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/SPAppController.m')
-rw-r--r--Source/SPAppController.m17
1 files changed, 15 insertions, 2 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m
index b34cb0d5..ae42d254 100644
--- a/Source/SPAppController.m
+++ b/Source/SPAppController.m
@@ -723,8 +723,21 @@
}
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 {