- [[HotKeyCenter sharedCenter] addHotKey:@"PrevTrack"
- combo:[df keyComboForKey:@"PrevTrack"]
- target:self action:@selector(prevSong)];
+ 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) {
+ 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]];