]> granicus.if.org Git - handbrake/commitdiff
MacGui: fix a bug where the iPod 5G checkbox would be disabled for x264 in MP4.
authorRodeo <tdskywalker@gmail.com>
Sun, 12 May 2013 20:38:45 +0000 (20:38 +0000)
committerRodeo <tdskywalker@gmail.com>
Sun, 12 May 2013 20:38:45 +0000 (20:38 +0000)
This would happen when switching from MKV with a Theora encoder to MP4: the encoder would be reset to x264, but we failed to detect the change of encoder and therefore didn't call videoEncoderPopUpChanged.

Also, don't needlessly call twoPassCheckboxChanged after videoEncoderPopUpChanged since the latter calls the former.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5452 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/Controller.m

index c95ee6aa1e9fe42a61439ee4f9360521120991a5..a71eb67cc5ae58bbf286e6458cf7baad215436cb 100644 (file)
@@ -4946,14 +4946,17 @@ bool one_burned = FALSE;
         }
     }
     
-    /* if we have a previously selected vid encoder tag, then try to select it */
+    /*
+     * item 0 will be selected by default
+     * deselect it so that we can detect whether the video encoder has changed
+     */
+    [fVidEncoderPopUp selectItem:nil];
     if (selectedVidEncoderTag)
     {
-        [fVidEncoderPopUp selectItemWithTag: selectedVidEncoderTag];
-    }
-    else
-    {
-        [fVidEncoderPopUp selectItemAtIndex: 0];
+        // if we have a tag for previously selected encoder, try to select it
+        // if this fails, [fVidEncoderPopUp selectedItem] will be nil
+        // we'll handle that scenario further down
+        [fVidEncoderPopUp selectItemWithTag:selectedVidEncoderTag];
     }
     
     /* Update the Auto Passtgru Fallback Codec Popup */
@@ -5023,22 +5026,16 @@ bool one_burned = FALSE;
     else
         [fDstFile2Field setStringValue: [NSString stringWithFormat:@"%@.%s", [string stringByDeletingPathExtension], ext]];
 
-    if( SuccessfulScan )
+    if (SuccessfulScan)
     {
-        /* Add/replace to the correct extension */
-
-        if( [fVidEncoderPopUp selectedItem] == nil )
+        if ([fVidEncoderPopUp selectedItem] == nil)
         {
-
+            /* this means the above call to selectItemWithTag failed */
             [fVidEncoderPopUp selectItemAtIndex:0];
             [self videoEncoderPopUpChanged:nil];
-
-            /* We call the method to properly enable/disable turbo 2 pass */
-            [self twoPassCheckboxChanged: sender];
-            /* We call method method to change UI to reflect whether a preset is used or not*/
         }
     }
-       [self customSettingUsed: sender];
+       [self customSettingUsed:sender];
 }
 
 - (IBAction) autoSetM4vExtension: (id) sender