+ return currentRemote;
+}
+
+//
+//
+// Hot key setup
+//
+//
+
+- (void)clearHotKeys
+{
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"PlayPause"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"NextTrack"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"PrevTrack"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"ToggleVisualizer"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"TrackInfo"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"UpcomingSongs"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"ToggleLoop"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"ToggleShuffle"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"IncrementVolume"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"DecrementVolume"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"IncrementRating"];
+ [[ITHotKeyCenter sharedCenter] removeHotKey:@"DecrementRating"];
+}
+
+- (void)setupHotKeys
+{
+ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+
+ if ([defaults objectForKey:@"PlayPause"] != nil) {
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"PlayPause"
+ combo:[defaults keyComboForKey:@"PlayPause"]
+ target:self action:@selector(playPause:)];
+ }
+
+ if ([defaults objectForKey:@"NextTrack"] != nil) {
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"NextTrack"
+ combo:[defaults keyComboForKey:@"NextTrack"]
+ target:self action:@selector(nextSong:)];
+ }
+
+ if ([defaults objectForKey:@"PrevTrack"] != nil) {
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"PrevTrack"
+ combo:[defaults keyComboForKey:@"PrevTrack"]
+ target:self action:@selector(prevSong:)];
+ }
+
+ if ([defaults objectForKey:@"ToggleVisualizer"] != nil) {
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"ToggleVisualizer"
+ combo:[defaults keyComboForKey:@"ToggleVisualizer"]
+ target:self action:@selector(toggleVisualizer)];
+ }
+
+ if ([defaults objectForKey:@"TrackInfo"] != nil) {
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"TrackInfo"
+ combo:[defaults keyComboForKey:@"TrackInfo"]
+ target:self action:@selector(showCurrentTrackInfoStatusWindow)];
+ }
+
+ if ([defaults objectForKey:@"UpcomingSongs"] != nil) {
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"UpcomingSongs"
+ combo:[defaults keyComboForKey:@"UpcomingSongs"]
+ target:self action:@selector(showUpcomingSongsStatusWindow)];
+ }
+
+ if ([defaults objectForKey:@"ToggleLoop"] != nil) {
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"ToggleLoop"
+ combo:[defaults keyComboForKey:@"ToggleLoop"]
+ target:self action:@selector(showToggleLoopStatusWindow)];
+ }
+
+ if ([defaults objectForKey:@"ToggleShuffle"] != nil) {
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"ToggleShuffle"
+ combo:[defaults keyComboForKey:@"ToggleShuffle"]
+ target:self action:@selector(showToggleShuffleStatusWindow)];
+ }
+
+ if ([defaults objectForKey:@"IncrementVolume"] != nil) {
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"IncrementVolume"
+ combo:[defaults keyComboForKey:@"IncrementVolume"]
+ target:self action:@selector(showVolumeIncrementStatusWindow)];
+ }
+
+ if ([defaults objectForKey:@"DecrementVolume"] != nil) {
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"DecrementVolume"
+ combo:[defaults keyComboForKey:@"DecrementVolume"]
+ target:self action:@selector(showVolumeDecrementStatusWindow)];
+ }
+
+ if ([defaults objectForKey:@"IncrementRating"] != nil) {
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"IncrementRating"
+ combo:[defaults keyComboForKey:@"IncrementRating"]
+ target:self action:@selector(showRatingIncrementStatusWindow)];
+ }
+
+ if ([defaults objectForKey:@"DecrementRating"] != nil) {
+ [[ITHotKeyCenter sharedCenter] addHotKey:@"DecrementRating"
+ combo:[defaults keyComboForKey:@"DecrementRating"]
+ target:self action:@selector(showRatingDecrementStatusWindow)];