Cog/Window/MainWindow.m

50 lines
1.1 KiB
Mathematica
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
2018-06-28 06:59:59 -04:00
- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSWindowStyleMask)windowStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation
{
2021-01-09 06:44:32 -03:00
self = [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation];
if (self)
{
[self setExcludedFromWindowsMenu:YES];
2013-10-10 22:14:35 -03:00
[self setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
}
2021-01-09 06:44:32 -03:00
return self;
}
- (void)awakeFromNib
{
2021-01-09 06:44:32 -03:00
[super awakeFromNib];
[playlistView setNextResponder:self];
2022-01-21 04:53:45 -03:00
hdcdLogo = [NSImage imageNamed:@"hdcdLogoTemplate"];
[self showHDCDLogo:NO];
}
- (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