NSMenuItem *songItem;
songItem = [[NSMenuItem alloc] initWithTitle:curSong action:@selector(playTrack:) keyEquivalent:@""];
[songItem setTarget:self];
- [songItem setRepresentedObject:[NSNumber numberWithInt:i]];
+ [songItem setRepresentedObject:[NSNumber numberWithInt:i + 1]];
[upcomingSongsMenu addItem:songItem];
[songItem release];
} else {
NSMenuItem *tempItem;
tempItem = [[NSMenuItem alloc] initWithTitle:playlistName action:@selector(selectPlaylist:) keyEquivalent:@""];
[tempItem setTarget:self];
- [tempItem setRepresentedObject:[NSNumber numberWithInt:i]];
+ [tempItem setRepresentedObject:[NSNumber numberWithInt:i + 1]];
[playlistMenu addItem:tempItem];
[tempItem release];
}
[currentRemote pause];
[playPauseMenuItem setTitle:@"Play"];
} else if ((state == forwarding) || (state == rewinding)) {
- [currentRemote play];
[currentRemote pause];
+ [currentRemote play];
} else {
[currentRemote play];
[playPauseMenuItem setTitle:@"Pause"];
- (void)fastForward:(id)sender
{
[currentRemote fastForward];
+ [playPauseMenuItem setTitle:@"Play"];
}
- (void)rewind:(id)sender
{
[currentRemote rewind];
+ [playPauseMenuItem setTitle:@"Play"];
}
//