Stream track title change will trigger the status window. Play count
authorKent Sutherland <ksuther@ithinksw.com>
Fri, 2 Jul 2004 03:41:30 +0000 (03:41 +0000)
committerKent Sutherland <ksuther@ithinksw.com>
Fri, 2 Jul 2004 03:41:30 +0000 (03:41 +0000)
won't show up in radio stream status windows.

MainController.h
MainController.m
iTunesRemote.m

index f5c0834..e1ad2a4 100755 (executable)
@@ -43,7 +43,7 @@
     
     MTBlingController *bling;
     NSTimer *registerTimer;
-    BOOL timerUpdating, _checkingForServer;
+    BOOL timerUpdating, _checkingForServer, _popped;
     BOOL blinged;
     NSLock *_serverCheckLock;
 }
index 2517c39..7c60fb0 100755 (executable)
@@ -930,7 +930,7 @@ static MainController *sharedController;
             }
         }
         
-        if ( [df boolForKey:@"showPlayCount"] ) {
+        if ( [df boolForKey:@"showPlayCount"] && ![self radioIsPlaying] ) {
             NS_DURING
                 playCount = [[self currentRemote] currentSongPlayCount];
             NS_HANDLER
@@ -991,8 +991,12 @@ static MainController *sharedController;
 
 - (void)popupMenu
 {
-    NSMenu *menu = [menuController menu];
-    [(NSCarbonMenuImpl *)[menu _menuImpl] popUpMenu:menu atLocation:[NSEvent mouseLocation] width:1 forView:nil withSelectedItem:-30 withFont:[NSFont menuFontOfSize:32]];
+    if (!_popped) {
+        NSMenu *menu = [menuController menu];
+        _popped = YES;
+        [(NSCarbonMenuImpl *)[menu _menuImpl] popUpMenu:menu atLocation:[NSEvent mouseLocation] width:1 forView:nil withSelectedItem:-30 withFont:[NSFont menuFontOfSize:32]];
+        _popped = NO;
+    }
 }
 
 - (void)incrementVolume
index 8bc60c0..41afb6d 100755 (executable)
 {
     NSString *temp1;
     ITDebugLog(@"Getting current unique identifier.");
-    temp1 = [NSString stringWithFormat:@"%i-%i", [self currentPlaylistIndex], [[ITAppleEventCenter sharedCenter] sendTwoTierAEWithRequestedKeyForNumber:@"pDID" fromObjectByKey:@"pTrk" eventClass:@"core" eventID:@"getd" appPSN:savedPSN]];
+    int cls = [[ITAppleEventCenter sharedCenter] sendTwoTierAEWithRequestedKeyForNumber:@"pcls" fromObjectByKey:@"pTrk" eventClass:@"core" eventID:@"getd" appPSN:savedPSN];
+    if ( ([self currentPlaylistClass] == ITMTRemotePlayerRadioPlaylist) || (cls == 'cURT') ) {
+        temp1 = [[ITAppleEventCenter sharedCenter] sendAEWithRequestedKey:@"pStT" eventClass:@"core" eventID:@"getd" appPSN:savedPSN];
+    } else {
+        temp1 = [NSString stringWithFormat:@"%i-%i", [self currentPlaylistIndex], [[ITAppleEventCenter sharedCenter] sendTwoTierAEWithRequestedKeyForNumber:@"pDID" fromObjectByKey:@"pTrk" eventClass:@"core" eventID:@"getd" appPSN:savedPSN]];
+    }
     ITDebugLog(@"Getting current unique identifier done.");
     return ( ([temp1 length]) ? temp1 : nil ) ;
 }