X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/b2bb0c2895efc7d1556a37576f224d7e5ff91258..a1367a46347952261b0e04a09dc061695a6511d0:/MainController.m diff --git a/MainController.m b/MainController.m index 5637bae..1c7905b 100755 --- a/MainController.m +++ b/MainController.m @@ -741,7 +741,6 @@ static MainController *sharedController; - (void)showUpcomingSongs { int numSongs; - NS_DURING numSongs = [[self currentRemote] numberOfSongsInPlaylistAtIndex:[[self currentRemote] currentPlaylistIndex]]; NS_HANDLER @@ -751,8 +750,8 @@ static MainController *sharedController; ITDebugLog(@"Showing upcoming songs status window."); NS_DURING if (numSongs > 0) { - NSMutableArray *songList = [NSMutableArray arrayWithCapacity:5]; int numSongsInAdvance = [df integerForKey:@"SongsInAdvance"]; + NSMutableArray *songList = [NSMutableArray arrayWithCapacity:numSongsInAdvance]; int curTrack = [[self currentRemote] currentSongIndex]; int i; @@ -762,6 +761,10 @@ static MainController *sharedController; } } + if ([songList count] == 0) { + [songList addObject:NSLocalizedString(@"noUpcomingSongs", @"No upcoming songs.")]; + } + [statusWindowController showUpcomingSongsWindowWithTitles:songList]; } else { [statusWindowController showUpcomingSongsWindowWithTitles:[NSArray arrayWithObject:NSLocalizedString(@"noUpcomingSongs", @"No upcoming songs.")]];