X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/0948b4b6166bbee8caefca1278b6551d264068a8..76260fa56d3c02ee8b80b6443376397cde01146b:/MainController.m?ds=inline diff --git a/MainController.m b/MainController.m index 61c2d68..c2502c5 100755 --- a/MainController.m +++ b/MainController.m @@ -189,13 +189,6 @@ static MainController *sharedController; _open = YES; } -- (void)applicationDidBecomeActive:(NSNotification *)note -{ - if (_open && !blinged && ![NSApp mainWindow] && ![[StatusWindow sharedWindow] isVisible]) { - [[MainController sharedController] showPreferences]; - } -} - - (ITMTRemote *)loadRemote { NSString *folderPath = [[NSBundle mainBundle] builtInPlugInsPath]; @@ -388,14 +381,12 @@ static MainController *sharedController; if (refreshTimer && identifier == nil) { if ([statusItem isEnabled]) { [statusItem setToolTip:@"iTunes not responding."]; - [[ITHotKeyCenter sharedCenter] setEnabled:NO]; } [statusItem setEnabled:NO]; return; } else if (![statusItem isEnabled]) { [statusItem setEnabled:YES]; [statusItem setToolTip:_toolTip]; - [[ITHotKeyCenter sharedCenter] setEnabled:YES]; return; } @@ -465,7 +456,6 @@ static MainController *sharedController; if (refreshTimer) { if ([statusItem isEnabled]) { [statusItem setToolTip:NSLocalizedString(@"iTunesNotResponding", @"iTunes is not responding.")]; - [[ITHotKeyCenter sharedCenter] setEnabled:NO]; } [statusItem setEnabled:NO]; } else { @@ -477,7 +467,6 @@ static MainController *sharedController; } else if (![statusItem isEnabled]) { [statusItem setEnabled:YES]; [statusItem setToolTip:_toolTip]; - [[ITHotKeyCenter sharedCenter] setEnabled:YES]; return; } @@ -1524,7 +1513,7 @@ static MainController *sharedController; [refreshTimer invalidate]; [refreshTimer release]; refreshTimer = nil; - [[NSNotificationCenter defaultCenter] removeObserver:self]; + [[NSNotificationCenter defaultCenter] removeObserver:self name:@"ITMTTrackChanged" object:nil]; [statusItem setEnabled:YES]; [statusItem setToolTip:@"iTunes not running."]; [self clearHotKeys]; @@ -1560,6 +1549,12 @@ static MainController *sharedController; [[NSStatusBar systemStatusBar] removeStatusItem:statusItem]; } +- (void)applicationDidBecomeActive:(NSNotification *)note +{ + if (_open && !blinged && ![NSApp mainWindow] && ([[StatusWindow sharedWindow] exitMode] == ITTransientStatusWindowExitAfterDelay)) { + [[MainController sharedController] showPreferences]; + } +} /*************************************************************************/ #pragma mark -