*/
- (NSDictionary *)capabilities;
+/*!
+ * @method showPrimaryInterface
+ */
+- (BOOL)showPrimaryInterface;
+
/*!
* @method playerRunningState
* @abstract Returns the running state of the remote's player.
[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];
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
nil];
}
+- (BOOL)showPrimaryInterface
+{
+ return NO;
+}
+
- (ITMTRemotePlayerRunningState)playerRunningState
{
NSArray *apps = [[NSWorkspace sharedWorkspace] launchedApplications];