Use command name as title for output windows

The command can set a custom title so this is only for commands that doesn’t do that.
This commit is contained in:
Allan Odgaard
2013-01-25 12:57:31 +01:00
parent 694b6defd8
commit 5c1eb0ae3e
2 changed files with 4 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
#import "HTMLOutputWindow.h"
#import <OakAppKit/OakWindowFrameHelper.h>
#import <OakFoundation/NSString Additions.h>
#import <command/runner.h>
#import <oak/debug.h>
@@ -65,6 +66,8 @@ static std::multimap<oak::uuid_t, HTMLOutputWindowController*> Windows;
runner = aRunner;
Windows.insert(std::make_pair(runner->uuid(), self));
self.window.title = [NSString stringWithCxxString:runner->name()];
[self.htmlOutputView setEnvironment:runner->environment()];
[self.htmlOutputView loadRequest:URLRequestForCommandRunner(runner) autoScrolls:runner->auto_scroll_output()];