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 crash when unchecking share this player. Also trying to make the
[MenuTunes.git]
/
MainController.m
diff --git
a/MainController.m
b/MainController.m
index
065659a
..
fbeae9d
100755
(executable)
--- a/
MainController.m
+++ b/
MainController.m
@@
-14,7
+14,6
@@
- (ITMTRemote *)loadRemote;
- (void)timerUpdate;
- (void)setLatestSongIdentifier:(NSString *)newIdentifier;
- (ITMTRemote *)loadRemote;
- (void)timerUpdate;
- (void)setLatestSongIdentifier:(NSString *)newIdentifier;
-- (void)showCurrentTrackInfo;
- (void)applicationLaunched:(NSNotification *)note;
- (void)applicationTerminated:(NSNotification *)note;
@end
- (void)applicationLaunched:(NSNotification *)note;
- (void)applicationTerminated:(NSNotification *)note;
@end
@@
-291,6
+290,9
@@
static MainController *sharedController;
{
if ([networkController isConnectedToServer]) {
[statusItem setMenu:[menuController menu]];
{
if ([networkController isConnectedToServer]) {
[statusItem setMenu:[menuController menu]];
+ if ([[networkController networkObject] remote] == nil) {
+ [self networkError:nil];
+ }
}
if ( [self songChanged] && (timerUpdating != YES) ) {
}
if ( [self songChanged] && (timerUpdating != YES) ) {
@@
-960,6
+962,12
@@
static MainController *sharedController;
if (result == 1) {
[[PreferencesController sharedPrefs] resetRemotePlayerTextFields];
currentRemote = [[[networkController networkObject] remote] retain];
if (result == 1) {
[[PreferencesController sharedPrefs] resetRemotePlayerTextFields];
currentRemote = [[[networkController networkObject] remote] retain];
+ [refreshTimer invalidate];
+ refreshTimer = [[NSTimer scheduledTimerWithTimeInterval:([networkController isConnectedToServer] ? 10.0 : 0.5)
+ target:self
+ selector:@selector(timerUpdate)
+ userInfo:nil
+ repeats:YES] retain];
[self timerUpdate];
ITDebugLog(@"Connection successful.");
return 1;
[self timerUpdate];
ITDebugLog(@"Connection successful.");
return 1;
@@
-992,7
+1000,7
@@
static MainController *sharedController;
if ([networkController checkForServerAtHost:[df stringForKey:@"sharedPlayerHost"]]) {
ITDebugLog(@"Remote server found.");
[timer invalidate];
if ([networkController checkForServerAtHost:[df stringForKey:@"sharedPlayerHost"]]) {
ITDebugLog(@"Remote server found.");
[timer invalidate];
- if (![networkController isConnectedToServer]) {
+ if (![networkController is
ServerOn] && ![networkController is
ConnectedToServer]) {
[[StatusWindowController sharedController] showReconnectQueryWindow];
}
} else {
[[StatusWindowController sharedController] showReconnectQueryWindow];
}
} else {