Commit 9d676f05 authored by David Fuhrmann's avatar David Fuhrmann

macosx: disable equalizer controls if eq is disabled

refs #9350
parent aa7f483a
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
BOOL b_genericAudioProfileInInteraction; BOOL b_genericAudioProfileInInteraction;
/* Equalizer */ /* Equalizer */
IBOutlet id o_eq_view;
IBOutlet id o_eq_enable_ckb; IBOutlet id o_eq_enable_ckb;
IBOutlet id o_eq_twopass_ckb; IBOutlet id o_eq_twopass_ckb;
IBOutlet id o_eq_preamp_lbl; IBOutlet id o_eq_preamp_lbl;
......
...@@ -362,10 +362,10 @@ static VLCAudioEffects *_o_sharedInstance = nil; ...@@ -362,10 +362,10 @@ static VLCAudioEffects *_o_sharedInstance = nil;
} }
/* update UI */ /* update UI */
if ([tempString rangeOfString:@"equalizer"].location == NSNotFound) BOOL b_eq_enabled = [tempString rangeOfString:@"equalizer"].location != NSNotFound;
[o_eq_enable_ckb setState:NSOffState]; [o_eq_view enableSubviews:b_eq_enabled];
else [o_eq_enable_ckb setState:(b_eq_enabled ? NSOnState : NSOffState)];
[o_eq_enable_ckb setState:NSOnState];
[o_eq_twopass_ckb setState:[[items objectAtIndex:15] intValue]]; [o_eq_twopass_ckb setState:[[items objectAtIndex:15] intValue]];
[self resetCompressor]; [self resetCompressor];
[self resetSpatializer]; [self resetSpatializer];
...@@ -508,6 +508,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf, ...@@ -508,6 +508,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
[self updatePresetSelector]; [self updatePresetSelector];
/* Set the the checkboxes */ /* Set the the checkboxes */
[o_eq_view enableSubviews: b_enabled];
[o_eq_enable_ckb setState: b_enabled]; [o_eq_enable_ckb setState: b_enabled];
[o_eq_twopass_ckb setState: b_2p]; [o_eq_twopass_ckb setState: b_2p];
} }
...@@ -563,6 +564,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf, ...@@ -563,6 +564,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
- (IBAction)eq_enable:(id)sender - (IBAction)eq_enable:(id)sender
{ {
[o_eq_view enableSubviews:[sender state]];
[self setAudioFilter: "equalizer" on:[sender state]]; [self setAudioFilter: "equalizer" on:[sender state]];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment