git.ithinksw.org
/
MenuTunes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed a bunch of the networking crashes and bugs appearing. All with just 5 lines...
[MenuTunes.git]
/
MainController.m
diff --git
a/MainController.m
b/MainController.m
index
9d2e3cc
..
c235a8f
100755
(executable)
--- a/
MainController.m
+++ b/
MainController.m
@@
-334,10
+334,6
@@
static MainController *sharedController;
- (void)timerUpdate
{
- (void)timerUpdate
{
- if ([networkController isConnectedToServer]) {
- [statusItem setMenu:[menuController menu]];
- }
-
if ( [self songChanged] && (timerUpdating != YES) && (playerRunningState == ITMTRemotePlayerRunning) ) {
ITDebugLog(@"The song changed.");
if ( [self songChanged] && (timerUpdating != YES) && (playerRunningState == ITMTRemotePlayerRunning) ) {
ITDebugLog(@"The song changed.");
@@
-358,6
+354,7
@@
static MainController *sharedController;
}
timerUpdating = YES;
}
timerUpdating = YES;
+ [statusItem setEnabled:NO];
NS_DURING
latestPlaylistClass = [[self currentRemote] currentPlaylistClass];
NS_DURING
latestPlaylistClass = [[self currentRemote] currentPlaylistClass];
@@
-391,6
+388,11
@@
static MainController *sharedController;
NS_ENDHANDLER
timerUpdating = NO;
NS_ENDHANDLER
timerUpdating = NO;
+ [statusItem setEnabled:YES];
+ }
+
+ if ([networkController isConnectedToServer]) {
+ [statusItem setMenu:[menuController menu]];
}
}
}
}
@@
-1117,6
+1119,12
@@
static MainController *sharedController;
[currentRemote release];
currentRemote = [remoteArray objectAtIndex:0];
[networkController disconnect];
[currentRemote release];
currentRemote = [remoteArray objectAtIndex:0];
[networkController disconnect];
+
+ if ([[self currentRemote] playerRunningState] == ITMTRemotePlayerRunning) {
+ [self applicationLaunched:nil];
+ } else {
+ [self applicationTerminated:nil];
+ }
[self timerUpdate];
return YES;
}
[self timerUpdate];
return YES;
}