From 8a275a0fa7cd3587a2e8ff910dfb060f51073177 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Fri, 7 Jan 2011 07:34:29 +0000 Subject: =?UTF-8?q?=E2=80=A2=20added=20internal=20JavaScript=20function=20?= =?UTF-8?q?window.system.closeHTMLOutputWindow()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPBundleHTMLOutputController.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Source') diff --git a/Source/SPBundleHTMLOutputController.m b/Source/SPBundleHTMLOutputController.m index 7bcff455..57b75889 100644 --- a/Source/SPBundleHTMLOutputController.m +++ b/Source/SPBundleHTMLOutputController.m @@ -211,6 +211,7 @@ [self setInitHTMLSourceString:@""]; windowUUID = @""; docUUID = @""; + NSLog(@"close"); [self release]; } @@ -366,6 +367,8 @@ return @"getShellEnvironmentForName"; if (aSelector == @selector(makeHTMLOutputWindowKeyWindow)) return @"makeHTMLOutputWindowKeyWindow"; + if (aSelector == @selector(closeHTMLOutputWindow)) + return @"closeHTMLOutputWindow"; return @""; } @@ -379,6 +382,9 @@ if (selector == @selector(makeHTMLOutputWindowKeyWindow)) { return NO; } + if (selector == @selector(closeHTMLOutputWindow)) { + return NO; + } return YES; } @@ -440,6 +446,15 @@ [[self window] makeKeyAndOrderFront:nil]; } +/** + * JavaScript window.system.makeHTMLOutputWindowKeyWindow() function + * to make the HTML output window the first responder + */ +- (void)closeHTMLOutputWindow +{ + [[self window] close]; +} + /** * JavaScript window.system.run('a_command'|new Array('a_command', 'uuid')) function * to return the result of the BASH command a_command -- cgit v1.2.3