diff options
author | sr55 <sr55.hb@outlook.com> | 2008-11-06 21:26:55 +0000 |
---|---|---|
committer | sr55 <sr55.hb@outlook.com> | 2008-11-06 21:26:55 +0000 |
commit | c0a30f0be5aa54e8b19e04fb560e907319339a2f (patch) | |
tree | 27f237f1fb768184a0ff2d3ce68d258737bde61b /win/C#/frmMain | |
parent | 4187cbcfdad5d71657431f9b5d662942c5d9c8f5 (diff) |
WinGui:
- Set's DRC to 1 by default.
- Chapter Markers tab only enabled if it's a DVD source or ISO image.
- -X and -Y options now parsed by the query parser.
- Added a small hack to allow built-in presets to use -X and -Y and have the query generator correctly generate the query.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1898 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain')
-rw-r--r-- | win/C#/frmMain/PresetLoader.cs | 15 | ||||
-rw-r--r-- | win/C#/frmMain/QueryGenerator.cs | 27 |
2 files changed, 38 insertions, 4 deletions
diff --git a/win/C#/frmMain/PresetLoader.cs b/win/C#/frmMain/PresetLoader.cs index c42f8202e..e56ee4cbf 100644 --- a/win/C#/frmMain/PresetLoader.cs +++ b/win/C#/frmMain/PresetLoader.cs @@ -129,6 +129,21 @@ namespace Handbrake mainWindow.text_height.Text = "";
}
+ // Set the public max width and max height varibles in frmMain
+ // These are used by the query generator to determine if it should use -X or -w / -Y or -h
+ if (presetQuery.MaxWidth != 0)
+ {
+ mainWindow.text_width.Text = presetQuery.MaxWidth.ToString();
+ mainWindow.maxWidth = presetQuery.MaxWidth;
+ }
+
+ if (presetQuery.MaxHeight != 0)
+ {
+ mainWindow.text_height.Text = presetQuery.MaxHeight.ToString();
+ mainWindow.maxHeight = presetQuery.MaxHeight;
+ }
+
+
#endregion
// Video Settings Tab
diff --git a/win/C#/frmMain/QueryGenerator.cs b/win/C#/frmMain/QueryGenerator.cs index b66e3f041..a2cb50ed0 100644 --- a/win/C#/frmMain/QueryGenerator.cs +++ b/win/C#/frmMain/QueryGenerator.cs @@ -101,11 +101,30 @@ namespace Handbrake // Picture Settings Tab
#region Picture Settings Tab
- if (mainWindow.text_width.Text != "")
- query += " -w " + mainWindow.text_width.Text;
+ // Use MaxWidth for built-in presets and width for user settings.
+ if (mainWindow.maxWidth == 0)
+ {
+
+ if (mainWindow.text_width.Text != "")
+ query += " -w " + mainWindow.text_width.Text;
+ }
+ else
+ {
+ if (mainWindow.text_width.Text != "")
+ query += " -X " + mainWindow.text_width.Text;
+ }
- if (mainWindow.text_height.Text != "")
- query += " -l " + mainWindow.text_height.Text;
+ // Use MaxHeight for built-in presets and height for user settings.
+ if (mainWindow.maxHeight == 0)
+ {
+ if (mainWindow.text_height.Text != "")
+ query += " -l " + mainWindow.text_height.Text;
+ }
+ else
+ {
+ if (mainWindow.text_height.Text != "")
+ query += " -Y " + mainWindow.text_height.Text;
+ }
string cropTop = mainWindow.text_top.Text;
string cropBottom = mainWindow.text_bottom.Text;
|