X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/74389742830709c876afb314ae07034bd675c9ac..f259f879db5bb904afca6f0fa31effa5511c476e:/MainController.m diff --git a/MainController.m b/MainController.m index eb1aa3f..40f50ce 100755 --- a/MainController.m +++ b/MainController.m @@ -359,7 +359,6 @@ static MainController *sharedController; { if ( [self songChanged] && (timerUpdating != YES) && (playerRunningState == ITMTRemotePlayerRunning) ) { ITDebugLog(@"The song changed."); - if ([df boolForKey:@"runScripts"]) { NSArray *scripts = [[NSFileManager defaultManager] directoryContentsAtPath:[NSHomeDirectory() stringByAppendingPathComponent:@"Library/Application Support/MenuTunes/Scripts"]]; NSEnumerator *scriptsEnum = [scripts objectEnumerator]; @@ -557,6 +556,17 @@ static MainController *sharedController; [self timerUpdate]; } +- (void)makePlaylistWithTerm:(NSString *)term ofType:(int)type +{ + ITDebugLog(@"Making playlist with term %@, type %i", term, type); + NS_DURING + [[self currentRemote] makePlaylistWithTerm:term ofType:type]; + NS_HANDLER + [self networkError:localException]; + NS_ENDHANDLER + ITDebugLog(@"Done making playlist"); +} + - (void)showPlayer { ITDebugLog(@"Beginning show player."); @@ -930,7 +940,7 @@ static MainController *sharedController; } } - if ( [df boolForKey:@"showPlayCount"] && ![self radioIsPlaying] ) { + if ( [df boolForKey:@"showPlayCount"] && ![self radioIsPlaying] && [[self currentRemote] currentSource] == ITMTRemoteLibrarySource ) { NS_DURING playCount = [[self currentRemote] currentSongPlayCount]; NS_HANDLER @@ -992,8 +1002,9 @@ static MainController *sharedController; - (void)popupMenu { if (!_popped) { - NSMenu *menu = [menuController menu]; _popped = YES; + [self menuClicked]; + NSMenu *menu = [statusItem menu]; [(NSCarbonMenuImpl *)[menu _menuImpl] popUpMenu:menu atLocation:[NSEvent mouseLocation] width:1 forView:nil withSelectedItem:-30 withFont:[NSFont menuFontOfSize:32]]; _popped = NO; }