X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/82086d6a95408227f929ca149591c6fc3962f043..dc685d1d1cffcfd6bb95dd948c30f1dc315919e0:/MainController.m diff --git a/MainController.m b/MainController.m index ad6f2e1..c4fd253 100755 --- a/MainController.m +++ b/MainController.m @@ -392,7 +392,7 @@ static MainController *sharedController; } if ([networkController isConnectedToServer]) { - [statusItem setMenu:[menuController menu]]; + [statusItem setMenu:([[self currentRemote] playerRunningState] == ITMTRemotePlayerRunning) ? [menuController menu] : [menuController menuForNoPlayer]]; } } @@ -533,14 +533,14 @@ static MainController *sharedController; - (void)showPlayer { ITDebugLog(@"Beginning show player."); - if ( ( playerRunningState == ITMTRemotePlayerRunning) ) { + //if ( ( playerRunningState == ITMTRemotePlayerRunning) ) { ITDebugLog(@"Showing player interface."); NS_DURING [[self currentRemote] showPrimaryInterface]; NS_HANDLER [self networkError:localException]; NS_ENDHANDLER - } else { + /*} else { ITDebugLog(@"Launching player."); NS_DURING NSString *path; @@ -554,7 +554,7 @@ static MainController *sharedController; NS_HANDLER [self networkError:localException]; NS_ENDHANDLER - } + }*/ ITDebugLog(@"Finished show player."); } @@ -1209,7 +1209,7 @@ static MainController *sharedController; - (void)applicationTerminated:(NSNotification *)note { NS_DURING - if (!note || [[[note userInfo] objectForKey:@"NSApplicationName"] isEqualToString:[[self currentRemote] playerFullName]]) { + if (!note || [[[note userInfo] objectForKey:@"NSApplicationName"] isEqualToString:[[self currentRemote] playerFullName]] && ![[NetworkController sharedController] isConnectedToServer]) { ITDebugLog(@"Remote application terminated."); playerRunningState = ITMTRemotePlayerNotRunning; [[self currentRemote] halt];