OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 17 Jan 2010 16:12:04 +0000 (16:12 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 17 Jan 2010 16:12:04 +0000 (16:12 +0000)
- Fix: Correctly set KeepAR for presets with w&h and w only.

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

win/C#/Controls/PictureSettings.cs
win/C#/Functions/PresetLoader.cs
win/C#/frmOptions.cs

index 2c0d544..cf8f022 100644 (file)
@@ -325,7 +325,7 @@ namespace Handbrake.Controls
                     labelStaticDisplaySize.Visible = false;\r
                     labelDisplaySize.Visible = false;\r
 \r
-                    check_KeepAR.Checked = true;\r
+                    // check_KeepAR.Checked = true;\r
                     drp_modulus.SelectedIndex = 0;\r
 \r
                     if (check_KeepAR.Checked)\r
index 5f04590..65fe8b1 100644 (file)
@@ -95,7 +95,7 @@ namespace Handbrake.Functions
             // Set the anamorphic mode 0,1,2,3\r
             mainWindow.PictureSettings.drp_anamorphic.SelectedIndex = presetQuery.AnamorphicMode;\r
 \r
-            // Aspect Ratio\r
+            // Keep Aspect Ration Anamorphic Setting.\r
             mainWindow.PictureSettings.check_KeepAR.CheckState = presetQuery.keepDisplayAsect ? CheckState.Checked : CheckState.Unchecked;\r
 \r
             // Set the Width and height as Required.\r
@@ -122,6 +122,10 @@ namespace Handbrake.Functions
                 if (mainWindow.selectedTitle != null && mainWindow.selectedTitle.Resolution.Width != 0)\r
                     mainWindow.PictureSettings.text_width.Value = mainWindow.selectedTitle.Resolution.Width;\r
 \r
+            // Aspect Ratio for non anamorphic sources\r
+            if (presetQuery.AnamorphicMode == 0)\r
+                mainWindow.PictureSettings.check_KeepAR.CheckState = presetQuery.Height == 0 ? CheckState.Checked : CheckState.Unchecked;\r
+\r
             // Custom Anamorphic Controls\r
             mainWindow.PictureSettings.updownDisplayWidth.Text = presetQuery.displayWidthValue.ToString();\r
             mainWindow.PictureSettings.updownParHeight.Text = presetQuery.pixelAspectWidth.ToString();\r
@@ -165,9 +169,9 @@ namespace Handbrake.Functions
                     double x264step = cqStep;\r
                     double presetValue = presetQuery.VideoQuality;\r
 \r
-                    double x = 51/x264step;\r
+                    double x = 51 / x264step;\r
 \r
-                    double calculated = presetValue/x264step;\r
+                    double calculated = presetValue / x264step;\r
                     calculated = x - calculated;\r
 \r
                     int.TryParse(calculated.ToString(), out value);\r
@@ -224,10 +228,7 @@ namespace Handbrake.Functions
                     newTrack.SubItems.Add(track.Encoder);\r
                     newTrack.SubItems.Add(track.MixDown);\r
                     newTrack.SubItems.Add(track.SampleRate);\r
-                    if (track.Encoder.Contains("AC3"))\r
-                        newTrack.SubItems.Add("Auto");\r
-                    else\r
-                        newTrack.SubItems.Add(track.Bitrate);\r
+                    newTrack.SubItems.Add(track.Encoder.Contains("AC3") ? "Auto" : track.Bitrate);\r
                     newTrack.SubItems.Add(track.DRC);\r
                     mainWindow.AudioSettings.AddTrackForPreset(newTrack);\r
                 }\r
index 9fd7c22..5427aeb 100644 (file)
@@ -144,6 +144,7 @@ namespace Handbrake
             // Enable / Disable Query editor tab\r
             if (Properties.Settings.Default.QueryEditorTab)\r
                 check_queryEditorTab.CheckState = CheckState.Checked;\r
+            check_promptOnUnmatchingQueries.Enabled = check_queryEditorTab.Checked;\r
 \r
             // Prompt on inconsistant queries\r
             check_promptOnUnmatchingQueries.Checked = Properties.Settings.Default.PromptOnUnmatchingQueries;\r
@@ -156,7 +157,8 @@ namespace Handbrake
             if (Properties.Settings.Default.enocdeStatusInGui)\r
                 check_inGuiStatus.CheckState = CheckState.Checked;\r
 \r
-             check_showCliForInGUIEncode.Checked = Properties.Settings.Default.showCliForInGuiEncodeStatus;\r
+            check_showCliForInGUIEncode.Checked = Properties.Settings.Default.showCliForInGuiEncodeStatus;\r
+            check_showCliForInGUIEncode.Enabled = check_inGuiStatus.Checked;\r
 \r
             // Set the preview count\r
             drop_previewScanCount.SelectedItem = Properties.Settings.Default.previewScanCount.ToString();\r
@@ -399,12 +401,14 @@ namespace Handbrake
         {\r
             Properties.Settings.Default.enocdeStatusInGui = check_inGuiStatus.Checked;\r
 \r
+            check_showCliForInGUIEncode.Enabled = check_inGuiStatus.Checked;\r
+\r
             if (this.IsHandleCreated)\r
                 if (check_inGuiStatus.Checked)\r
                 {\r
                     MessageBox.Show("This feature is experimental!\n\n You will not be able to \91Stop\92 an encode mid-process.\n"\r
                                     + "Doing so will render the file unplayable.\n" +\r
-                                    "If you enable 'Show CLI Window', you'll be ablt to hit ctrl-c in the encode window to cleanly exit the CLI. This will give you a playable file.\n\n" +                                    \r
+                                    "If you enable 'Show CLI Window', you'll be ablt to hit ctrl-c in the encode window to cleanly exit the CLI. This will give you a playable file.\n\n" +\r
                                     "You are also limited to 1 instance of HandBrakeCLI on your system.",\r
                                     "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
                 }\r