X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/de68e2c2064bb75d89cbad7a3992b4796520fccd..b936ca5ffb6320a3febce6a7d0c2875b072ac6bc:/StatusWindowController.m diff --git a/StatusWindowController.m b/StatusWindowController.m index 246b911..c22e2a5 100755 --- a/StatusWindowController.m +++ b/StatusWindowController.m @@ -1,77 +1,51 @@ +// +// StatusWindowController.m +// MenuTunes +// +// Created by Matthew L. Judy on Thu Apr 17 2003. +// Copyright (c) 2003 NibFile.com. All rights reserved. +// + #import "StatusWindowController.h" -#import "StatusWindow.h" + @implementation StatusWindowController -- (id)init + +- (void)showSongWindowWithTitle:(NSString *)title + album:(NSString *)album + artist:(NSString *)artist + time:(NSString *)time // FLOW: Should probably be NSDate or something. + trackNumber: (int)trackNumber + trackTotal: (int)trackTotal + rating: (int)rating +{ + +} + +- (void)showUpcomingSongsWithTitles:(NSArray *)titleStrings { - if ( (self = [super init]) ) { - [NSBundle loadNibNamed:@"StatusWindow" owner:self]; - [statusWindow center]; - } - return self; + } -- (void)setUpcomingSongs:(NSString *)string +- (void)showVolumeWindowWithLevel:(int)level { -int size = 0, i; - NSArray *lines = [string componentsSeparatedByString:@"\n"]; - - for (i = 0; i < [lines count]; i++) { - int temp = [[lines objectAtIndex:i] sizeWithAttributes:[NSDictionary dictionaryWithObject:[NSFont fontWithName:@"Lucida Grande" size:12] forKey:NSFontAttributeName]].width; - - if (temp > size) { - size = temp; - } - } - - if (size < 255) { - size = 255; - } - - [statusField setStringValue:string]; - [statusWindow setFrame:NSMakeRect(0, 0, size + 45, 40 + ([lines count] * 15)) display:NO]; - [statusWindow center]; - [statusWindow makeKeyAndOrderFront:nil]; + } -- (void)setTrackInfo:(NSString *)string +- (void)showRatingWindowWithLevel:(int)level { - int size = 0, i; - NSArray *lines = [string componentsSeparatedByString:@"\n"]; - - for (i = 0; i < [lines count]; i++) { - int temp = [[lines objectAtIndex:i] sizeWithAttributes:[NSDictionary dictionaryWithObject:[NSFont fontWithName:@"Lucida Grande" size:12] forKey:NSFontAttributeName]].width; - - if (temp > size) { - size = temp; - } - } - - if (size < 285) { - size = 285; - } - - [statusField setStringValue:string]; - [statusWindow setFrame:NSMakeRect(0, 0, size + 45, 40 + ([lines count] * 16)) display:NO]; - [statusWindow center]; - [statusWindow makeKeyAndOrderFront:nil]; + } -- (void)fadeWindowOut +- (void)showShuffleWindowWithMode:(MTStatusWindowShuffleMode)mode { - [NSThread detachNewThreadSelector:@selector(fadeOutAux) toTarget:self withObject:nil]; + } -- (void)fadeOutAux +- (void)showLoopWindowWithMode:(MTStatusWindowLoopMode)mode { - NSAutoreleasePool *p00l = [[NSAutoreleasePool alloc] init]; - float i; - for (i = 1.0; i > 0; i -= .003) { - [statusWindow setAlphaValue:i]; - } - [statusWindow close]; - [p00l release]; + } -@end +@end \ No newline at end of file