From 17931800d1d44477eb97d0386bb033fa7a9ba32e Mon Sep 17 00:00:00 2001 From: Kent Sutherland Date: Sat, 21 Feb 2004 21:16:13 +0000 Subject: [PATCH] The checkmark should be placed in the right place in the playlists menu now. --- MenuController.m | 4 ++-- iTunesRemote.m | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MenuController.m b/MenuController.m index fe7c315..6dacb49 100755 --- a/MenuController.m +++ b/MenuController.m @@ -630,8 +630,8 @@ [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) { diff --git a/iTunesRemote.m b/iTunesRemote.m index d11a29a..3936926 100755 --- a/iTunesRemote.m +++ b/iTunesRemote.m @@ -170,7 +170,7 @@ unsigned long class; if (sourceName) { NSMutableArray *aSource = [[NSMutableArray alloc] init]; - [aSource addObject:[[sourceName copy] autorelease]]; + [aSource addObject:sourceName]; switch (fourcc) { case 'kTun': class = ITMTRemoteRadioSource; @@ -202,7 +202,7 @@ 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]]; -- 2.20.1