Readding multisource playlist thingy. Added a tooltip showing the current
[MenuTunes.git] / MenuController.m
index 668f961..4ab0bf4 100755 (executable)
@@ -21,7 +21,7 @@
 - (NSMenu *)playlistsMenu;
 - (NSMenu *)eqMenu;
 - (void)setKeyEquivalentForCode:(short)code andModifiers:(long)modifiers
-        onItem:(NSMenuItem *)item;
+        onItem:(id <NSMenuItem>)item;
 - (BOOL)iPodAtPathAutomaticallyUpdates:(NSString *)name;
 @end
 
@@ -42,7 +42,7 @@
     NSArray *menuArray = [defaults arrayForKey:@"menu"];
     NSEnumerator *enumerator = [menuArray objectEnumerator];
     NSString *nextObject;
-    NSMenuItem *tempItem;
+    id <NSMenuItem> tempItem;
     NSEnumerator *itemEnum;
     ITHotKey *hotKey;
     NSArray *hotKeys = [[ITHotKeyCenter sharedCenter] allHotKeys];
 - (NSMenu *)menuForNoPlayer
 {
     NSMenu *menu = [[NSMenu alloc] initWithTitle:@""];
-    NSMenuItem *tempItem;
+    id <NSMenuItem> tempItem;
     ITDebugLog(@"Creating menu for when player isn't running.");
     NS_DURING
         ITDebugLog(@"Add \"Open %@\" menu item.", [[[MainController sharedController] currentRemote] playerSimpleName]);
                     NS_HANDLER
                         [[MainController sharedController] networkError:localException];
                     NS_ENDHANDLER
-                    NSMenuItem *songItem;
+                    id <NSMenuItem> songItem;
                     ITDebugLog(@"Adding song: %@", curSong);
                     songItem = [upcomingSongsMenu addItemWithTitle:curSong action:@selector(performUpcomingSongsMenuAction:) keyEquivalent:@""];
                     [songItem setTag:i];
     return upcomingSongsMenu;
 }
 
-- (NSMenu *)playlistsMenu
+/*- (NSMenu *)playlistsMenu
 {
     NSMenu *playlistsMenu = [[NSMenu alloc] initWithTitle:@""];
     NSArray *playlists;
-    NSMenuItem *tempItem;
+    id <NSMenuItem> tempItem;
     ITMTRemotePlayerSource source = [[[MainController sharedController] currentRemote] currentSource];
     int i;
     NS_DURING
     }
     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
             [tempItem setTarget:self];
         }
     }
-    
     if ( (source == ITMTRemoteRadioSource) || ([playlists count] - 2 > 0) ) {
         [playlistsMenu addItem:[NSMenuItem separatorItem]];
     }
     }
     ITDebugLog(@"Done Building \"Playlists\" menu");
     return playlistsMenu;
-}*/
+}
 
 - (NSMenu *)eqMenu
 {
     NSMenu *eqMenu = [[NSMenu alloc] initWithTitle:@""];
     NSArray *eqPresets;
-    NSMenuItem *tempItem;
+    id <NSMenuItem> tempItem;
     int i;
     
     NS_DURING
 }
 
 - (void)setKeyEquivalentForCode:(short)code andModifiers:(long)modifiers
-        onItem:(NSMenuItem *)item
+        onItem:(id <NSMenuItem>)item
 {
     unichar charcode = 'a';
     int i;
             }
         }
     }
+    return NO;
 }
 
 @end
\ No newline at end of file