+ [df synchronize];
+}
+
+- (void)registerDefaults
+{
+ ITDebugLog(@"Registering defaults.");
+ [df setObject:[NSArray arrayWithObjects:
+ @"trackInfo",
+ @"separator",
+ @"playPause",
+ @"prevTrack",
+ @"nextTrack",
+ @"separator",
+ @"playlists",
+ @"upcomingSongs",
+ @"separator",
+ @"preferences",
+ @"quit",
+ nil] forKey:@"menu"];
+
+ [df setInteger:MT_CURRENT_VERSION forKey:@"appVersion"];
+ [df setInteger:5 forKey:@"SongsInAdvance"];
+// [df setBool:YES forKey:@"showName"]; // Song info will always show song title.
+ [df setBool:YES forKey:@"showArtist"];
+ [df setBool:YES forKey:@"showAlbumArtwork"];
+ [df setBool:NO forKey:@"showAlbum"];
+ [df setBool:NO forKey:@"showComposer"];
+ [df setBool:NO forKey:@"showTime"];
+ [df setBool:NO forKey:@"showToolTip"];
+
+ [df setObject:@"ITCutWindowEffect" forKey:@"statusWindowAppearanceEffect"];
+ [df setObject:@"ITDissolveWindowEffect" forKey:@"statusWindowVanishEffect"];
+ [df setFloat:0.8 forKey:@"statusWindowAppearanceSpeed"];
+ [df setFloat:0.8 forKey:@"statusWindowVanishSpeed"];
+ [df setFloat:4.0 forKey:@"statusWindowVanishDelay"];
+ [df setInteger:(int)ITWindowPositionBottom forKey:@"statusWindowVerticalPosition"];
+ [df setInteger:(int)ITWindowPositionLeft forKey:@"statusWindowHorizontalPosition"];
+ [[StatusWindow sharedWindow] setVerticalPosition:(int)ITWindowPositionBottom];
+ [[StatusWindow sharedWindow] setHorizontalPosition:(int)ITWindowPositionLeft];
+ [df setBool:YES forKey:@"showSongInfoOnChange"];
+
+ [df setObject:[NSArchiver archivedDataWithRootObject:[NSColor blueColor]] forKey:@"statusWindowBackgroundColor"];
+
+ [df synchronize];
+
+ /*if (ITDoesApplicationLaunchOnLogin([[NSBundle mainBundle] bundlePath])) {
+ [[StatusWindowController sharedController] showSetupQueryWindow];
+ }*/
+}
+
+- (void)autoLaunchOK
+{
+ [[StatusWindow sharedWindow] setLocked:NO];
+ [[StatusWindow sharedWindow] vanish:self];
+ [[StatusWindow sharedWindow] setIgnoresMouseEvents:YES];
+
+ //ITSetApplicationLaunchOnLogin([[NSBundle mainBundle] bundlePath], YES);
+}
+
+- (void)autoLaunchCancel
+{
+ [[StatusWindow sharedWindow] setLocked:NO];
+ [[StatusWindow sharedWindow] vanish:self];
+ [[StatusWindow sharedWindow] setIgnoresMouseEvents:YES];
+}
+
+- (void)deletePressedInTableView:(NSTableView *)tableView
+{
+ if (tableView == menuTableView) {
+ int selRow = [tableView selectedRow];
+ ITDebugLog(@"Delete pressed in menu table view.");
+ if (selRow != - 1) {
+ NSString *object = [myItems objectAtIndex:selRow];
+
+ if ([object isEqualToString:@"preferences"]) {
+ NSBeep();
+ return;
+ }
+
+ if (![object isEqualToString:@"separator"])
+ [availableItems addObject:object];
+ ITDebugLog(@"Removing object named %@", object);
+ [myItems removeObjectAtIndex:selRow];
+ [menuTableView reloadData];
+ [allTableView reloadData];
+ }
+ [self changeMenus:self];
+ }
+}
+
+- (void)resetRemotePlayerTextFields
+{
+ if ([[NetworkController sharedController] isConnectedToServer]) {
+ [selectedPlayerTextField setStringValue:[[[NetworkController sharedController] networkObject] serverName]];
+ [locationTextField setStringValue:[[NetworkController sharedController] remoteHost]];