Implemented running scripts on song change.
[MenuTunes.git] / MenuController.m
index 668f961..c2970f6 100755 (executable)
@@ -21,8 +21,8 @@
 - (NSMenu *)playlistsMenu;
 - (NSMenu *)eqMenu;
 - (void)setKeyEquivalentForCode:(short)code andModifiers:(long)modifiers
-        onItem:(NSMenuItem *)item;
-- (BOOL)iPodAtPathAutomaticallyUpdates:(NSString *)name;
+        onItem:(id <NSMenuItem>)item;
+//- (BOOL)iPodAtPathAutomaticallyUpdates:(NSString *)name;
 @end
 
 @implementation MenuController
@@ -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];
 {
     NSMenu *playlistsMenu = [[NSMenu alloc] initWithTitle:@""];
     NSArray *playlists;
-    NSMenuItem *tempItem;
+    id <NSMenuItem> tempItem;
     ITMTRemotePlayerSource source = [[[MainController sharedController] currentRemote] currentSource];
     int i;
     NS_DURING
 {
     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;
     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];
             }
         }
     }
-}
+}*/
 
 @end
\ No newline at end of file