cog/Window/MainWindow.m

44 lines
1.0 KiB
Matlab
Raw Normal View History

//
// MainWindow.m
// Cog
//
// Created by Vincent Spader on 2/22/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
#import "MainWindow.h"
@implementation MainWindow
- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSWindowStyleMask)windowStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation {
self = [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation];
if(self) {
[self setExcludedFromWindowsMenu:YES];
[self setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
}
return self;
}
- (void)awakeFromNib {
[super awakeFromNib];
[playlistView setNextResponder:self];
hdcdLogo = [NSImage imageNamed:@"hdcdLogoTemplate"];
2021-01-09 09:44:32 +00:00
[self showHDCDLogo:NO];
2022-01-21 07:53:45 +00:00
}
- (void)showHDCDLogo:(BOOL)show {
for(NSToolbarItem* toolbarItem in [mainToolbar items]) {
if([[toolbarItem itemIdentifier] isEqualToString:@"hdcd"]) {
if(show)
[toolbarItem setImage:hdcdLogo];
else
[toolbarItem setImage:nil];
}
}
}
@end