- [[HotKeyCenter sharedCenter] addHotKey:@"PrevTrack"
- combo:[df keyComboForKey:@"PrevTrack"]
- target:self action:@selector(prevSong)];
+ ITDebugLog(@"Setting up previous track hot key.");
+ hotKey = [[ITHotKey alloc] init];
+ [hotKey setName:@"PrevTrack"];
+ [hotKey setKeyCombo:[ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"PrevTrack"]]];
+ [hotKey setTarget:self];
+ [hotKey setAction:@selector(prevSong)];
+ [[ITHotKeyCenter sharedCenter] registerHotKey:[hotKey autorelease]];
+ }
+
+ if ([df objectForKey:@"ShowPlayer"] != nil) {
+ ITDebugLog(@"Setting up show player hot key.");
+ hotKey = [[ITHotKey alloc] init];
+ [hotKey setName:@"ShowPlayer"];
+ [hotKey setKeyCombo:[ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"ShowPlayer"]]];
+ [hotKey setTarget:self];
+ [hotKey setAction:@selector(showPlayer)];
+ [[ITHotKeyCenter sharedCenter] registerHotKey:[hotKey autorelease]];