}
}
}
+
+ if ([upcomingSongsMenu numberOfItems] == 0) {
+ [upcomingSongsMenu addItemWithTitle:NSLocalizedString(@"noUpcomingSongs", @"No upcoming songs.") action:NULL keyEquivalent:@""];
+ }
}
ITDebugLog(@"Done Building \"Upcoming Songs\" menu.");
return upcomingSongsMenu;
NSMenu *playlistsMenu = [[NSMenu alloc] initWithTitle:@""];
NSArray *playlists;
NSMenuItem *tempItem;
+ ITMTRemotePlayerSource source = [[[MainController sharedController] currentRemote] currentSource];
int i;
NS_DURING
[tempItem setTarget:self];
}
- if (!_playingRadio && _currentPlaylist) {
+ if (source == ITMTRemoteRadioSource) {
+ [[playlistsMenu addItemWithTitle:NSLocalizedString(@"radio", @"Radio") action:NULL keyEquivalent:@""] setState:NSOnState];
+ } else if (source == ITMTRemoteGenericDeviceSource) {
+ [[playlistsMenu addItemWithTitle:NSLocalizedString(@"genericDevice", @"Generic Device") action:NULL keyEquivalent:@""] setState:NSOnState];
+ } else if (source == ITMTRemoteiPodSource) {
+ [[playlistsMenu addItemWithTitle:NSLocalizedString(@"iPod", @"iPod") action:NULL keyEquivalent:@""] setState:NSOnState];
+ } else if (source == ITMTRemoteCDSource) {
+ [[playlistsMenu addItemWithTitle:NSLocalizedString(@"cd", @"CD") action:NULL keyEquivalent:@""] setState:NSOnState];
+ } else if (source == ITMTRemoteSharedLibrarySource) {
+ [[playlistsMenu addItemWithTitle:NSLocalizedString(@"sharedLibrary", @"Shared Library") action:NULL keyEquivalent:@""] setState:NSOnState];
+ } else if (source == ITMTRemoteLibrarySource && _currentPlaylist) {
[[playlistsMenu itemAtIndex:_currentPlaylist - 1] setState:NSOnState];
}
ITDebugLog(@"Done Building \"Playlists\" menu");