+- (void)panel:(VLCEnterTextPanel *)panel returnValue:(NSUInteger)value text:(NSString *)text
+{
+ if (value == NSOKButton) {
+ if ([text length] > 0) {
+ /* prepare current data */
+ [self updateCurrentProfile];
+
+ /* add profile to arrays */
+ NSMutableArray * workArray = [[NSMutableArray alloc] initWithArray:self.profileNames];
+ [workArray addObject:text];
+ [self setProfileNames:[[[NSArray alloc] initWithArray:workArray] autorelease]];
+ [workArray release];
+
+ workArray = [[NSMutableArray alloc] initWithArray:self.profileValueList];
+ [workArray addObject:[self.currentProfile componentsJoinedByString:@";"]];
+ [self setProfileValueList:[[[NSArray alloc] initWithArray:workArray] autorelease]];
+ [workArray release];
+
+ /* update UI */
+ [self recreateProfilePopup];
+ [_profile_pop selectItemWithTitle:text];
+
+ /* update internals */
+ [self switchProfile:self];
+ [self storeProfilesOnDisk];
+ }
+ }
+}
+
+- (void)panel:(VLCSelectItemInPopupPanel *)panel returnValue:(NSUInteger)value item:(NSUInteger)item
+{
+ if (value == NSOKButton) {
+ /* remove requested profile from the arrays */
+ NSMutableArray * workArray = [[NSMutableArray alloc] initWithArray:self.profileNames];
+ [workArray removeObjectAtIndex:item];
+ [self setProfileNames:[[[NSArray alloc] initWithArray:workArray] autorelease]];
+ [workArray release];
+ workArray = [[NSMutableArray alloc] initWithArray:self.profileValueList];
+ [workArray removeObjectAtIndex:item];
+ [self setProfileValueList:[[[NSArray alloc] initWithArray:workArray] autorelease]];
+ [workArray release];
+
+ /* update UI */
+ [self recreateProfilePopup];
+
+ /* update internals */
+ [self switchProfile:self];
+ [self storeProfilesOnDisk];
+ }
+}
+
+- (IBAction)videoSettingsChanged:(id)sender
+{
+ bool enableSettings = [_customize_vid_ckb state] == NSOnState && [_customize_vid_keep_ckb state] == NSOffState;
+ [_customize_vid_settings_box enableSubviews:enableSettings];
+ [_customize_vid_keep_ckb setEnabled:[_customize_vid_ckb state] == NSOnState];
+}
+
+- (IBAction)audioSettingsChanged:(id)sender
+{
+ bool enableSettings = [_customize_aud_ckb state] == NSOnState && [_customize_aud_keep_ckb state] == NSOffState;
+ [_customize_aud_settings_box enableSubviews:enableSettings];
+ [_customize_aud_keep_ckb setEnabled:[_customize_aud_ckb state] == NSOnState];
+}
+
+- (IBAction)subSettingsChanged:(id)sender
+{
+ bool enableSettings = [_customize_subs_ckb state] == NSOnState;
+ [_customize_subs_overlay_ckb setEnabled:enableSettings];
+ [_customize_subs_pop setEnabled:enableSettings];
+}
+