+ if ([df objectForKey:@"ShowPlayer"]) {
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"ShowPlayer"]];
+ [hotKeysDictionary setObject:anItem forKey:@"ShowPlayer"];
+ [showPlayerButton setTitle:[anItem description]];
+ } else {
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"ShowPlayer"];
+ [showPlayerButton setTitle:[[ITKeyCombo clearKeyCombo] description]];
+ }
+
+ if ([df objectForKey:@"TrackInfo"]) {
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"TrackInfo"]];
+ [hotKeysDictionary setObject:anItem forKey:@"TrackInfo"];
+ [trackInfoButton setTitle:[anItem description]];
+ } else {
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"TrackInfo"];
+ [trackInfoButton setTitle:[[ITKeyCombo clearKeyCombo] description]];
+ }
+
+ if ([df objectForKey:@"UpcomingSongs"]) {
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"UpcomingSongs"]];
+ [hotKeysDictionary setObject:anItem forKey:@"UpcomingSongs"];
+ [upcomingSongsButton setTitle:[anItem description]];
+ } else {
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"UpcomingSongs"];
+ [upcomingSongsButton setTitle:[[ITKeyCombo clearKeyCombo] description]];
+ }
+
+ if ([df objectForKey:@"IncrementVolume"]) {
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"IncrementVolume"]];
+ [hotKeysDictionary setObject:anItem forKey:@"IncrementVolume"];
+ [volumeIncrementButton setTitle:[anItem description]];
+ } else {
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"IncrementVolume"];
+ [volumeIncrementButton setTitle:[[ITKeyCombo clearKeyCombo] description]];
+ }
+
+ if ([df objectForKey:@"DecrementVolume"]) {
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"DecrementVolume"]];
+ [hotKeysDictionary setObject:anItem forKey:@"DecrementVolume"];
+ [volumeDecrementButton setTitle:[anItem description]];
+ } else {
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"DecrementVolume"];
+ [volumeDecrementButton setTitle:[[ITKeyCombo clearKeyCombo] description]];
+ }
+
+ if ([df objectForKey:@"IncrementRating"]) {
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"IncrementRating"]];
+ [hotKeysDictionary setObject:anItem forKey:@"IncrementRating"];
+ [ratingIncrementButton setTitle:[anItem description]];
+ } else {
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"IncrementRating"];
+ [ratingIncrementButton setTitle:[[ITKeyCombo clearKeyCombo] description]];
+ }
+
+ if ([df objectForKey:@"DecrementRating"]) {
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"DecrementRating"]];
+ [hotKeysDictionary setObject:anItem forKey:@"DecrementRating"];
+ [ratingDecrementButton setTitle:[anItem description]];
+ } else {
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"DecrementRating"];
+ [ratingDecrementButton setTitle:[[ITKeyCombo clearKeyCombo] description]];
+ }
+
+ if ([df objectForKey:@"ToggleLoop"]) {
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"ToggleLoop"]];
+ [hotKeysDictionary setObject:anItem forKey:@"ToggleLoop"];
+ [toggleLoopButton setTitle:[anItem description]];
+ } else {
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"ToggleLoop"];
+ [toggleLoopButton setTitle:[[ITKeyCombo clearKeyCombo] description]];
+ }
+
+ if ([df objectForKey:@"ToggleShuffle"]) {
+ anItem = [ITKeyCombo keyComboWithPlistRepresentation:[df objectForKey:@"ToggleShuffle"]];
+ [hotKeysDictionary setObject:anItem forKey:@"ToggleShuffle"];
+ [toggleShuffleButton setTitle:[anItem description]];
+ } else {
+ [hotKeysDictionary setObject:[ITKeyCombo clearKeyCombo] forKey:@"ToggleShuffle"];
+ [toggleShuffleButton setTitle:[[ITKeyCombo clearKeyCombo] description]];
+ }
+
+ // Check current track info buttons
+ [albumCheckbox setState:[df boolForKey:@"showAlbum"] ? NSOnState : NSOffState];
+ [nameCheckbox setState:NSOnState]; // Song info will ALWAYS show song title.
+ [nameCheckbox setEnabled:NO]; // Song info will ALWAYS show song title.
+ [artistCheckbox setState:[df boolForKey:@"showArtist"] ? NSOnState : NSOffState];
+ [trackTimeCheckbox setState:[df boolForKey:@"showTime"] ? NSOnState : NSOffState];
+ [trackNumberCheckbox setState:[df boolForKey:@"showTrackNumber"] ? NSOnState : NSOffState];
+
+ // Set the launch at login checkbox state
+ [df synchronize];
+ loginwindow = [[df persistentDomainForName:@"loginwindow"] mutableCopy];
+ loginarray = [loginwindow objectForKey:@"AutoLaunchedApplicationDictionary"];
+
+ loginEnum = [loginarray objectEnumerator];
+ while ( (anItem = [loginEnum nextObject]) ) {
+ if ([[[anItem objectForKey:@"Path"] lastPathComponent] isEqualToString:[[[NSBundle mainBundle] bundlePath] lastPathComponent]]) {
+ [launchAtLoginCheckbox setState:NSOnState];
+ }
+ }