summaryrefslogtreecommitdiffstats
path: root/macosx/HBSubtitlesController.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/HBSubtitlesController.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/HBSubtitlesController.m')
-rw-r--r--macosx/HBSubtitlesController.m18
1 files changed, 6 insertions, 12 deletions
diff --git a/macosx/HBSubtitlesController.m b/macosx/HBSubtitlesController.m
index 590093f5a..5f836289c 100644
--- a/macosx/HBSubtitlesController.m
+++ b/macosx/HBSubtitlesController.m
@@ -68,8 +68,6 @@ NSString *keySubTrackLanguageIndex = @"keySubTrackLanguageIndex";
@implementation HBSubtitlesController
-@synthesize enabled = _enabled;
-
- (instancetype)init
{
self = [super initWithNibName:@"Subtitles" bundle:nil];
@@ -93,15 +91,6 @@ NSString *keySubTrackLanguageIndex = @"keySubTrackLanguageIndex";
return self;
}
-- (void)setEnabled:(BOOL)enabled
-{
- [self.trackPopUp setEnabled:enabled];
- [self.configureDefaults setEnabled:enabled];
- [self.reloadDefaults setEnabled:enabled];
- [self.fTableView setEnabled:enabled];
- _enabled = enabled;
-}
-
- (void)setJob:(HBJob *)job
{
/* reset the subtitles arrays */
@@ -111,6 +100,7 @@ NSString *keySubTrackLanguageIndex = @"keySubTrackLanguageIndex";
if (job)
{
+ _job = job;
self.subtitleArray = job.subtitlesTracks;
self.settings = job.subtitlesDefaults;
self.subtitleSourceArray = [[job.title.subtitlesTracks mutableCopy] autorelease];
@@ -172,6 +162,10 @@ NSString *keySubTrackLanguageIndex = @"keySubTrackLanguageIndex";
// to display a "None" row in the table view
[self.subtitleArray addObject:[self createSubtitleTrack]];
}
+ else
+ {
+ _job = nil;
+ }
[self.fTableView reloadData];
}
@@ -195,7 +189,7 @@ NSString *keySubTrackLanguageIndex = @"keySubTrackLanguageIndex";
- (BOOL)validateUserInterfaceItem:(id < NSValidatedUserInterfaceItem >)anItem
{
- return self.enabled;
+ return (self.job != nil);
}
/**