Plugin API changes
[MenuTunes.git] / MenuTunes.m
index 2f3b083..9115c10 100755 (executable)
@@ -44,7 +44,7 @@
     
     menu = [[NSMenu alloc] initWithTitle:@""];
     
-    if ([currentRemote isAppRunning]) {
+    if ( ( [currentRemote remotePlayerStatus] == ITMTRemotePlayerRunning ) ) {
         [self remotePlayerLaunched:nil];
     } else {
         [self remotePlayerTerminated:nil];
     NSMenuItem *menuItem;
     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
     
-    if (!isAppRunning) {
+    if ( ( isAppRunning = ITMTRemotePlayerNotRunning ) ) {
         return;
     }
     
 
 - (void)remotePlayerLaunched:(NSNotification *)note
 {
-    isAppRunning = YES;
+    isAppRunning = ITMTRemotePlayerRunning;
     
     //Restart the timer
     refreshTimer = [NSTimer scheduledTimerWithTimeInterval:3.0 target:self selector:@selector(timerUpdate) userInfo:nil repeats:YES]; 
 
 - (void)remotePlayerTerminated:(NSNotification *)note
 {
-    isAppRunning = NO;
+    isAppRunning = ITMTRemotePlayerNotRunning;
     
     [menu release];
     menu = [[NSMenu alloc] initWithTitle:@""];
 
 - (void)closePreferences
 {
-    if (isAppRunning) {
+    if ( ( isAppRunning == ITMTRemotePlayerRunning) ) {
         [self setupHotKeys];
     }
     [prefsController release];