From e586eaef2eadcf3eccbb6f81d33bf005081451f2 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Fri, 26 Nov 2010 11:33:18 +0000 Subject: =?UTF-8?q?=E2=80=A2=20Bundle=20Command=20support=20-=20added=20sh?= =?UTF-8?q?ell=20var=20SP=5FICON=5FFILE=20-=20a=20bundle=20command=20which?= =?UTF-8?q?=20outputs=20its=20result=20as=20HTML=20window=20will=20write?= =?UTF-8?q?=20the=20data=20in=20the=20same=20window,=20ie=20it=20won't=20b?= =?UTF-8?q?e=20create=20each=20time=20a=20new=20window;=20the=20window=20w?= =?UTF-8?q?ill=20be=20identified=20by=20the=20bundle's=20uuid=20-=20fixed?= =?UTF-8?q?=20issue=20while=20saving=20a=20short-cut=20in=20keybinding.dic?= =?UTF-8?q?t=20format,=20now=20it=20ignores=20possible=20diacritics=20-=20?= =?UTF-8?q?maybe=20bug=20in=20ShortcutRecorder=20for=20method=20[aRecorder?= =?UTF-8?q?=20keyCharsIgnoringModifiers]=20since=20in=20the=20objectValue?= =?UTF-8?q?=20it's=20set=20correctly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPAppController.m | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'Source/SPAppController.m') 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 { -- cgit v1.2.3