+ NSImage *image = nil;
+ NSString *text = title;
+
+ if ( art != nil ) {
+ /*
+ NSImageRep *artRep = [art bestRepresentationForDevice:nil];
+ image = [[NSImage alloc] initWithSize:NSMakeSize(110, 110)];
+ [image lockFocus];
+ {
+ [[NSGraphicsContext currentContext] setImageInterpolation:NSImageInterpolationHigh];
+ [[NSGraphicsContext currentContext] setShouldAntialias:YES];
+ [artRep drawInRect:NSMakeRect(3, 3, 104, 104)];
+ }
+ [image unlockFocus];
+ [image autorelease];*/
+ image = art;
+ [image setScalesWhenResized:YES];
+ [image setSize:NSMakeSize(110,110)];
+ } else if ( source == ITMTRemoteLibrarySource ) {
+ image = [NSImage imageNamed:@"Library"];
+ } else if ( source == ITMTRemoteCDSource ) {
+ image = [NSImage imageNamed:@"CD"];
+ } else if ( source == ITMTRemoteRadioSource ) {
+ image = [NSImage imageNamed:@"Radio"];
+ } else if ( source == ITMTRemoteiPodSource ) {
+ image = [NSImage imageNamed:@"iPod"];
+ } else if ( source == ITMTRemoteGenericDeviceSource ) {
+ image = [NSImage imageNamed:@"MP3Player"];
+ } else if ( source == ITMTRemoteSharedLibrarySource ) {
+ image = [NSImage imageNamed:@"Library"];
+ }
+
+ [_window setImage:image];
+
+ if ( album ) {
+ text = [text stringByAppendingString:[@"\n" stringByAppendingString:album]];
+ }
+ if ( artist ) {
+ text = [text stringByAppendingString:[@"\n" stringByAppendingString:artist]];
+ }
+ if ( time ) {
+ text = [text stringByAppendingString:[@"\n" stringByAppendingString:time]];
+ }
+ if ( track ) {
+ text = [text stringByAppendingString:[@"\n" stringByAppendingString:track]];
+ }
+ if ( rating > -1 ) {
+
+ NSString *ratingString = [NSString string];
+ NSString *emptyChar = [NSString stringWithUTF8String:"☆"];
+ NSString *fullChar = [NSString stringWithUTF8String:"★"];
+ int i;
+
+ for ( i = 1; i < 6; i++ ) {
+
+ if ( rating >= i ) {
+ ratingString = [ratingString stringByAppendingString:fullChar];
+ } else {
+ ratingString = [ratingString stringByAppendingString:emptyChar];
+ }
+ }
+
+ text = [text stringByAppendingString:[@"\n" stringByAppendingString:ratingString]];
+ }
+
+
+ [_window setSizing:(ITTransientStatusWindowSizing)[df integerForKey:@"statusWindowSizing"]];
+ [_window buildTextWindowWithString:text];