Hitting the show track info hotkey when the status window is visible will hide it...
[MenuTunes.git] / MainController.m
index cfc9518..c0bec8e 100755 (executable)
@@ -1028,6 +1028,13 @@ static MainController *sharedController;
     int                     rating      = -1;
     int                     playCount   = -1;
        
+       //If we're already visible and the setting says so, vanish instead of displaying again.
+       if ([[StatusWindowController sharedController] currentStatusWindowType] == StatusWindowTrackInfoType && [[StatusWindow sharedWindow] visibilityState] == ITWindowVisibleState) {
+               [self invalidateStatusWindowUpdateTimer];
+               [[StatusWindow sharedWindow] vanish:nil];
+               return;
+       }
+       
     ITDebugLog(@"Showing track info status window.");
     
     NS_DURING