X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/358cf707744dbfe1c85eebc7c44d7cf98bdd42e4..fb7602562afcd4350ae64c7e2a81fdd7eb2b4a15:/StatusWindowController.m diff --git a/StatusWindowController.m b/StatusWindowController.m index e06176f..db04626 100755 --- a/StatusWindowController.m +++ b/StatusWindowController.m @@ -153,6 +153,7 @@ static StatusWindowController *sharedController; //text = [text stringByAppendingString:[@"\n" stringByAppendingString:composer]]; } if ( time ) { + _timeRange = NSMakeRange([[text mutableString] length] + 1, [time length]); [[text mutableString] appendFormat:@"\n%@", time]; //text = [text stringByAppendingString:[@"\n" stringByAppendingString:time]]; } @@ -192,6 +193,7 @@ static StatusWindowController *sharedController; [_window buildTextWindowWithString:text]; [_window appear:self]; + [text release]; } - (void)showUpcomingSongsWindowWithTitles:(NSArray *)titleStrings @@ -253,6 +255,14 @@ static StatusWindowController *sharedController; [_window appear:self]; } +- (void)showSongShufflabilityWindow:(BOOL)shufflable +{ + [_window setImage:[NSImage imageNamed:@"Shuffle"]]; + [_window setSizing:(ITTransientStatusWindowSizing)[df integerForKey:@"statusWindowSizing"]]; + [_window buildTextWindowWithString:( !shufflable ? NSLocalizedString(@"shufflableOn", @"Current Song Skipped When Shuffling") : NSLocalizedString(@"shufflableOff", @"Current Song Not Skipped When Shuffling"))]; + [_window appear:self]; +} + - (void)showSetupQueryWindow { NSString *message = NSLocalizedString(@"autolaunch_msg", @"Would you like MenuTunes to launch\nautomatically at startup?"); @@ -353,4 +363,11 @@ static StatusWindowController *sharedController; [_window setLocked:YES]; } +- (void)updateTime:(NSString *)time +{ + if (time && [time length]) { + [_window updateTime:time range:_timeRange]; + } +} + @end \ No newline at end of file