]> granicus.if.org Git - handbrake/commitdiff
MacGui: bind angle popup to the angle property of HBJob.
authorritsuka <damiog@gmail.com>
Thu, 19 Mar 2015 19:44:22 +0000 (19:44 +0000)
committerritsuka <damiog@gmail.com>
Thu, 19 Mar 2015 19:44:22 +0000 (19:44 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7007 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/English.lproj/MainWindow.xib
macosx/HBJob+UIAdditions.m

index 30844e02c8667a3baf80f9eed281564f95ed23a0..796caf70ae6608106b7aa24904a87d5bdad61fa6 100644 (file)
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7519.1" systemVersion="14D87h" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7525" systemVersion="14D105g" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
     <dependencies>
         <deployment version="1060" identifier="macosx"/>
         <development version="5100" identifier="xcode"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7519.1"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7525"/>
     </dependencies>
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="HBController">
                             </binding>
                         </connections>
                     </textField>
-                    <popUpButton verticalHuggingPriority="750" id="5181">
-                        <rect key="frame" x="436" y="506" width="44" height="22"/>
-                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
-                        <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="clipping" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="5184" id="5182">
-                            <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="smallSystem"/>
-                            <menu key="menu" title="OtherViews" id="5183">
-                                <items>
-                                    <menuItem state="on" id="5184"/>
-                                </items>
-                            </menu>
-                        </popUpButtonCell>
-                        <accessibility description="Angle"/>
-                        <connections>
-                            <binding destination="-2" name="enabled" keyPath="self.job" id="pA6-GK-w84">
-                                <dictionary key="options">
-                                    <string key="NSValueTransformerName">NSIsNotNil</string>
-                                </dictionary>
-                            </binding>
-                            <binding destination="-2" name="content" keyPath="self.job.angles" id="If4-Fp-R0g"/>
-                            <binding destination="5676" name="hidden" keyPath="values.UseDvdNav" previousBinding="pA6-GK-w84" id="Ocv-Hr-bje">
-                                <dictionary key="options">
-                                    <string key="NSValueTransformerName">NSNegateBoolean</string>
-                                </dictionary>
-                            </binding>
-                        </connections>
-                    </popUpButton>
                     <textField verticalHuggingPriority="750" id="1552">
                         <rect key="frame" x="5" y="454" width="47" height="17"/>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                             </binding>
                         </connections>
                     </popUpButton>
+                    <popUpButton verticalHuggingPriority="750" id="5181">
+                        <rect key="frame" x="439" y="506" width="44" height="22"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
+                        <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="clipping" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="5184" id="5182">
+                            <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
+                            <font key="font" metaFont="smallSystem"/>
+                            <menu key="menu" title="OtherViews" id="5183">
+                                <items>
+                                    <menuItem state="on" id="5184"/>
+                                </items>
+                            </menu>
+                        </popUpButtonCell>
+                        <accessibility description="Angle"/>
+                        <connections>
+                            <binding destination="-2" name="selectedValue" keyPath="self.job.angle" previousBinding="If4-Fp-R0g" id="sbX-LU-uOW">
+                                <dictionary key="options">
+                                    <string key="NSNullPlaceholder" base64-UTF8="YES">
+IA
+</string>
+                                </dictionary>
+                            </binding>
+                            <binding destination="-2" name="enabled" keyPath="self.job" id="pA6-GK-w84">
+                                <dictionary key="options">
+                                    <string key="NSValueTransformerName">NSIsNotNil</string>
+                                </dictionary>
+                            </binding>
+                            <binding destination="-2" name="content" keyPath="self.job.angles" id="If4-Fp-R0g"/>
+                            <binding destination="5676" name="hidden" keyPath="values.UseDvdNav" previousBinding="pA6-GK-w84" id="Ocv-Hr-bje">
+                                <dictionary key="options">
+                                    <string key="NSValueTransformerName">NSNegateBoolean</string>
+                                </dictionary>
+                            </binding>
+                        </connections>
+                    </popUpButton>
                 </subviews>
             </view>
             <toolbar key="toolbar" implicitIdentifier="E92CA47A-01F7-432A-A61C-28FE4D58C2CD" autosavesConfiguration="NO" displayMode="iconAndLabel" sizeMode="regular" id="7g3-gy-bUl">
index 500026a3ab174428db10c2bfb27e8636e0891ca1..a289ddb51fd3ab77ce4f489fb8db23ad641fb617 100644 (file)
@@ -38,9 +38,9 @@ static NSDictionary            *shortHeightAttr;
 - (NSArray *)angles
 {
     NSMutableArray *angles = [NSMutableArray array];
-    for (int i = 0; i < self.title.angles; i++)
+    for (int i = 1; i <= self.title.angles; i++)
     {
-        [angles addObject:[NSString stringWithFormat: @"%d", i + 1]];
+        [angles addObject:[NSString stringWithFormat: @"%d", i]];
     }
     return angles;
 }