Add ability to close HTML output window on ⌃⌥⌘H

This commit is contained in:
Allan Odgaard
2013-08-21 10:33:52 +02:00
parent 32f4cedece
commit 6d1c334785

View File

@@ -10,15 +10,14 @@ OAK_DEBUG_VAR(HTMLOutputWindow);
static std::multimap<oak::uuid_t, HTMLOutputWindowController*> Windows;
@interface HTMLOutputWindowController ()
{
command::runner_ptr runner;
}
@property (nonatomic, retain) OakHTMLOutputView* htmlOutputView;
@property (nonatomic, readonly) BOOL running;
@end
@implementation HTMLOutputWindowController
{
command::runner_ptr runner;
}
- (id)initWithRunner:(command::runner_ptr const&)aRunner
{
if(self = [super init])
@@ -123,4 +122,16 @@ static std::multimap<oak::uuid_t, HTMLOutputWindowController*> Windows;
{
self.window.delegate = nil;
}
- (IBAction)toggleHTMLOutput:(id)sender
{
[self.window performClose:self];
}
- (BOOL)validateMenuItem:(NSMenuItem*)menuItem
{
if([menuItem action] == @selector(toggleHTMLOutput:))
[menuItem setTitle:@"Hide HTML Output"];
return YES;
}
@end