- if (!duplicateCombo) {
- [hotKeysDictionary setObject:combo forKey:currentHotKey];
- [df setKeyCombo:combo forKey:currentHotKey];
-
- if ([currentHotKey isEqualToString:@"PlayPause"]) {
- [playPauseButton setTitle:string];
- } else if ([currentHotKey isEqualToString:@"NextTrack"]) {
- [nextTrackButton setTitle:string];
- } else if ([currentHotKey isEqualToString:@"PrevTrack"]) {
- [previousTrackButton setTitle:string];
- } else if ([currentHotKey isEqualToString:@"ToggleVisualizer"]) {
- [visualizerButton setTitle:string];
- } else if ([currentHotKey isEqualToString:@"TrackInfo"]) {
- [trackInfoButton setTitle:string];
- } else if ([currentHotKey isEqualToString:@"UpcomingSongs"]) {
- [upcomingSongsButton setTitle:string];
- } else if ([currentHotKey isEqualToString:@"IncrementVolume"]) {
- [volumeIncrementButton setTitle:string];
- } else if ([currentHotKey isEqualToString:@"DecrementVolume"]) {
- [volumeDecrementButton setTitle:string];
- } else if ([currentHotKey isEqualToString:@"IncrementRating"]) {
- [ratingIncrementButton setTitle:string];
- } else if ([currentHotKey isEqualToString:@"DecrementRating"]) {
- [ratingDecrementButton setTitle:string];
- } else if ([currentHotKey isEqualToString:@"ToggleShuffle"]) {
- [toggleShuffleButton setTitle:string];
- } else if ([currentHotKey isEqualToString:@"ToggleLoop"]) {
- [toggleLoopButton setTitle:string];
- }
- //[controller rebuildMenu];
- }
+ ITDebugLog(@"Saved hot key named %@.", currentHotKey);
+ [hotKeysDictionary setObject:combo forKey:currentHotKey];
+ [df setObject:[combo plistRepresentation] forKey:currentHotKey];
+
+ ITDebugLog(@"Setting button name.");
+ if ([currentHotKey isEqualToString:@"PlayPause"]) {
+ [playPauseButton setTitle:string];
+ } else if ([currentHotKey isEqualToString:@"NextTrack"]) {
+ [nextTrackButton setTitle:string];
+ } else if ([currentHotKey isEqualToString:@"PrevTrack"]) {
+ [previousTrackButton setTitle:string];
+ } else if ([currentHotKey isEqualToString:@"ShowPlayer"]) {
+ [showPlayerButton setTitle:string];
+ } else if ([currentHotKey isEqualToString:@"TrackInfo"]) {
+ [trackInfoButton setTitle:string];
+ } else if ([currentHotKey isEqualToString:@"UpcomingSongs"]) {
+ [upcomingSongsButton setTitle:string];
+ } else if ([currentHotKey isEqualToString:@"IncrementVolume"]) {
+ [volumeIncrementButton setTitle:string];
+ } else if ([currentHotKey isEqualToString:@"DecrementVolume"]) {
+ [volumeDecrementButton setTitle:string];
+ } else if ([currentHotKey isEqualToString:@"IncrementRating"]) {
+ [ratingIncrementButton setTitle:string];
+ } else if ([currentHotKey isEqualToString:@"DecrementRating"]) {
+ [ratingDecrementButton setTitle:string];
+ } else if ([currentHotKey isEqualToString:@"ToggleShuffle"]) {
+ [toggleShuffleButton setTitle:string];
+ } else if ([currentHotKey isEqualToString:@"ToggleLoop"]) {
+ [toggleLoopButton setTitle:string];
+ }
+ [controller setupHotKeys];