HDCD Decoding: Add HDCD indicator
parent
3a2d360d24
commit
26e0e0cead
|
@ -42,6 +42,7 @@ extern NSDictionary * makeRGInfo(PlaylistEntry *pe);
|
||||||
IBOutlet NSArrayController *outputDevices;
|
IBOutlet NSArrayController *outputDevices;
|
||||||
|
|
||||||
NSTimer *positionTimer;
|
NSTimer *positionTimer;
|
||||||
|
NSTimer *hdcdLogoTimer;
|
||||||
|
|
||||||
AudioPlayer *audioPlayer;
|
AudioPlayer *audioPlayer;
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
#import "PlaylistEntry.h"
|
#import "PlaylistEntry.h"
|
||||||
#import "PlaylistLoader.h"
|
#import "PlaylistLoader.h"
|
||||||
|
|
||||||
|
#import "MainWindow.h"
|
||||||
|
#import "MiniWindow.h"
|
||||||
|
|
||||||
#import <MediaPlayer/MPNowPlayingInfoCenter.h>
|
#import <MediaPlayer/MPNowPlayingInfoCenter.h>
|
||||||
#import <MediaPlayer/MPRemoteCommandCenter.h>
|
#import <MediaPlayer/MPRemoteCommandCenter.h>
|
||||||
#import <MediaPlayer/MPRemoteCommand.h>
|
#import <MediaPlayer/MPRemoteCommand.h>
|
||||||
|
@ -114,6 +117,12 @@ NSString *CogPlaybackDidStopNotficiation = @"CogPlaybackDidStopNotficiation";
|
||||||
[self setPlaybackStatus: CogStatusPaused];
|
[self setPlaybackStatus: CogStatusPaused];
|
||||||
|
|
||||||
[self sendMetaData];
|
[self sendMetaData];
|
||||||
|
|
||||||
|
if (hdcdLogoTimer)
|
||||||
|
{
|
||||||
|
[hdcdLogoTimer invalidate];
|
||||||
|
hdcdLogoTimer = nil;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)resume:(id)sender
|
- (IBAction)resume:(id)sender
|
||||||
|
@ -131,6 +140,8 @@ NSString *CogPlaybackDidStopNotficiation = @"CogPlaybackDidStopNotficiation";
|
||||||
[audioPlayer stop];
|
[audioPlayer stop];
|
||||||
|
|
||||||
[self sendMetaData];
|
[self sendMetaData];
|
||||||
|
|
||||||
|
[self removeHDCD:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
//called by double-clicking on table
|
//called by double-clicking on table
|
||||||
|
@ -775,6 +786,7 @@ NSDictionary * makeRGInfo(PlaylistEntry *pe)
|
||||||
int status = [s intValue];
|
int status = [s intValue];
|
||||||
if (status == CogStatusStopped || status == CogStatusPaused)
|
if (status == CogStatusStopped || status == CogStatusPaused)
|
||||||
{
|
{
|
||||||
|
[self removeHDCD:nil];
|
||||||
if (positionTimer)
|
if (positionTimer)
|
||||||
{
|
{
|
||||||
[positionTimer invalidate];
|
[positionTimer invalidate];
|
||||||
|
@ -836,6 +848,32 @@ NSDictionary * makeRGInfo(PlaylistEntry *pe)
|
||||||
[self sendMetaData];
|
[self sendMetaData];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)audioPlayer:(AudioPlayer *)player sustainHDCD:(id)userInfo
|
||||||
|
{
|
||||||
|
MainWindow * mainWindow = (MainWindow *) appController.mainWindow;
|
||||||
|
[mainWindow showHDCDLogo:YES];
|
||||||
|
MiniWindow * miniWindow = (MiniWindow *) appController.miniWindow;
|
||||||
|
[miniWindow showHDCDLogo:YES];
|
||||||
|
|
||||||
|
if (hdcdLogoTimer)
|
||||||
|
{
|
||||||
|
[hdcdLogoTimer invalidate];
|
||||||
|
hdcdLogoTimer = nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
hdcdLogoTimer = [NSTimer timerWithTimeInterval:10.0 target:self selector:@selector(removeHDCD:) userInfo:nil repeats:NO];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)removeHDCD:(id)sender
|
||||||
|
{
|
||||||
|
MainWindow * mainWindow = (MainWindow *) appController.mainWindow;
|
||||||
|
[mainWindow showHDCDLogo:NO];
|
||||||
|
MiniWindow * miniWindow = (MiniWindow *) appController.miniWindow;
|
||||||
|
[miniWindow showHDCDLogo:NO];
|
||||||
|
[hdcdLogoTimer invalidate];
|
||||||
|
hdcdLogoTimer = nil;
|
||||||
|
}
|
||||||
|
|
||||||
- (void)playlistDidChange:(PlaylistController *)p
|
- (void)playlistDidChange:(PlaylistController *)p
|
||||||
{
|
{
|
||||||
[audioPlayer resetNextStreams];
|
[audioPlayer resetNextStreams];
|
||||||
|
|
|
@ -119,6 +119,7 @@
|
||||||
- (void)audioPlayer:(AudioPlayer *)player displayEqualizer:(AudioUnit)eq;
|
- (void)audioPlayer:(AudioPlayer *)player displayEqualizer:(AudioUnit)eq;
|
||||||
- (void)audioPlayer:(AudioPlayer *)player refreshEqualizer:(AudioUnit)eq;
|
- (void)audioPlayer:(AudioPlayer *)player refreshEqualizer:(AudioUnit)eq;
|
||||||
- (void)audioPlayer:(AudioPlayer *)player removeEqualizer:(AudioUnit)eq;
|
- (void)audioPlayer:(AudioPlayer *)player removeEqualizer:(AudioUnit)eq;
|
||||||
|
- (void)audioPlayer:(AudioPlayer *)player sustainHDCD:(id)userInfo;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -518,6 +518,11 @@
|
||||||
[self sendDelegateMethod:@selector(audioPlayer:didChangeStatus:userInfo:) withObject:[NSNumber numberWithInt:status] withObject:[bufferChain userInfo] waitUntilDone:wait];
|
[self sendDelegateMethod:@selector(audioPlayer:didChangeStatus:userInfo:) withObject:[NSNumber numberWithInt:status] withObject:[bufferChain userInfo] waitUntilDone:wait];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)sustainHDCD
|
||||||
|
{
|
||||||
|
[self sendDelegateMethod:@selector(audioPlayer:sustainHDCD:) withObject:[bufferChain userInfo] waitUntilDone:NO];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)setPlaybackStatus:(int)status
|
- (void)setPlaybackStatus:(int)status
|
||||||
{
|
{
|
||||||
[self setPlaybackStatus:status waitUntilDone:NO];
|
[self setPlaybackStatus:status waitUntilDone:NO];
|
||||||
|
|
|
@ -246,6 +246,7 @@
|
||||||
{
|
{
|
||||||
OutputNode * outputNode = (OutputNode *) [controller output];
|
OutputNode * outputNode = (OutputNode *) [controller output];
|
||||||
[outputNode sustainHDCD];
|
[outputNode sustainHDCD];
|
||||||
|
[controller sustainHDCD];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -826,8 +826,13 @@
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
</toolbarItem>
|
</toolbarItem>
|
||||||
|
<toolbarItem implicitItemIdentifier="2DE885D7-56DA-4F25-BD36-0BBA2655C596" explicitItemIdentifier="hdcd" label="HDCD Indicator" paletteLabel="HDCD Indicator" tag="-1" image="hdcdLogoTemplate" bordered="YES" id="ZH9-ZU-skw">
|
||||||
|
<size key="minSize" width="70" height="25"/>
|
||||||
|
<size key="maxSize" width="70" height="25"/>
|
||||||
|
</toolbarItem>
|
||||||
</allowedToolbarItems>
|
</allowedToolbarItems>
|
||||||
<defaultToolbarItems>
|
<defaultToolbarItems>
|
||||||
|
<toolbarItem reference="ZH9-ZU-skw"/>
|
||||||
<toolbarItem reference="1539"/>
|
<toolbarItem reference="1539"/>
|
||||||
<toolbarItem reference="1552"/>
|
<toolbarItem reference="1552"/>
|
||||||
<toolbarItem reference="1636"/>
|
<toolbarItem reference="1636"/>
|
||||||
|
@ -856,6 +861,7 @@
|
||||||
<outlet property="delegate" destination="226" id="481"/>
|
<outlet property="delegate" destination="226" id="481"/>
|
||||||
<outlet property="initialFirstResponder" destination="207" id="720"/>
|
<outlet property="initialFirstResponder" destination="207" id="720"/>
|
||||||
<outlet property="playlistView" destination="206" id="mah-wo-1nd"/>
|
<outlet property="playlistView" destination="206" id="mah-wo-1nd"/>
|
||||||
|
<outlet property="mainToolbar" destination="1523" id="J2X-YK-xV0"/>
|
||||||
</connections>
|
</connections>
|
||||||
<point key="canvasLocation" x="130" y="131"/>
|
<point key="canvasLocation" x="130" y="131"/>
|
||||||
</window>
|
</window>
|
||||||
|
@ -1020,8 +1026,13 @@
|
||||||
</toolbarItem>
|
</toolbarItem>
|
||||||
<toolbarItem implicitItemIdentifier="NSToolbarSeparatorItem" id="2225"/>
|
<toolbarItem implicitItemIdentifier="NSToolbarSeparatorItem" id="2225"/>
|
||||||
<toolbarItem implicitItemIdentifier="NSToolbarCustomizeToolbarItem" id="2229"/>
|
<toolbarItem implicitItemIdentifier="NSToolbarCustomizeToolbarItem" id="2229"/>
|
||||||
|
<toolbarItem implicitItemIdentifier="F1A8365A-DBF5-4BB9-A2B3-3964BFA1B15D" explicitItemIdentifier="hdcd" label="HDCD Indicator" paletteLabel="HDCD Indicator" tag="-1" image="hdcdLogoTemplate" bordered="YES" id="qfu-F9-bOZ">
|
||||||
|
<size key="minSize" width="70" height="25"/>
|
||||||
|
<size key="maxSize" width="70" height="25"/>
|
||||||
|
</toolbarItem>
|
||||||
</allowedToolbarItems>
|
</allowedToolbarItems>
|
||||||
<defaultToolbarItems>
|
<defaultToolbarItems>
|
||||||
|
<toolbarItem reference="qfu-F9-bOZ"/>
|
||||||
<toolbarItem reference="2272"/>
|
<toolbarItem reference="2272"/>
|
||||||
<toolbarItem reference="2228"/>
|
<toolbarItem reference="2228"/>
|
||||||
<toolbarItem reference="2429"/>
|
<toolbarItem reference="2429"/>
|
||||||
|
@ -1042,6 +1053,7 @@
|
||||||
</dictionary>
|
</dictionary>
|
||||||
</binding>
|
</binding>
|
||||||
<outlet property="playbackController" destination="705" id="vo7-mK-yQe"/>
|
<outlet property="playbackController" destination="705" id="vo7-mK-yQe"/>
|
||||||
|
<outlet property="miniToolbar" destination="2222" id="Up2-7z-HqA"/>
|
||||||
</connections>
|
</connections>
|
||||||
<point key="canvasLocation" x="45" y="444"/>
|
<point key="canvasLocation" x="45" y="444"/>
|
||||||
</window>
|
</window>
|
||||||
|
@ -2135,6 +2147,7 @@ Gw
|
||||||
</customObject>
|
</customObject>
|
||||||
</objects>
|
</objects>
|
||||||
<resources>
|
<resources>
|
||||||
|
<image name="hdcdLogoTemplate" width="656" height="225"/>
|
||||||
<image name="imageCell:1801:image" width="17" height="17">
|
<image name="imageCell:1801:image" width="17" height="17">
|
||||||
<mutableData key="keyedArchiveRepresentation">
|
<mutableData key="keyedArchiveRepresentation">
|
||||||
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05T
|
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05T
|
||||||
|
|
|
@ -171,6 +171,7 @@
|
||||||
83E5E54C18087CA5001F3284 /* miniModeOffTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 83E5E54A18087CA5001F3284 /* miniModeOffTemplate.pdf */; };
|
83E5E54C18087CA5001F3284 /* miniModeOffTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 83E5E54A18087CA5001F3284 /* miniModeOffTemplate.pdf */; };
|
||||||
83E5E54D18087CA5001F3284 /* miniModeOnTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 83E5E54B18087CA5001F3284 /* miniModeOnTemplate.pdf */; };
|
83E5E54D18087CA5001F3284 /* miniModeOnTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 83E5E54B18087CA5001F3284 /* miniModeOnTemplate.pdf */; };
|
||||||
83E88FD227945204003D6FE5 /* AUPlayerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83E88FD027945204003D6FE5 /* AUPlayerView.m */; };
|
83E88FD227945204003D6FE5 /* AUPlayerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83E88FD027945204003D6FE5 /* AUPlayerView.m */; };
|
||||||
|
83ED3AD1279A91C000904199 /* hdcdLogoTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 83ED3AC7279A91C000904199 /* hdcdLogoTemplate.pdf */; };
|
||||||
83F9D8071A884C54007ABEC2 /* SilenceDecoder.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83F9D7F61A884B46007ABEC2 /* SilenceDecoder.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
83F9D8071A884C54007ABEC2 /* SilenceDecoder.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83F9D7F61A884B46007ABEC2 /* SilenceDecoder.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||||
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||||
|
@ -1008,6 +1009,7 @@
|
||||||
83E5EFAC1FFEF78100659F0F /* OpenMPT.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = OpenMPT.xcodeproj; path = Plugins/OpenMPT/OpenMPT.xcodeproj; sourceTree = "<group>"; };
|
83E5EFAC1FFEF78100659F0F /* OpenMPT.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = OpenMPT.xcodeproj; path = Plugins/OpenMPT/OpenMPT.xcodeproj; sourceTree = "<group>"; };
|
||||||
83E88FD027945204003D6FE5 /* AUPlayerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AUPlayerView.m; path = Window/AUPlayerView.m; sourceTree = "<group>"; };
|
83E88FD027945204003D6FE5 /* AUPlayerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AUPlayerView.m; path = Window/AUPlayerView.m; sourceTree = "<group>"; };
|
||||||
83E88FD127945204003D6FE5 /* AUPlayerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUPlayerView.h; path = Window/AUPlayerView.h; sourceTree = "<group>"; };
|
83E88FD127945204003D6FE5 /* AUPlayerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUPlayerView.h; path = Window/AUPlayerView.h; sourceTree = "<group>"; };
|
||||||
|
83ED3AC7279A91C000904199 /* hdcdLogoTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = hdcdLogoTemplate.pdf; path = Images/hdcdLogoTemplate.pdf; sourceTree = "<group>"; };
|
||||||
83F9D7F11A884B44007ABEC2 /* SilenceDecoder.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SilenceDecoder.xcodeproj; path = Plugins/SilenceDecoder/SilenceDecoder.xcodeproj; sourceTree = "<group>"; };
|
83F9D7F11A884B44007ABEC2 /* SilenceDecoder.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SilenceDecoder.xcodeproj; path = Plugins/SilenceDecoder/SilenceDecoder.xcodeproj; sourceTree = "<group>"; };
|
||||||
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||||
8E07AB760AAC930B00A4B32F /* PreferencesController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PreferencesController.h; path = Preferences/PreferencesController.h; sourceTree = "<group>"; };
|
8E07AB760AAC930B00A4B32F /* PreferencesController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PreferencesController.h; path = Preferences/PreferencesController.h; sourceTree = "<group>"; };
|
||||||
|
@ -1200,6 +1202,7 @@
|
||||||
177EC02D0B8BC2E60000BC8C /* Images */ = {
|
177EC02D0B8BC2E60000BC8C /* Images */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
83ED3AC7279A91C000904199 /* hdcdLogoTemplate.pdf */,
|
||||||
83E5E54A18087CA5001F3284 /* miniModeOffTemplate.pdf */,
|
83E5E54A18087CA5001F3284 /* miniModeOffTemplate.pdf */,
|
||||||
83E5E54B18087CA5001F3284 /* miniModeOnTemplate.pdf */,
|
83E5E54B18087CA5001F3284 /* miniModeOnTemplate.pdf */,
|
||||||
8384916F180843B200E7332D /* pauseDockBadgeColorful.png */,
|
8384916F180843B200E7332D /* pauseDockBadgeColorful.png */,
|
||||||
|
@ -2399,6 +2402,7 @@
|
||||||
17D1B2810CF8B2830028F5B5 /* song.icns in Resources */,
|
17D1B2810CF8B2830028F5B5 /* song.icns in Resources */,
|
||||||
17D1B2820CF8B2830028F5B5 /* vg.icns in Resources */,
|
17D1B2820CF8B2830028F5B5 /* vg.icns in Resources */,
|
||||||
17D1B2830CF8B2830028F5B5 /* xm.icns in Resources */,
|
17D1B2830CF8B2830028F5B5 /* xm.icns in Resources */,
|
||||||
|
83ED3AD1279A91C000904199 /* hdcdLogoTemplate.pdf in Resources */,
|
||||||
83849172180843B200E7332D /* pauseDockBadgeColorful.png in Resources */,
|
83849172180843B200E7332D /* pauseDockBadgeColorful.png in Resources */,
|
||||||
8384916318083EAB00E7332D /* repeatModeAlbumTemplate.pdf in Resources */,
|
8384916318083EAB00E7332D /* repeatModeAlbumTemplate.pdf in Resources */,
|
||||||
8384916B18083EAB00E7332D /* stopDockBadge.png in Resources */,
|
8384916B18083EAB00E7332D /* stopDockBadge.png in Resources */,
|
||||||
|
|
Binary file not shown.
|
@ -10,6 +10,11 @@
|
||||||
|
|
||||||
@interface MainWindow : NSWindow {
|
@interface MainWindow : NSWindow {
|
||||||
IBOutlet NSView *playlistView;
|
IBOutlet NSView *playlistView;
|
||||||
|
IBOutlet NSToolbar *mainToolbar;
|
||||||
|
|
||||||
|
NSImage *hdcdLogo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)showHDCDLogo:(BOOL)show;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -27,6 +27,23 @@
|
||||||
[super awakeFromNib];
|
[super awakeFromNib];
|
||||||
|
|
||||||
[playlistView setNextResponder:self];
|
[playlistView setNextResponder:self];
|
||||||
|
|
||||||
|
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
|
@end
|
||||||
|
|
|
@ -11,6 +11,10 @@
|
||||||
|
|
||||||
@interface MiniWindow : NSWindow {
|
@interface MiniWindow : NSWindow {
|
||||||
IBOutlet PlaybackController *playbackController;
|
IBOutlet PlaybackController *playbackController;
|
||||||
|
IBOutlet NSToolbar *miniToolbar;
|
||||||
|
NSImage *hdcdLogo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)showHDCDLogo:(BOOL)show;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -25,11 +25,18 @@
|
||||||
[self setContentMinSize:NSMakeSize(325, 1)];
|
[self setContentMinSize:NSMakeSize(325, 1)];
|
||||||
[self setContentMaxSize:NSMakeSize(CGFLOAT_MAX, 1)];
|
[self setContentMaxSize:NSMakeSize(CGFLOAT_MAX, 1)];
|
||||||
[self setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];
|
[self setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];
|
||||||
|
|
||||||
|
hdcdLogo = [NSImage imageNamed:@"hdcdLogoTemplate"];
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)awakeFromNib
|
||||||
|
{
|
||||||
|
[self showHDCDLogo:NO];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)toggleToolbarShown:(id)sender {
|
- (void)toggleToolbarShown:(id)sender {
|
||||||
// Mini window IS the toolbar, no point in hiding it.
|
// Mini window IS the toolbar, no point in hiding it.
|
||||||
// Do nothing!
|
// Do nothing!
|
||||||
|
@ -76,5 +83,17 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)showHDCDLogo:(BOOL)show
|
||||||
|
{
|
||||||
|
for (NSToolbarItem * toolbarItem in [miniToolbar items])
|
||||||
|
{
|
||||||
|
if ([[toolbarItem itemIdentifier] isEqualToString:@"hdcd"]) {
|
||||||
|
if (show)
|
||||||
|
[toolbarItem setImage:hdcdLogo];
|
||||||
|
else
|
||||||
|
[toolbarItem setImage:nil];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue