X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/2d9409ab3de16736f5ec5fae6ec0eb6c15fe6c4a..796f8360ac05b39085aef9f202f635a04ba6834e:/PreferencesController.m diff --git a/PreferencesController.m b/PreferencesController.m index 3a9ecd3..0e8c372 100755 --- a/PreferencesController.m +++ b/PreferencesController.m @@ -134,7 +134,6 @@ - (IBAction)apply:(id)sender { - ProcessSerialNumber psn; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:myItems forKey:@"menu"]; @@ -210,9 +209,16 @@ [defaults setInteger:5 forKey:@"SongsInAdvance"]; } - psn = [mt iTunesPSN]; - if (!((psn.highLongOfPSN == kNoProcess) && (psn.lowLongOfPSN == 0))) { - [mt rebuildMenu]; + { + NSArray *apps = [[NSWorkspace sharedWorkspace] launchedApplications]; + int i; + + for (i = 0; i < [apps count]; i++) { + if ([[[apps objectAtIndex:i] objectForKey:@"NSApplicationName"] + isEqualToString:@"iTunes"]) { + [mt rebuildMenu]; + } + } } [mt clearHotKeys]; }