X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/8cd402b5d3e43c95046af7ac0e4cb3cde2d622bc..b5fc132dbbed3e73887fca660c6032162adab448:/MainController.m diff --git a/MainController.m b/MainController.m index 9a8b493..201edef 100755 --- a/MainController.m +++ b/MainController.m @@ -1140,8 +1140,9 @@ static MainController *sharedController; - (void)updateTime:(NSTimer *)timer { + StatusWindow *sw = [StatusWindow sharedWindow]; _timeUpdateCount++; - if (_timeUpdateCount > (int)[df floatForKey:@"statusWindowVanishDelay"] - 1) { + if (_timeUpdateCount < (int)[sw exitDelay] + (int)[[sw exitEffect] effectTime] + (int)[[sw entryEffect] effectTime]) { NSString *time = nil; NS_DURING time = [NSString stringWithFormat:@"%@: %@ / %@", @@ -1152,6 +1153,8 @@ static MainController *sharedController; NS_HANDLER [self networkError:localException]; NS_ENDHANDLER + } else { + [timer invalidate]; } } @@ -1349,15 +1352,17 @@ static MainController *sharedController; - (void)toggleSongShufflable { - NS_DURING - BOOL flag = ![[self currentRemote] currentSongShufflable]; - ITDebugLog(@"Toggling shufflability."); - [[self currentRemote] setCurrentSongShufflable:flag]; - //Show song shufflability status window - //[statusWindowController showSongShuffabilityWindow:flag]; - NS_HANDLER - [self networkError:localException]; - NS_ENDHANDLER + if ([self songIsPlaying]) { + NS_DURING + BOOL flag = ![[self currentRemote] currentSongShufflable]; + ITDebugLog(@"Toggling shufflability."); + [[self currentRemote] setCurrentSongShufflable:flag]; + //Show song shufflability status window + [statusWindowController showSongShufflabilityWindow:flag]; + NS_HANDLER + [self networkError:localException]; + NS_ENDHANDLER + } } - (void)registerNowOK