X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/46b610a25dea1e26f1348dac4024d72514130bb3..95bfc9d0fa830da8615ed00808ff347df2f50eb5:/MainController.m diff --git a/MainController.m b/MainController.m index 548ca25..db0269f 100755 --- a/MainController.m +++ b/MainController.m @@ -950,7 +950,7 @@ static MainController *sharedController; [hotKey setName:@"TrackInfo"]; [hotKey setKeyCombo:[ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"TrackInfo"]]]; [hotKey setTarget:self]; - [hotKey setAction:@selector(showCurrentTrackInfo)]; + [hotKey setAction:@selector(showCurrentTrackInfoHotKey)]; [[ITHotKeyCenter sharedCenter] registerHotKey:[hotKey autorelease]]; } @@ -1060,6 +1060,18 @@ static MainController *sharedController; ITDebugLog(@"Finished setting up hot keys."); } +- (void)showCurrentTrackInfoHotKey +{ + //If we're already visible and the setting says so, vanish instead of displaying again. + if ([df boolForKey:@"ToggleTrackInfoWithHotKey"] && [statusWindowController currentStatusWindowType] == StatusWindowTrackInfoType && [[StatusWindow sharedWindow] visibilityState] == ITWindowVisibleState) { + ITDebugLog(@"Track window is already visible, hiding track window."); + [self invalidateStatusWindowUpdateTimer]; + [[StatusWindow sharedWindow] vanish:nil]; + return; + } + [self showCurrentTrackInfo]; +} + - (void)showCurrentTrackInfo { ITMTRemotePlayerSource source = 0; @@ -1073,14 +1085,6 @@ static MainController *sharedController; int rating = -1; int playCount = -1; - //If we're already visible and the setting says so, vanish instead of displaying again. - if ([df boolForKey:@"ToggleTrackInfoWithHotKey"] && [statusWindowController currentStatusWindowType] == StatusWindowTrackInfoType && [[StatusWindow sharedWindow] visibilityState] == ITWindowVisibleState) { - ITDebugLog(@"Track window is already visible, hiding track window."); - [self invalidateStatusWindowUpdateTimer]; - [[StatusWindow sharedWindow] vanish:nil]; - return; - } - ITDebugLog(@"Showing track info status window."); NS_DURING