]> granicus.if.org Git - handbrake/commitdiff
MacGui: hide turbo two pass checkbox when x264 is not selected.
authorritsuka <damiog@gmail.com>
Sat, 27 Dec 2014 16:06:13 +0000 (16:06 +0000)
committerritsuka <damiog@gmail.com>
Sat, 27 Dec 2014 16:06:13 +0000 (16:06 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6663 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/English.lproj/Video.xib
macosx/HBVideo+UIAdditions.h
macosx/HBVideo+UIAdditions.m
macosx/HBVideo.m

index 06c9a60b10b5692e1c2b09e4c406f01a7ae9fc42..ccffbb566c206cda86c7a01f676a055bb9bdcc44 100644 (file)
                         <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"/>
                                 <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">
                         <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">
                         <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>
index 0acb7b3e8a457b56283ee7f2831351395f7f4002..e836700b42cbd277cbaa5c716582f4c0dcd751cc 100644 (file)
@@ -21,6 +21,7 @@
 @property (nonatomic, readonly) NSArray *levels;
 
 @property (nonatomic, readonly) BOOL fastDecodeSupported;
+@property (nonatomic, readonly) BOOL turboTwoPassSupported;
 
 @property (nonatomic, readonly) NSString *unparseOptions;
 
index fc3b5813f7cc12a896ab795b34349d8d8ed33507..7cf577a2d7e6ce6772b16788c2d079e33baf7adb 100644 (file)
     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
index 4810fc397a1c250b3c64427f5300e4e3a98a5454..7f3fa7435d0458cdb2b2d59c01ff6709a1f9cf6c 100644 (file)
         retval = [NSSet setWithObjects:@"job.container", nil];
     }
 
-    if ([key isEqualToString:@"fastDecodeSupported"])
+    if ([key isEqualToString:@"fastDecodeSupported"] ||
+        [key isEqualToString:@"turboTwoPassSupported"])
     {
         retval = [NSSet setWithObjects:@"encoder", nil];
     }