summaryrefslogtreecommitdiffstats
path: root/macosx/HBVideoController.m
diff options
context:
space:
mode:
authorritsuka <[email protected]>2014-12-27 12:29:00 +0000
committerritsuka <[email protected]>2014-12-27 12:29:00 +0000
commit7f6ec5084e21a88d662fa453be6186724658bc9b (patch)
tree58f56dd5274c218b7d22b7f9a6152aef6ece94df /macosx/HBVideoController.m
parent25d0cf9b7f554c3899ce0173f5a29a6092ad7cd7 (diff)
MacGui: remove redundant "enabled" property in a few view controller. Cosmetics in HBController.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6660 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBVideoController.m')
-rw-r--r--macosx/HBVideoController.m14
1 files changed, 7 insertions, 7 deletions
diff --git a/macosx/HBVideoController.m b/macosx/HBVideoController.m
index fa0bb192e..95a956bda 100644
--- a/macosx/HBVideoController.m
+++ b/macosx/HBVideoController.m
@@ -45,8 +45,6 @@ static void *HBVideoControllerContext = &HBVideoControllerContext;
@implementation HBVideoController
-@synthesize enabled = _enabled;
-
- (instancetype)initWithAdvancedController:(HBAdvancedController *)advancedController
{
self = [self init];
@@ -62,6 +60,8 @@ static void *HBVideoControllerContext = &HBVideoControllerContext;
self = [super initWithNibName:@"Video" bundle:nil];
if (self)
{
+ _labelColor = [[NSColor disabledControlTextColor] retain];
+
// Observe the advanced tab pref shown/hided state.
[[NSUserDefaultsController sharedUserDefaultsController] addObserver:self
forKeyPath:@"values.HBShowAdvancedTab"
@@ -84,11 +84,11 @@ static void *HBVideoControllerContext = &HBVideoControllerContext;
return self;
}
-- (void)setEnabled:(BOOL)flag
+- (void)setVideo:(HBVideo *)video
{
- _enabled = flag;
+ _video = video;
- if (_enabled)
+ if (_video)
{
self.labelColor = [NSColor controlTextColor];
}
@@ -97,7 +97,7 @@ static void *HBVideoControllerContext = &HBVideoControllerContext;
self.labelColor = [NSColor disabledControlTextColor];
}
- [self enableEncoderOptionsWidgets:flag];
+ [self enableEncoderOptionsWidgets:(video != nil)];
}
#pragma mark - KVO
@@ -151,7 +151,7 @@ static void *HBVideoControllerContext = &HBVideoControllerContext;
}
}
// enable/disable, populate and update the various widgets
- [self enableEncoderOptionsWidgets:self.enabled];
+ [self enableEncoderOptionsWidgets:(self.video != nil)];
} else if ([keyPath isEqualToString:@"values.HBShowAdvancedTab"])
{