From: Kent Sutherland Date: Mon, 11 Apr 2005 00:05:23 +0000 (+0000) Subject: Fixed it so that if you double click on the MT icon or call it to open, X-Git-Tag: v1.5~2 X-Git-Url: http://git.ithinksw.org/MenuTunes.git/commitdiff_plain/26870d1db0a474e33134e50c8a2c9dbaded7de63 Fixed it so that if you double click on the MT icon or call it to open, it will show the prefs window once it is launched. --- diff --git a/MainController.m b/MainController.m index eaaa953..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]; @@ -1520,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]; @@ -1556,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 -