diff options
author | sr55 <[email protected]> | 2011-07-18 20:21:02 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-07-18 20:21:02 +0000 |
commit | af8c57cdd80095f433a25b59194a7d16c9c70d36 (patch) | |
tree | c83910ff5430659ce357a4232933ac39b7fae18b /win/CS/frmMain.cs | |
parent | 255cb10145ad2050fcf1e5cf3fa4853f1ea649c1 (diff) |
WinGui: Fix "Set Default" preset option.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4120 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/frmMain.cs')
-rw-r--r-- | win/CS/frmMain.cs | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/win/CS/frmMain.cs b/win/CS/frmMain.cs index 3654e41d1..031a632b5 100644 --- a/win/CS/frmMain.cs +++ b/win/CS/frmMain.cs @@ -175,20 +175,10 @@ namespace Handbrake // Load the user's default settings or Normal Preset
if (Settings.Default.defaultPreset != string.Empty && presetHandler.GetPreset(Properties.Settings.Default.defaultPreset) != null)
{
- string query = presetHandler.GetPreset(Settings.Default.defaultPreset).Query;
- if (query != null)
- {
- x264Panel.Reset2Defaults();
-
- EncodeTask presetQuery = QueryParserUtility.Parse(query);
- PresetLoader.LoadPreset(this, presetQuery, Settings.Default.defaultPreset);
-
- x264Panel.StandardizeOptString();
- x264Panel.SetCurrentSettingsInPanel();
- }
+ this.loadPreset(Settings.Default.defaultPreset);
}
else
- loadNormalPreset();
+ loadPreset("Normal");
// Register with Growl (if not using Growl for the encoding completion action, this wont hurt anything)
GrowlCommunicator.Register();
@@ -652,7 +642,7 @@ namespace Handbrake {
Settings.Default.defaultPreset = treeView_presets.SelectedNode.Text;
Settings.Default.Save();
- MessageBox.Show("New default preset set.", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ MessageBox.Show("New default preset set: " + treeView_presets.SelectedNode.Text, "Alert", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
MessageBox.Show("Please select a preset first.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
@@ -794,14 +784,17 @@ namespace Handbrake /// <summary>
/// Load the Normal Preset
/// </summary>
- private void loadNormalPreset()
+ /// <param name="presetName">
+ /// The preset name.
+ /// </param>
+ private void loadPreset(string presetName)
{
foreach (TreeNode treenode in treeView_presets.Nodes)
{
foreach (TreeNode node in treenode.Nodes)
{
- if (node.Text.Equals("Normal"))
- treeView_presets.SelectedNode = treeView_presets.Nodes[treenode.Index].Nodes[0];
+ if (node.Text.Equals(presetName))
+ treeView_presets.SelectedNode = node;
}
}
}
|