Fixed EQ/Playlist selection bug.
[MenuTunes.git] / MenuTunes.m
index 487a5bb..cf5801b 100755 (executable)
@@ -460,7 +460,7 @@ Things to do:
                     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 {
@@ -494,7 +494,7 @@ Things to do:
         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];
     }
@@ -701,8 +701,8 @@ Things to do:
         [currentRemote pause];
         [playPauseMenuItem setTitle:@"Play"];
     } else if ((state == forwarding) || (state == rewinding)) {
-        [currentRemote play];
         [currentRemote pause];
+        [currentRemote play];
     } else {
         [currentRemote play];
         [playPauseMenuItem setTitle:@"Pause"];
@@ -722,11 +722,13 @@ Things to do:
 - (void)fastForward:(id)sender
 {
     [currentRemote fastForward];
+    [playPauseMenuItem setTitle:@"Play"];
 }
 
 - (void)rewind:(id)sender
 {
     [currentRemote rewind];
+    [playPauseMenuItem setTitle:@"Play"];
 }
 
 //