summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorritsuka <[email protected]>2014-12-27 16:06:13 +0000
committerritsuka <[email protected]>2014-12-27 16:06:13 +0000
commit3acda4f9eb6a6c23f0a9c627aba354433656f70d (patch)
tree06d62a61d7946e4586b9690865c081db3a589475 /macosx
parent01c4bbf221e0815e9eb049b89f846b6a99a63f0a (diff)
MacGui: hide turbo two pass checkbox when x264 is not selected.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6663 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/English.lproj/Video.xib23
-rw-r--r--macosx/HBVideo+UIAdditions.h1
-rw-r--r--macosx/HBVideo+UIAdditions.m5
-rw-r--r--macosx/HBVideo.m3
4 files changed, 24 insertions, 8 deletions
diff --git a/macosx/English.lproj/Video.xib b/macosx/English.lproj/Video.xib
index 06c9a60b1..ccffbb566 100644
--- a/macosx/English.lproj/Video.xib
+++ b/macosx/English.lproj/Video.xib
@@ -163,6 +163,15 @@
<font key="font" metaFont="smallSystem"/>
</buttonCell>
<connections>
+ <binding destination="-2" name="hidden2" keyPath="self.video.turboTwoPassSupported" previousBinding="jpH-IH-e0p" id="BFH-ET-uPq">
+ <dictionary key="options">
+ <integer key="NSMultipleValuesPlaceholder" value="-1"/>
+ <integer key="NSNoSelectionPlaceholder" value="-1"/>
+ <integer key="NSNotApplicablePlaceholder" value="-1"/>
+ <integer key="NSNullPlaceholder" value="-1"/>
+ <string key="NSValueTransformerName">NSNegateBoolean</string>
+ </dictionary>
+ </binding>
<binding destination="-2" name="enabled2" keyPath="self.video" previousBinding="iZE-er-OQN" id="Fbv-qd-JTg">
<dictionary key="options">
<integer key="NSMultipleValuesPlaceholder" value="-1"/>
@@ -172,17 +181,17 @@
<string key="NSValueTransformerName">NSIsNotNil</string>
</dictionary>
</binding>
- <binding destination="-2" name="hidden" keyPath="self.video.twoPass" previousBinding="Fbv-qd-JTg" id="jpH-IH-e0p">
+ <binding destination="-2" name="enabled" keyPath="self.video.qualityType" id="iZE-er-OQN">
<dictionary key="options">
<string key="NSValueTransformerName">NSNegateBoolean</string>
</dictionary>
</binding>
- <binding destination="-2" name="enabled" keyPath="self.video.qualityType" id="iZE-er-OQN">
+ <binding destination="-2" name="value" keyPath="self.video.turboTwoPass" id="4A4-hg-qhy"/>
+ <binding destination="-2" name="hidden" keyPath="self.video.twoPass" previousBinding="Fbv-qd-JTg" id="jpH-IH-e0p">
<dictionary key="options">
<string key="NSValueTransformerName">NSNegateBoolean</string>
</dictionary>
</binding>
- <binding destination="-2" name="value" keyPath="self.video.turboTwoPass" id="4A4-hg-qhy"/>
</connections>
</button>
<popUpButton verticalHuggingPriority="750" id="xwK-Yu-a1e">
@@ -362,13 +371,13 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
+ <binding destination="-2" name="value" keyPath="pictureSettings" id="hem-VY-3fR"/>
+ <binding destination="-2" name="textColor" keyPath="self.labelColor" id="aVY-g8-jGq"/>
<binding destination="-2" name="enabled" keyPath="self.video" id="Ph9-Gy-Sru">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNotNil</string>
</dictionary>
</binding>
- <binding destination="-2" name="value" keyPath="pictureSettings" id="hem-VY-3fR"/>
- <binding destination="-2" name="textColor" keyPath="self.labelColor" id="aVY-g8-jGq"/>
</connections>
</textField>
<textField verticalHuggingPriority="750" id="PW6-gP-Dyj">
@@ -380,13 +389,13 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
+ <binding destination="-2" name="value" keyPath="pictureFilters" id="Sr7-JI-M4y"/>
+ <binding destination="-2" name="textColor" keyPath="self.labelColor" id="FtS-pM-hKz"/>
<binding destination="-2" name="enabled" keyPath="self.video" id="ckY-jh-UvA">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNotNil</string>
</dictionary>
</binding>
- <binding destination="-2" name="value" keyPath="pictureFilters" id="Sr7-JI-M4y"/>
- <binding destination="-2" name="textColor" keyPath="self.labelColor" id="FtS-pM-hKz"/>
</connections>
</textField>
</subviews>
diff --git a/macosx/HBVideo+UIAdditions.h b/macosx/HBVideo+UIAdditions.h
index 0acb7b3e8..e836700b4 100644
--- a/macosx/HBVideo+UIAdditions.h
+++ b/macosx/HBVideo+UIAdditions.h
@@ -21,6 +21,7 @@
@property (nonatomic, readonly) NSArray *levels;
@property (nonatomic, readonly) BOOL fastDecodeSupported;
+@property (nonatomic, readonly) BOOL turboTwoPassSupported;
@property (nonatomic, readonly) NSString *unparseOptions;
diff --git a/macosx/HBVideo+UIAdditions.m b/macosx/HBVideo+UIAdditions.m
index fc3b5813f..7cf577a2d 100644
--- a/macosx/HBVideo+UIAdditions.m
+++ b/macosx/HBVideo+UIAdditions.m
@@ -72,6 +72,11 @@
return (self.encoder == HB_VCODEC_X264);
}
+- (BOOL)turboTwoPassSupported
+{
+ return (self.encoder == HB_VCODEC_X264);
+}
+
/**
* This is called everytime a x264 widget in the video tab is changed to
* display the expanded options in a text field via outlet fDisplayX264PresetsUnparseTextField
diff --git a/macosx/HBVideo.m b/macosx/HBVideo.m
index 4810fc397..7f3fa7435 100644
--- a/macosx/HBVideo.m
+++ b/macosx/HBVideo.m
@@ -167,7 +167,8 @@
retval = [NSSet setWithObjects:@"job.container", nil];
}
- if ([key isEqualToString:@"fastDecodeSupported"])
+ if ([key isEqualToString:@"fastDecodeSupported"] ||
+ [key isEqualToString:@"turboTwoPassSupported"])
{
retval = [NSSet setWithObjects:@"encoder", nil];
}