if ( ( [self songChanged] ) ||
( ([self radioIsPlaying]) && (latestPlaylistClass != ITMTRemotePlayerRadioPlaylist) ) ||
( (! [self radioIsPlaying]) && (latestPlaylistClass == ITMTRemotePlayerRadioPlaylist) ) ) {
- //[statusItem setMenu:[self menu]];
[self setLatestSongIdentifier:[currentRemote currentSongUniqueIdentifier]];
latestPlaylistClass = [currentRemote currentPlaylistClass];
[self showCurrentTrackInfo];
}
}
-/*
- //Update Play/Pause menu item
- if (playPauseItem){
- if ([currentRemote playerPlayingState] == ITMTRemotePlayerPlaying) {
- [playPauseItem setTitle:@"Pause"];
- } else {
- [playPauseItem setTitle:@"Play"];
- }
- }
-*/
}
- (void)menuClicked
{
- [statusItem setMenu:[menuController menu]];
- NSLog(@"The menu was clix0r3d, do something!");
+ if ([currentRemote playerRunningState] == ITMTRemotePlayerRunning) {
+ [statusItem setMenu:[menuController menu]];
+ } else {
+ [statusItem setMenu:[menuController menuForNoPlayer]];
+ }
}
//
refreshTimer = nil;
[self clearHotKeys];
playerRunningState = ITMTRemotePlayerNotRunning;
-
- [statusItem setMenu:[self menuForNoPlayer]];
}
}