X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/41381a3e6391921379d5e1b78d5434d846cc07fa..479952e2cf104d1f984108c5b672d8fbb039eebe:/MenuTunes.m diff --git a/MenuTunes.m b/MenuTunes.m index eea31d2..0c08e20 100755 --- a/MenuTunes.m +++ b/MenuTunes.m @@ -749,8 +749,7 @@ [menu release]; menu = [[NSMenu alloc] initWithTitle:@""]; - [menu addItemWithTitle:@"Audio Player" action:NULL keyEquivalent:@""]; - [menu addItemWithTitle:@"Not Running" action:NULL keyEquivalent:@""]; + [[menu addItemWithTitle:[NSString stringWithFormat:@"Open %@", [currentRemote playerSimpleName]] action:@selector(showPlayer:) keyEquivalent:@""] setTarget:self]; [menu addItem:[NSMenuItem separatorItem]]; [[menu addItemWithTitle:@"Preferences" action:@selector(showPreferences:) keyEquivalent:@""] setTarget:self]; [[menu addItemWithTitle:@"Quit" action:@selector(quitMenuTunes:) keyEquivalent:@""] setTarget:self]; @@ -875,6 +874,18 @@ prefsController = nil; } +- (void)showPlayer:(id)sender +{ + if ( ( isAppRunning == ITMTRemotePlayerRunning) ) { + [currentRemote showPrimaryInterface]; + } else { + if (![[NSWorkspace sharedWorkspace] launchApplication:[currentRemote playerFullName]]) { + NSLog(@"Error Launching Player"); + } + } +} + + // // // Show Current Track Info And Show Upcoming Songs Floaters