OSDN Git Service

MacGui: adds mixed-refs pop-up for the advanced x264 options.
authorjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 10 May 2007 18:19:26 +0000 (18:19 +0000)
committerjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 10 May 2007 18:19:26 +0000 (18:19 +0000)
In the future I'll commit more than one widget at a time, but I wanted a little template changeset I can reference for further additions.

git-svn-id: svn://localhost/HandBrake/trunk@578 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/Controller.h
macosx/Controller.mm
macosx/English.lproj/MainMenu.nib/classes.nib
macosx/English.lproj/MainMenu.nib/info.nib
macosx/English.lproj/MainMenu.nib/keyedobjects.nib

index d8f208a..44a1d36 100644 (file)
        IBOutlet NSPopUpButton       * fX264optSubmePopUp;
        IBOutlet NSTextField         * fX264optTrellisLabel;
        IBOutlet NSPopUpButton       * fX264optTrellisPopUp;
+    IBOutlet NSTextField          * fX264optMixedRefsLabel;
+    IBOutlet NSPopUpButton       * fX264optMixedRefsPopUp;
 
        /* User Preset variables here fPresetNewPicSettingsApply*/
        
index 1238d46..6db8e25 100644 (file)
@@ -648,7 +648,7 @@ return registrationDictionary;
                fCreateChapterMarkers,fX264optViewTitleLabel,fDisplayX264Options,fDisplayX264OptionsLabel,fX264optBframesLabel,
                fX264optBframesPopUp,fX264optRefLabel,fX264optRefPopUp,fX264optNfpskipLabel,fX264optNfpskipPopUp,
                fX264optNodctdcmtLabel,fX264optNodctdcmtPopUp,fX264optSubmeLabel,fX264optSubmePopUp,
-               fX264optTrellisLabel,fX264optTrellisPopUp};
+               fX264optTrellisLabel,fX264optTrellisPopUp,fX264optMixedRefsLabel,fX264optMixedRefsPopUp};
 
     for( unsigned i = 0;
          i < sizeof( controls ) / sizeof( NSControl * ); i++ )
@@ -1948,6 +1948,22 @@ the user is using "Custom" settings by determining the sender*/
        {
        [fX264optTrellisPopUp addItemWithTitle:[NSString stringWithFormat:@"%d",i]];
     }  
+    
+    /*Mixed-references fX264optMixedRefsPopUp BOOLEAN*/
+    [fX264optMixedRefsPopUp removeAllItems];
+       [fX264optMixedRefsPopUp addItemWithTitle:@"Default (No)"];
+       for (i=0; i<2;i++)
+       {
+               if (i==0)
+               {
+                       [fX264optMixedRefsPopUp addItemWithTitle:[NSString stringWithFormat:@"No"]];
+               }
+               else
+               {
+                       [fX264optMixedRefsPopUp addItemWithTitle:[NSString stringWithFormat:@"Yes"]];
+               }
+       }
+    
        /* Standardize the option string */
        [self X264AdvancedOptionsStandardizeOptString: NULL];
        /* Set Current GUI Settings based on newly standardized string */
@@ -2104,6 +2120,12 @@ the user is using "Custom" settings by determining the sender*/
                                        {
                                                [fX264optTrellisPopUp selectItemAtIndex:[optValue intValue]+1];
                                        }
+                    /*Mixed Refs NSPopUpButton*/
+                    if ([optName isEqualToString:@"mixed-refs"])
+                    {
+                        [fX264optMixedRefsPopUp selectItemAtIndex:[optValue intValue]+1];
+                    }
+                    
                     
                                }
                        }
@@ -2139,6 +2161,11 @@ the user is using "Custom" settings by determining the sender*/
        {
                optNameToChange = @"trellis";
        }
+    if (sender == fX264optMixedRefsPopUp)
+    {
+        optNameToChange = @"mixed-refs";
+    }
+    
        /* Set widgets depending on the opt string in field */
        NSString * thisOpt; // The separated option such as "bframes=3"
        NSString * optName = @""; // The option name such as "bframes"
index 18a9877..91c476f 100644 (file)
@@ -40,7 +40,7 @@
             CLASS = HBController; 
             LANGUAGE = ObjC; 
             OUTLETS = {
-                fAddPresetPanel = NSPanel
+                fAddPresetPanel = NSPopUpButton
                 fAddToQuButton = NSButton; 
                 fAudBitrateField = NSTextField; 
                 fAudBitratePopUp = NSPopUpButton; 
                 fWindow = NSWindow; 
                 fX264optBframesLabel = NSTextField; 
                 fX264optBframesPopUp = NSPopUpButton; 
+                fX264optMixedRefsLabel = NSTextField; 
+                fX264optMixedRefsPopUp = NSPopUpButton; 
                 fX264optNfpskipLabel = NSTextField; 
                 fX264optNfpskipPopUp = NSPopUpButton; 
                 fX264optNodctdcmtLabel = NSTextField; 
index 16c7cb4..26a3334 100644 (file)
@@ -23,7 +23,7 @@
                <integer>1867</integer>
        </array>
        <key>IBSystem Version</key>
-       <string>8P2137</string>
+       <string>8L127</string>
        <key>IBUserGuides</key>
        <dict>
                <key>21</key>
index bc32495..de5ea31 100644 (file)
Binary files a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib and b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib differ