aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPBundleHTMLOutputController.m19
1 files changed, 8 insertions, 11 deletions
diff --git a/Source/SPBundleHTMLOutputController.m b/Source/SPBundleHTMLOutputController.m
index c57c79f4..365c15a3 100644
--- a/Source/SPBundleHTMLOutputController.m
+++ b/Source/SPBundleHTMLOutputController.m
@@ -59,22 +59,13 @@
return @"BundleHTMLOutput";
}
-- (void)windowControllerDidLoadNib:(NSWindowController *) aController
-{
- [super windowControllerDidLoadNib:aController];
-
-}
-
- (void)displayHTMLContent:(NSString *)content withOptions:(NSDictionary *)displayOptions
{
[[self window] orderFront:nil];
- NSString *fullContent = @"%@";
- fullContent = [NSString stringWithFormat:fullContent, content];
- [self setInitHTMLSourceString:fullContent];
- [[webView mainFrame] loadHTMLString:@"<html></html>" baseURL:nil];
- [[webView mainFrame] loadHTMLString:fullContent baseURL:nil];
+ [self setInitHTMLSourceString:content];
+ [[webView mainFrame] loadHTMLString:content baseURL:nil];
}
@@ -385,6 +376,12 @@
if(!command) return @"No JavaScript command found.";
+ // Check for internal commands passed via JavaScript
+ if([command isEqualToString:@"_SP_self_makeKeyWindow"]) {
+ [[self window] makeKeyAndOrderFront:nil];
+ return @"";
+ }
+
NSString *output = nil;
if(uuid == nil)
output = [command runBashCommandWithEnvironment:nil atCurrentDirectoryPath:nil error:&err];