+ if ([df objectForKey:@"ShowPlayer"]) {
+ ITDebugLog(@"Setting up \"ShowPlayer\" hot key.");
+ 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"]) {
+ ITDebugLog(@"Setting up \"TrackInfo\" hot key.");
+ 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"]) {
+ ITDebugLog(@"Setting up \"UpcomingSongs\" hot key.");
+ 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"]) {
+ ITDebugLog(@"Setting up \"IncrementVolume\" hot key.");
+ 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"]) {
+ ITDebugLog(@"Setting up \"DecrementVolume\" hot key.");
+ 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"]) {
+ ITDebugLog(@"Setting up \"IncrementRating\" hot key.");
+ 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"]) {
+ ITDebugLog(@"Setting up \"DecrementRating\" hot key.");
+ 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"]) {
+ ITDebugLog(@"Setting up \"ToggleLoop\" hot key.");
+ 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"]) {
+ ITDebugLog(@"Setting up \"ToggleShuffle\" hot key.");
+ 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]];
+ }
+
+ ITDebugLog(@"Setting up track info checkboxes.");
+ // 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];
+ [ratingCheckbox setState:[df boolForKey:@"showTrackRating"] ? NSOnState : NSOffState];
+
+ // Set the launch at login checkbox state
+ ITDebugLog(@"Setting launch at login 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];
+ }
+ }
+
+ // Set the launch player checkbox state
+ ITDebugLog(@"Setting launch player with MenuTunes state.");
+ [launchPlayerAtLaunchCheckbox setState:[df boolForKey:@"LaunchPlayerWithMT"] ? NSOnState : NSOffState];
+
+ // Setup the positioning controls
+
+ // Setup effects controls
+ [appearanceEffectPopup selectItem:[appearanceEffectPopup itemAtIndex:[appearanceEffectPopup indexOfItemWithTag:[df integerForKey:@"statusWindowAppearanceEffect"]]]];
+ [vanishEffectPopup selectItem:[vanishEffectPopup itemAtIndex:[vanishEffectPopup indexOfItemWithTag:[df integerForKey:@"statusWindowVanishEffect"]]]];
+ [appearanceSpeedSlider setFloatValue:-([df floatForKey:@"statusWindowAppearanceSpeed"])];
+ [vanishSpeedSlider setFloatValue:-([df floatForKey:@"statusWindowVanishSpeed"])];
+ [vanishDelaySlider setFloatValue:[df floatForKey:@"statusWindowVanishDelay"]];
+ [showOnChangeCheckbox setState:([df boolForKey:@"showSongInfoOnChange"] ? NSOnState : NSOffState)];