+ NSImage *image = nil;
+ NSString *text = title;
+
+ if ( art != nil ) {
+ image = art;
+ [[NSGraphicsContext currentContext] setImageInterpolation:NSImageInterpolationLow];
+ [image setScalesWhenResized:YES];
+ [image setSize:NSMakeSize(110, 110)];
+ /*if (size.width > 110 && size.width > size.height) {
+ [image setSize:NSMakeSize(110, (size.width / size.height) * 110)];
+ } else if (size.height > 110 && size.height > size.width) {
+ [image setSize:NSMakeSize((size.height / size.width) * 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];