diff options
author | sr55 <[email protected]> | 2010-07-03 16:38:58 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2010-07-03 16:38:58 +0000 |
commit | 4813f1cf12793faed41951e0e4a195332f97ddcd (patch) | |
tree | 74af059ceecb2986cc2cc815f15e07cc3cea2181 /win/C#/frmMain.cs | |
parent | 2c796d86cf24e15f10f20680f4c8f89628f25418 (diff) |
WinGui:
- Refactored The Query Generator to allow for more control on the AddPreset Window.
- Also fix an issue where an empty x264 query would still result in -x being added to the query.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3423 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r-- | win/C#/frmMain.cs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 7074f1155..b0fb65ce2 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -538,7 +538,7 @@ namespace Handbrake /// </param>
private void btn_new_preset_Click(object sender, EventArgs e)
{
- Form preset = new frmAddPreset(this, QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null),
+ Form preset = new frmAddPreset(this, QueryGenerator.GenerateQueryForPreset(this, QueryPictureSettingsMode.SourceMaximum, true, 0, 0),
presetHandler);
preset.ShowDialog();
}
@@ -650,6 +650,7 @@ namespace Handbrake /// </param>
private void pmnu_saveChanges_Click(object sender, EventArgs e)
{
+ // TODO this requires a re-think since the Query Editor has changed.
DialogResult result =
MessageBox.Show(
"Do you wish to include picture settings when updating the preset: " +
@@ -657,10 +658,10 @@ namespace Handbrake MessageBoxIcon.Question);
if (result == DialogResult.Yes)
presetHandler.Update(treeView_presets.SelectedNode.Text,
- QueryGenerator.GenerateTabbedComponentsQuery(this), true);
+ QueryGenerator.GenerateQueryForPreset(this, QueryPictureSettingsMode.SourceMaximum, true, 0, 0), true);
else if (result == DialogResult.No)
presetHandler.Update(treeView_presets.SelectedNode.Text,
- QueryGenerator.GenerateTabbedComponentsQuery(this), false);
+ QueryGenerator.GenerateQueryForPreset(this, QueryPictureSettingsMode.SourceMaximum, true, 0, 0), false);
}
/// <summary>
@@ -717,7 +718,8 @@ namespace Handbrake /// </param>
private void btn_addPreset_Click(object sender, EventArgs e)
{
- Form preset = new frmAddPreset(this, QueryGenerator.GenerateTabbedComponentsQuery(this), presetHandler);
+ // TODO this requires a re-think due to the Query Editor Changing.
+ Form preset = new frmAddPreset(this, QueryGenerator.GenerateQueryForPreset(this, QueryPictureSettingsMode.SourceMaximum, true, 0, 0), presetHandler);
preset.ShowDialog();
}
@@ -922,7 +924,7 @@ namespace Handbrake {
PresetLoader.LoadPreset(this, parsed, parsed.PresetName, parsed.UsesPictureSettings);
presetHandler.Update(parsed.PresetName + " (Imported)",
- QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null),
+ QueryGenerator.GenerateFullQuery(this),
parsed.UsesPictureSettings);
}
}
@@ -930,7 +932,7 @@ namespace Handbrake {
PresetLoader.LoadPreset(this, parsed, parsed.PresetName, parsed.UsesPictureSettings);
if (presetHandler.Add(parsed.PresetName + " (Imported)",
- QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null),
+ QueryGenerator.GenerateFullQuery(this),
parsed.UsesPictureSettings))
{
TreeNode preset_treeview = new TreeNode(parsed.PresetName + " (Imported)")
@@ -1051,10 +1053,10 @@ namespace Handbrake if (encodeQueue.Count != 0 || (!string.IsNullOrEmpty(jobSourcePath) && !string.IsNullOrEmpty(jobDestination)))
{
- string generatedQuery = QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null);
+ string generatedQuery = QueryGenerator.GenerateFullQuery(this);
string specifiedQuery = rtf_query.Text != string.Empty
? rtf_query.Text
- : QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null);
+ : QueryGenerator.GenerateFullQuery(this);
string query = string.Empty;
// Check to make sure the generated query matches the GUI settings
@@ -1135,7 +1137,7 @@ namespace Handbrake private void btn_add2Queue_Click(object sender, EventArgs e)
{
// Get the CLI query or use the query editor if it's not empty.
- string query = QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null);
+ string query = QueryGenerator.GenerateFullQuery(this);
if (!string.IsNullOrEmpty(rtf_query.Text))
query = rtf_query.Text;
@@ -1955,7 +1957,7 @@ namespace Handbrake // Query Editor Tab
private void btn_generate_Query_Click(object sender, EventArgs e)
{
- rtf_query.Text = QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null);
+ rtf_query.Text = QueryGenerator.GenerateFullQuery(this);
}
private void btn_clear_Click(object sender, EventArgs e)
|