- (NSMenu *)eqMenu;
- (void)setKeyEquivalentForCode:(short)code andModifiers:(long)modifiers
onItem:(id <NSMenuItem>)item;
-//- (BOOL)iPodAtPathAutomaticallyUpdates:(NSString *)name;
+- (BOOL)iPodAtPathAutomaticallyUpdates:(NSString *)name;
@end
@implementation MenuController
if (_currentPlaylist && !_playingRadio) {
if (numSongs > 0) {
int i;
-
for (i = _currentTrack + 1; i <= _currentTrack + numSongsInAdvance; i++) {
if (i <= numSongs) {
NSString *curSong;
return upcomingSongsMenu;
}
-- (NSMenu *)playlistsMenu
+/*- (NSMenu *)playlistsMenu
{
NSMenu *playlistsMenu = [[NSMenu alloc] initWithTitle:@""];
NSArray *playlists;
}
ITDebugLog(@"Done Building \"Playlists\" menu");
return playlistsMenu;
-}
+}*/
-/*- (NSMenu *)playlistsMenu
+- (NSMenu *)playlistsMenu
{
NSMenu *playlistsMenu = [[NSMenu alloc] initWithTitle:@""];
NSArray *playlists;
- NSMenuItem *tempItem;
+ id <NSMenuItem> 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
[tempItem setTarget:self];
}
}
-
if ( (source == ITMTRemoteRadioSource) || ([playlists count] - 2 > 0) ) {
[playlistsMenu addItem:[NSMenuItem separatorItem]];
}
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++) {
}
ITDebugLog(@"Done Building \"Playlists\" menu");
return playlistsMenu;
-}*/
+}
- (NSMenu *)eqMenu
{
ITDebugLog(@"Done setting key equivalent on menu item: %@", [item title]);
}
-/*- (BOOL)iPodAtPathAutomaticallyUpdates:(NSString *)name
+- (BOOL)iPodAtPathAutomaticallyUpdates:(NSString *)name
{
NSArray *volumes = [[NSWorkspace sharedWorkspace] mountedLocalVolumePaths];
NSEnumerator *volEnum = [volumes objectEnumerator];
}
}
}
-}*/
+ return NO;
+}
@end
\ No newline at end of file