X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/547eb3b6dd80973198a2d3eea7c1ab7631540086..f16e2f1f2b4778b4bc890162fa9cd31d7dd79b54:/MenuController.m?ds=sidebyside diff --git a/MenuController.m b/MenuController.m index 96767ab..7c0f307 100755 --- a/MenuController.m +++ b/MenuController.m @@ -7,9 +7,9 @@ // #import "MenuController.h" -#import "NewMainController.h" -#import "HotKeyCenter.h" -#import "KeyCombo.h" +#import "MainController.h" +#import +#import @interface MenuController (SubmenuMethods) - (NSMenu *)ratingMenu; @@ -39,7 +39,7 @@ NSString *nextObject; NSMenuItem *tempItem; NSEnumerator *itemEnum; - KeyCombo *keyCombo; + ITKeyCombo *keyCombo; //Get the information _currentPlaylist = [currentRemote currentPlaylistIndex]; @@ -72,11 +72,11 @@ [tempItem setTag:MTMenuPlayPauseItem]; [tempItem setTarget:self]; - if ( (keyCombo = [[HotKeyCenter sharedCenter] keyComboForName:@"PlayPause"]) ) { + /*if ( (keyCombo = [[ITHotKeyCenter sharedCenter] keyComboForName:@"PlayPause"]) ) { [self setKeyEquivalentForCode:[keyCombo keyCode] andModifiers:[keyCombo modifiers] onItem:tempItem]; - } + }*/ // FIX ME! switch ([currentRemote playerPlayingState]) { case ITMTRemotePlayerPlaying: @@ -94,11 +94,11 @@ action:@selector(performMainMenuAction:) keyEquivalent:@""]; - if ( (keyCombo = [[HotKeyCenter sharedCenter] keyComboForName:@"NextTrack"]) ) { + /*if ( (keyCombo = [[ITHotKeyCenter sharedCenter] keyComboForName:@"NextTrack"]) ) { [self setKeyEquivalentForCode:[keyCombo keyCode] andModifiers:[keyCombo modifiers] onItem:tempItem]; - } + }*/ // FIX ME! if (_currentPlaylist) { [tempItem setTag:MTMenuNextTrackItem]; @@ -109,11 +109,11 @@ action:@selector(performMainMenuAction:) keyEquivalent:@""]; - if ( (keyCombo = [[HotKeyCenter sharedCenter] keyComboForName:@"PrevTrack"]) ) { + /*if ( (keyCombo = [[ITHotKeyCenter sharedCenter] keyComboForName:@"PrevTrack"]) ) { [self setKeyEquivalentForCode:[keyCombo keyCode] andModifiers:[keyCombo modifiers] onItem:tempItem]; - } + }*/ // FIX ME! if (_currentPlaylist) { [tempItem setTag:MTMenuPreviousTrackItem]; @@ -142,11 +142,11 @@ action:@selector(performMainMenuAction:) keyEquivalent:@""]; - if ( (keyCombo = [[HotKeyCenter sharedCenter] keyComboForName:@"ShowPlayer"]) ) { + /*if ( (keyCombo = [[ITHotKeyCenter sharedCenter] keyComboForName:@"ShowPlayer"]) ) { [self setKeyEquivalentForCode:[keyCombo keyCode] andModifiers:[keyCombo modifiers] onItem:tempItem]; - } + }*/ // FIX ME! [tempItem setTarget:self]; [tempItem setTag:MTMenuShowPlayerItem]; @@ -176,15 +176,21 @@ } if ([defaults boolForKey:@"showAlbum"]) { - [menu addItemWithTitle:[NSString stringWithFormat:@" %@", [currentRemote currentSongAlbum]] - action:nil - keyEquivalent:@""]; + NSString *curAlbum = [currentRemote currentSongAlbum]; + if ([curAlbum length]) { + [menu addItemWithTitle:[NSString stringWithFormat:@" %@", curAlbum] + action:nil + keyEquivalent:@""]; + } } if ([defaults boolForKey:@"showArtist"]) { - [menu addItemWithTitle:[NSString stringWithFormat:@" %@", [currentRemote currentSongArtist]] - action:nil - keyEquivalent:@""]; + NSString *curArtist = [currentRemote currentSongArtist]; + if ([curArtist length]) { + [menu addItemWithTitle:[NSString stringWithFormat:@" %@", curArtist] + action:nil + keyEquivalent:@""]; + } } if ([defaults boolForKey:@"showTrackNumber"]) {