Fixed the STUPID BUG where the multisource playlist thing would crash
[MenuTunes.git] / MenuController.m
index c2970f6..dfd4f49 100755 (executable)
@@ -22,7 +22,7 @@
 - (NSMenu *)eqMenu;
 - (void)setKeyEquivalentForCode:(short)code andModifiers:(long)modifiers
         onItem:(id <NSMenuItem>)item;
 - (NSMenu *)eqMenu;
 - (void)setKeyEquivalentForCode:(short)code andModifiers:(long)modifiers
         onItem:(id <NSMenuItem>)item;
-//- (BOOL)iPodAtPathAutomaticallyUpdates:(NSString *)name;
+- (BOOL)iPodAtPathAutomaticallyUpdates:(NSString *)name;
 @end
 
 @implementation MenuController
 @end
 
 @implementation MenuController
     if (_currentPlaylist && !_playingRadio) {
         if (numSongs > 0) {
             int i;
     if (_currentPlaylist && !_playingRadio) {
         if (numSongs > 0) {
             int i;
-
             for (i = _currentTrack + 1; i <= _currentTrack + numSongsInAdvance; i++) {
                 if (i <= numSongs) {
                     NSString *curSong;
             for (i = _currentTrack + 1; i <= _currentTrack + numSongsInAdvance; i++) {
                 if (i <= numSongs) {
                     NSString *curSong;
     return upcomingSongsMenu;
 }
 
     return upcomingSongsMenu;
 }
 
-- (NSMenu *)playlistsMenu
+/*- (NSMenu *)playlistsMenu
 {
     NSMenu *playlistsMenu = [[NSMenu alloc] initWithTitle:@""];
     NSArray *playlists;
 {
     NSMenu *playlistsMenu = [[NSMenu alloc] initWithTitle:@""];
     NSArray *playlists;
     }
     ITDebugLog(@"Done Building \"Playlists\" menu");
     return playlistsMenu;
     }
     ITDebugLog(@"Done Building \"Playlists\" menu");
     return playlistsMenu;
-}
+}*/
 
 
 
 
-/*- (NSMenu *)playlistsMenu
+- (NSMenu *)playlistsMenu
 {
     NSMenu *playlistsMenu = [[NSMenu alloc] initWithTitle:@""];
     NSArray *playlists;
 {
     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];
     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
     NS_HANDLER
         [[MainController sharedController] networkError:localException];
     NS_ENDHANDLER
             [tempItem setTarget:self];
         }
     }
             [tempItem setTarget:self];
         }
     }
-    
     if ( (source == ITMTRemoteRadioSource) || ([playlists count] - 2 > 0) ) {
         [playlistsMenu addItem:[NSMenuItem separatorItem]];
     }
     if ( (source == ITMTRemoteRadioSource) || ([playlists count] - 2 > 0) ) {
         [playlistsMenu addItem:[NSMenuItem separatorItem]];
     }
     }
     ITDebugLog(@"Done Building \"Playlists\" menu");
     return playlistsMenu;
     }
     ITDebugLog(@"Done Building \"Playlists\" menu");
     return playlistsMenu;
-}*/
+}
 
 - (NSMenu *)eqMenu
 {
 
 - (NSMenu *)eqMenu
 {
     ITDebugLog(@"Done setting key equivalent on menu item: %@", [item title]);
 }
 
     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];
 {
     NSArray *volumes = [[NSWorkspace sharedWorkspace] mountedLocalVolumePaths];
     NSEnumerator *volEnum = [volumes objectEnumerator];
             }
         }
     }
             }
         }
     }
-}*/
+    return NO;
+}
 
 @end
\ No newline at end of file
 
 @end
\ No newline at end of file