diff options
author | sr55 <[email protected]> | 2011-08-27 21:39:15 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-08-27 21:39:15 +0000 |
commit | 3e32e57c216db0b6acf6166b9f23f2ede3aece30 (patch) | |
tree | b130fe618627832fe6d01f68198f15079d9b840c /win/CS/frmMain.cs | |
parent | f73206bf585737a16706b7445a7add49959bc6a3 (diff) |
WinGui: Some refactoring of the preset services to make them simpler and restoring old functionality that allowed storing of crop settings to match the macgui.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4194 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/frmMain.cs')
-rw-r--r-- | win/CS/frmMain.cs | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/win/CS/frmMain.cs b/win/CS/frmMain.cs index ba4826209..efe741522 100644 --- a/win/CS/frmMain.cs +++ b/win/CS/frmMain.cs @@ -766,11 +766,8 @@ namespace Handbrake // Ok, Reset all the H264 widgets before changing the preset
x264Panel.Reset2Defaults();
- // Send the query from the file to the Query Parser class
- EncodeTask presetQuery = QueryParserUtility.Parse(query);
-
// Now load the preset
- PresetLoader.LoadPreset(this, presetQuery, presetName);
+ PresetLoader.LoadPreset(this, preset);
// The x264 widgets will need updated, so do this now:
x264Panel.StandardizeOptString();
@@ -838,9 +835,6 @@ namespace Handbrake MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (result == DialogResult.Yes)
{
-
- PresetLoader.LoadPreset(this, parsed, parsed.PresetName);
-
Preset preset = new Preset
{
Name = parsed.PresetName,
@@ -848,19 +842,22 @@ namespace Handbrake CropSettings = parsed.UsesPictureSettings
};
+ PresetLoader.LoadPreset(this, preset);
+
presetHandler.Update(preset);
}
}
else
{
- PresetLoader.LoadPreset(this, parsed, parsed.PresetName);
+
Preset preset = new Preset
{
Name = parsed.PresetName,
Query = QueryGenerator.GenerateFullQuery(this),
CropSettings = parsed.UsesPictureSettings,
};
-
+ PresetLoader.LoadPreset(this, preset);
+
if (presetHandler.Add(preset))
{
TreeNode preset_treeview = new TreeNode(parsed.PresetName)
@@ -2144,11 +2141,15 @@ namespace Handbrake // Setup UI
if (queueEdit.Query != null)
{
- // Send the query from the file to the Query Parser class
- EncodeTask presetQuery = QueryParserUtility.Parse(queueEdit.Query);
+ Preset preset = new Preset
+ {
+ Name = "Loaded Back From Queue",
+ Query = queueEdit.Query,
+ CropSettings = true,
+ };
// Now load the preset
- PresetLoader.LoadPreset(this, presetQuery, "Load Back From Queue");
+ PresetLoader.LoadPreset(this, preset);
// Set the destination path
this.text_destination.Text = queueEdit.Destination;
|