Making prefs work. Not sure if hotkeys are saving and updating, though
[MenuTunes.git] / OldMainController.m
index cf1b1e7..27ca9d1 100755 (executable)
 {
     if (!note || [[[note userInfo] objectForKey:@"NSApplicationName"] isEqualToString:[currentRemote playerFullName]]) {
         [NSThread detachNewThreadSelector:@selector(startTimerInNewThread) toTarget:self withObject:nil];
-        
         [self rebuildMenu];
-        [statusItem setMenu:menu];
         [self setupHotKeys];
         isAppRunning = ITMTRemotePlayerRunning;
         return;
     [menu autorelease];
     menu = [[NSMenu alloc] initWithTitle:@""];
     
-    /*while ([menu numberOfItems] > 0) {
-        [menu removeItemAtIndex:0];
-    }*/
-    
     playPauseItem = nil;
     lastSongIdentifier = @"0-0";
     
             [menu addItemWithTitle:@"Rewind"
                     action:@selector(rewind:)
                     keyEquivalent:@""];
+        } else if ([item isEqualToString:@"Show Player"]) {
+            [menu addItemWithTitle:[NSString stringWithFormat:@"Show %@", [currentRemote playerSimpleName]]
+                    action:@selector(showPlayer:)
+                    keyEquivalent:@""];
         } else if ([item isEqualToString:@"Upcoming Songs"]) {
             upcomingSongsItem = [menu addItemWithTitle:@"Upcoming Songs"
                     action:nil
             }
         }
         
-        [statusWindow setText:stringToShow];
+        //
+        //SHOW THE STATUS WINDOW HERE WITH STRING stringToShow
+        //
+        
+        /*[statusWindow setText:stringToShow];
         [NSTimer scheduledTimerWithTimeInterval:3.0
                     target:self
                     selector:@selector(fadeAndCloseStatusWindow)
                     userInfo:nil
-                    repeats:NO];
+                    repeats:NO];*/
     }
 }
 
             int i;
             NSString *songs = @"";
             
-            statusWindow = [ITTransientStatusWindow sharedWindow];
             for (i = curTrack + 1; i <= curTrack + numSongsInAdvance; i++) {
                 if (i <= numSongs) {
                     NSString *curSong = [currentRemote songTitleAtIndex:i];
                     songs = [songs stringByAppendingString:@"\n"];
                 }
             }
-            [statusWindow setText:songs];
+            
+            //
+            //SHOW STATUS WINDOW HERE WITH STRING songs
+            //
+            
+            /*[statusWindow setText:songs];
             [NSTimer scheduledTimerWithTimeInterval:3.0
                         target:self
                         selector:@selector(fadeAndCloseStatusWindow)
                         userInfo:nil
-                        repeats:NO];
+                        repeats:NO];*/
         }
     }
 }