X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/13cf91d9f8bff4826b27829e441ad75efed02cdb..8a38563fa0999446b3c396a23c45c15f73a86c87:/MenuController.m?ds=inline diff --git a/MenuController.m b/MenuController.m index 668f961..1c8dd90 100755 --- a/MenuController.m +++ b/MenuController.m @@ -21,7 +21,7 @@ - (NSMenu *)playlistsMenu; - (NSMenu *)eqMenu; - (void)setKeyEquivalentForCode:(short)code andModifiers:(long)modifiers - onItem:(NSMenuItem *)item; + onItem:(id )item; - (BOOL)iPodAtPathAutomaticallyUpdates:(NSString *)name; @end @@ -42,7 +42,7 @@ NSArray *menuArray = [defaults arrayForKey:@"menu"]; NSEnumerator *enumerator = [menuArray objectEnumerator]; NSString *nextObject; - NSMenuItem *tempItem; + id tempItem; NSEnumerator *itemEnum; ITHotKey *hotKey; NSArray *hotKeys = [[ITHotKeyCenter sharedCenter] allHotKeys]; @@ -399,7 +399,7 @@ - (NSMenu *)menuForNoPlayer { NSMenu *menu = [[NSMenu alloc] initWithTitle:@""]; - NSMenuItem *tempItem; + id tempItem; ITDebugLog(@"Creating menu for when player isn't running."); NS_DURING ITDebugLog(@"Add \"Open %@\" menu item.", [[[MainController sharedController] currentRemote] playerSimpleName]); @@ -497,7 +497,6 @@ if (_currentPlaylist && !_playingRadio) { if (numSongs > 0) { int i; - for (i = _currentTrack + 1; i <= _currentTrack + numSongsInAdvance; i++) { if (i <= numSongs) { NSString *curSong; @@ -506,7 +505,7 @@ NS_HANDLER [[MainController sharedController] networkError:localException]; NS_ENDHANDLER - NSMenuItem *songItem; + id songItem; ITDebugLog(@"Adding song: %@", curSong); songItem = [upcomingSongsMenu addItemWithTitle:curSong action:@selector(performUpcomingSongsMenuAction:) keyEquivalent:@""]; [songItem setTag:i]; @@ -525,11 +524,11 @@ return upcomingSongsMenu; } -- (NSMenu *)playlistsMenu +/*- (NSMenu *)playlistsMenu { NSMenu *playlistsMenu = [[NSMenu alloc] initWithTitle:@""]; NSArray *playlists; - NSMenuItem *tempItem; + id tempItem; ITMTRemotePlayerSource source = [[[MainController sharedController] currentRemote] currentSource]; int i; NS_DURING @@ -563,18 +562,21 @@ } ITDebugLog(@"Done Building \"Playlists\" menu"); return playlistsMenu; -} +}*/ -/*- (NSMenu *)playlistsMenu +- (NSMenu *)playlistsMenu { NSMenu *playlistsMenu = [[NSMenu alloc] initWithTitle:@""]; NSArray *playlists; - NSMenuItem *tempItem; + id tempItem; ITMTRemotePlayerSource source = [[[MainController sharedController] currentRemote] currentSource]; int i, j; NS_DURING playlists = [[[MainController sharedController] currentRemote] playlists]; + /*playlists = [NSArray arrayWithObjects: + [NSArray arrayWithObjects:@"Library", [NSNumber numberWithInt:-1], @"Library", @"Playlist", nil], + [NSArray arrayWithObjects:@"Radio", [NSNumber numberWithInt:1], @"Radio", nil], nil];*/ NS_HANDLER [[MainController sharedController] networkError:localException]; NS_ENDHANDLER @@ -590,7 +592,6 @@ [tempItem setTarget:self]; } } - if ( (source == ITMTRemoteRadioSource) || ([playlists count] - 2 > 0) ) { [playlistsMenu addItem:[NSMenuItem separatorItem]]; } @@ -605,7 +606,7 @@ NSMenu *submenu = [[NSMenu alloc] init]; ITDebugLog(@"Adding source: %@", name); - if ( ([[curPlaylist objectAtIndex:i] intValue] == ITMTRemoteiPodSource) && (![self iPodAtPathAutomaticallyUpdates:[curPlaylist objectAtIndex:j]]) ) { + if ( ([[curPlaylist objectAtIndex:i] intValue] == ITMTRemoteiPodSource) && [self iPodAtPathAutomaticallyUpdates:[curPlaylist objectAtIndex:j]]) ) { ITDebugLog(@"Invalid iPod source."); } else { for (j = 2; j < [curPlaylist count]; j++) { @@ -627,13 +628,13 @@ } ITDebugLog(@"Done Building \"Playlists\" menu"); return playlistsMenu; -}*/ +} - (NSMenu *)eqMenu { NSMenu *eqMenu = [[NSMenu alloc] initWithTitle:@""]; NSArray *eqPresets; - NSMenuItem *tempItem; + id tempItem; int i; NS_DURING @@ -761,7 +762,7 @@ } - (void)setKeyEquivalentForCode:(short)code andModifiers:(long)modifiers - onItem:(NSMenuItem *)item + onItem:(id )item { unichar charcode = 'a'; int i; @@ -1010,6 +1011,7 @@ } } } + return NO; } @end \ No newline at end of file