From 28b26b0acce681c25cd8bf5ac7fc8881794afb36 Mon Sep 17 00:00:00 2001 From: Kent Sutherland Date: Fri, 21 May 2004 01:24:04 +0000 Subject: [PATCH] Fixed a bunch of the networking crashes and bugs appearing. All with just 5 lines of code :) --- MainController.m | 14 ++++++++++---- MenuTunes.xcode/project.pbxproj | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/MainController.m b/MainController.m index dd7c51e..c235a8f 100755 --- a/MainController.m +++ b/MainController.m @@ -334,10 +334,6 @@ static MainController *sharedController; - (void)timerUpdate { - if ([networkController isConnectedToServer]) { - [statusItem setMenu:[menuController menu]]; - } - if ( [self songChanged] && (timerUpdating != YES) && (playerRunningState == ITMTRemotePlayerRunning) ) { ITDebugLog(@"The song changed."); @@ -394,6 +390,10 @@ static MainController *sharedController; timerUpdating = NO; [statusItem setEnabled:YES]; } + + if ([networkController isConnectedToServer]) { + [statusItem setMenu:[menuController menu]]; + } } - (void)menuClicked @@ -1119,6 +1119,12 @@ static MainController *sharedController; [currentRemote release]; currentRemote = [remoteArray objectAtIndex:0]; [networkController disconnect]; + + if ([[self currentRemote] playerRunningState] == ITMTRemotePlayerRunning) { + [self applicationLaunched:nil]; + } else { + [self applicationTerminated:nil]; + } [self timerUpdate]; return YES; } diff --git a/MenuTunes.xcode/project.pbxproj b/MenuTunes.xcode/project.pbxproj index 1788eee..ce13b91 100755 --- a/MenuTunes.xcode/project.pbxproj +++ b/MenuTunes.xcode/project.pbxproj @@ -1513,7 +1513,7 @@ buildRules = ( ); buildSettings = { - FRAMEWORK_SEARCH_PATHS = "../ITFoundation/build ../ITKit/build /Volumes/Data/Desktop/ITFoundation/build"; + FRAMEWORK_SEARCH_PATHS = "../ITFoundation/build ../ITKit/build"; GCC_ENABLE_TRIGRAPHS = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; -- 2.20.1