The checkmark should be placed in the right place in the playlists menu now.
authorKent Sutherland <ksuther@ithinksw.com>
Sat, 21 Feb 2004 21:16:13 +0000 (21:16 +0000)
committerKent Sutherland <ksuther@ithinksw.com>
Sat, 21 Feb 2004 21:16:13 +0000 (21:16 +0000)
MenuController.m
iTunesRemote.m

index fe7c315..6dacb49 100755 (executable)
         [indices addObject:[curPlaylist objectAtIndex:2]];
     }
     ITDebugLog(@"Checking the current source.");
         [indices addObject:[curPlaylist objectAtIndex:2]];
     }
     ITDebugLog(@"Checking the current source.");
-    if ( (source == ITMTRemoteSharedLibrarySource) || (source == ITMTRemoteiPodSource) || (source == ITMTRemoteGenericDeviceSource) || (source == ITMTRemoteCDSource) ){
-        tempItem = [playlistsMenu itemAtIndex:[indices indexOfObject:[NSNumber numberWithInt:[[[MainController sharedController] currentRemote] currentSourceIndex]]] + [playlistsMenu numberOfItems] - 3];
+    if ( (source == ITMTRemoteSharedLibrarySource) || (source == ITMTRemoteiPodSource) || (source == ITMTRemoteGenericDeviceSource) || (source == ITMTRemoteCDSource) ) {
+        tempItem = [playlistsMenu itemAtIndex:[playlistsMenu numberOfItems] + [indices indexOfObject:[NSNumber numberWithInt:[[[MainController sharedController] currentRemote] currentSourceIndex]]] - [indices count]];
         [tempItem setState:NSOnState];
         [[[tempItem submenu] itemAtIndex:_currentPlaylist - 1] setState:NSOnState];
     } else if (source == ITMTRemoteLibrarySource && _currentPlaylist) {
         [tempItem setState:NSOnState];
         [[[tempItem submenu] itemAtIndex:_currentPlaylist - 1] setState:NSOnState];
     } else if (source == ITMTRemoteLibrarySource && _currentPlaylist) {
index d11a29a..3936926 100755 (executable)
         unsigned long class;
         if (sourceName) {
             NSMutableArray *aSource = [[NSMutableArray alloc] init];
         unsigned long class;
         if (sourceName) {
             NSMutableArray *aSource = [[NSMutableArray alloc] init];
-            [aSource addObject:[[sourceName copy] autorelease]];
+            [aSource addObject:sourceName];
             switch (fourcc) {
                 case 'kTun':
                     class = ITMTRemoteRadioSource;
             switch (fourcc) {
                 case 'kTun':
                     class = ITMTRemoteRadioSource;
                 NSString *theObj = [[ITAppleEventCenter sharedCenter] sendAEWithSendString:sendStr eventClass:@"core" eventID:@"getd" appPSN:savedPSN];
                 ITDebugLog(@" - Adding playlist %@", theObj);
                 if (theObj) {
                 NSString *theObj = [[ITAppleEventCenter sharedCenter] sendAEWithSendString:sendStr eventClass:@"core" eventID:@"getd" appPSN:savedPSN];
                 ITDebugLog(@" - Adding playlist %@", theObj);
                 if (theObj) {
-                    [aSource addObject:[[theObj copy] autorelease]];
+                    [aSource addObject:theObj];
                 }
             }
             [allSources addObject:[aSource autorelease]];
                 }
             }
             [allSources addObject:[aSource autorelease]];