X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/3d264b03e4c01c0f2165888dc402cb0f16509768..cefefd3e817015f9b8e5708bedc52539cfa88799:/MenuTunes.m diff --git a/MenuTunes.m b/MenuTunes.m index ccb4b5a..3c96ed0 100755 --- a/MenuTunes.m +++ b/MenuTunes.m @@ -44,14 +44,13 @@ menu = [[NSMenu alloc] initWithTitle:@""]; - if ( ( [currentRemote playerRunningStatus] == ITMTRemotePlayerRunning ) ) { + if ( ( [currentRemote playerRunningState] == ITMTRemotePlayerRunning ) ) { [self remotePlayerLaunched:nil]; } else { [self remotePlayerTerminated:nil]; } - statusItem = [[ITStatusItem alloc] initWithStatusBar:[NSStatusBar systemStatusBar] - withLength:NSSquareStatusItemLength]; + statusItem = [[ITStatusItem alloc] initWithStatusBar:[NSStatusBar systemStatusBar] withLength:NSSquareStatusItemLength]; [statusItem setImage:[NSImage imageNamed:@"menu"]]; [statusItem setAlternateImage:[NSImage imageNamed:@"selected_image"]]; @@ -450,6 +449,7 @@ didHaveAlbumName = (([curAlbumName length] > 0) ? YES : NO); } } + [menu update]; } //Rebuild the upcoming songs submenu. Can be improved a lot. @@ -607,9 +607,9 @@ - (void)timerUpdate { int playlist = [currentRemote currentPlaylistIndex]; - ITMTRemotePlayerState playerState = [currentRemote playerState]; + ITMTRemotePlayerPlayingState playerPlayingState = [currentRemote playerPlayingState]; - if ((playlist > 0) || playerState != ITMTRemotePlayerStopped) { + if ((playlist > 0) || playerPlayingState != ITMTRemotePlayerStopped) { int trackPlayingIndex = [currentRemote currentSongIndex]; if (trackPlayingIndex != lastSongIndex) { @@ -668,7 +668,7 @@ } //Update Play/Pause menu item if (playPauseMenuItem){ - if (playerState == ITMTRemotePlayerPlaying) { + if (playerPlayingState == ITMTRemotePlayerPlaying) { [playPauseMenuItem setTitle:@"Pause"]; } else { [playPauseMenuItem setTitle:@"Play"]; @@ -793,13 +793,13 @@ int curSet = [currentRemote currentEQPresetIndex]; int item = [[sender representedObject] intValue]; [currentRemote switchToEQAtIndex:item]; - [[eqMenu itemAtIndex:curSet - 1] setState:NSOffState]; - [[eqMenu itemAtIndex:item - 1] setState:NSOnState]; + [[eqMenu itemAtIndex:curSet + 1] setState:NSOffState]; + [[eqMenu itemAtIndex:item + 2] setState:NSOnState]; } - (void)playPause:(id)sender { - ITMTRemotePlayerState state = [currentRemote playerState]; + ITMTRemotePlayerPlayingState state = [currentRemote playerPlayingState]; if (state == ITMTRemotePlayerPlaying) { [currentRemote pause];