¥ Optimize
¥ Apple Events! Apple Events! Apple Events!
¥ Manual and webpage
+¥ Finish up registration frontend
*/
#import "MenuTunes.h"
}
statusItem = [[ITStatusItem alloc] initWithStatusBar:[NSStatusBar systemStatusBar]
- withLength:NSVariableStatusItemLength];
+ withLength:NSSquareStatusItemLength];
[statusItem setImage:[NSImage imageNamed:@"menu"]];
[statusItem setAlternateImage:[NSImage imageNamed:@"selected_image"]];
[statusItem setMenu:menu];
// Below line of code is for creating builds for Beta Testers
- // [statusItem setToolTip:@"This Nontransferable Beta (Built on XXX) of iThink Software's MenuTunes is Registered to: Beta Tester (betatester@somedomain.com)."];
+ // [statusItem setToolTip:@[NSString stringWithFormat:@"This Nontransferable Beta (Built on %s) of iThink Software's MenuTunes is Registered to: Beta Tester (betatester@somedomain.com).",__DATE__]];
}
if ([defaults boolForKey:@"showName"]) {
[menu removeItemAtIndex:index + 1];
}
- if (didHaveAlbumName) {
+ if (didHaveAlbumName && [defaults boolForKey:@"showAlbum"]) {
[menu removeItemAtIndex:index + 1];
}
- if (didHaveArtistName) {
+ if (didHaveArtistName && [defaults boolForKey:@"showArtist"]) {
[menu removeItemAtIndex:index + 1];
}
if ([defaults boolForKey:@"showTime"]) {
[menu removeItemAtIndex:index + 1];
}
}
+
if (!isPlayingRadio) {
if ([defaults boolForKey:@"showTime"]) {
menuItem = [[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@" %@", [self runScriptAndReturnResult:@"return time of current track"]]
}
if ([defaults boolForKey:@"showArtist"]) {
- didHaveAlbumName = (([curArtistName length] > 0) ? YES : NO);
+ didHaveArtistName = (([curArtistName length] > 0) ? YES : NO);
}
if ([defaults boolForKey:@"showAlbum"]) {
- didHaveArtistName = (([curAlbumName length] > 0) ? YES : NO);
+ didHaveAlbumName = (([curAlbumName length] > 0) ? YES : NO);
}
}
}
if ([(NSString *)procName isEqualToString:@"iTunes"]) {
return procNum;
}
- [(NSString *)procName release];
+ CFRelease(procName);
}
}
return procNum;
if (!statusController && [trackName length]) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *stringToShow = @"";
- int lines = 1;
if ([defaults boolForKey:@"showName"]) {
if ([defaults boolForKey:@"showArtist"]) {
}
stringToShow = [stringToShow stringByAppendingString:trackName];
stringToShow = [stringToShow stringByAppendingString:@"\n"];
- if ([trackName length] > 38) {
- lines++;
- }
- lines++;
}
if ([defaults boolForKey:@"showAlbum"]) {
if ([trackAlbum length]) {
stringToShow = [stringToShow stringByAppendingString:trackAlbum];
stringToShow = [stringToShow stringByAppendingString:@"\n"];
- lines++;
}
}
NSString *trackTime = [self runScriptAndReturnResult:@"return time of current track"];
if ([trackTime length]) {
stringToShow = [NSString stringWithFormat:@"%@Total Time: %@\n", stringToShow, trackTime];
- lines++;
}
}
}
statusController = [[StatusWindowController alloc] init];
- [statusController setTrackInfo:stringToShow lines:lines];
+ [statusController setTrackInfo:stringToShow];
[NSTimer scheduledTimerWithTimeInterval:3.0
target:self
selector:@selector(fadeAndCloseStatusWindow)
songs = [songs stringByAppendingString:@"\n"];
}
}
- [statusController setUpcomingSongs:songs numSongs:numSongsInAdvance];
+ [statusController setUpcomingSongs:songs];
[NSTimer scheduledTimerWithTimeInterval:3.0
target:self
selector:@selector(fadeAndCloseStatusWindow)