diff options
author | sr55 <[email protected]> | 2009-08-21 11:42:51 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-08-21 11:42:51 +0000 |
commit | e0266d30c46507dc9807601b87a67840f791dc2d (patch) | |
tree | cfee57881f637215f10261c43a54e5749220242e /win/C#/frmMain.cs | |
parent | 15697dbce4fe6b06a406deb2160ec8f328f7787f (diff) |
WinGui:
- Fix for PictureSettings Panel
- Small UI improvements for Audio and Subs panels
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2771 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r-- | win/C#/frmMain.cs | 62 |
1 files changed, 35 insertions, 27 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index c0008185d..224c077c5 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -371,33 +371,7 @@ namespace Handbrake }
private void mnu_importMacPreset_Click(object sender, EventArgs e)
{
- Import imp = new Import();
- if (openPreset.ShowDialog() == DialogResult.OK)
- {
- QueryParser parsed = imp.importMacPreset(openPreset.FileName);
- if (presetHandler.checkIfUserPresetExists(parsed.PresetName + " (Imported)"))
- {
- DialogResult result = MessageBox.Show("This preset appears to already exist. Would you like to overwrite it?", "Overwrite preset?",
- MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
- if (result == DialogResult.Yes)
- {
- PresetLoader.presetLoader(this, parsed, parsed.PresetName, parsed.UsesPictureSettings);
- presetHandler.updatePreset(parsed.PresetName + " (Imported)", queryGen.generateCLIQuery(this, 0, null),
- parsed.UsesPictureSettings);
- }
- }
- else
- {
- PresetLoader.presetLoader(this, parsed, parsed.PresetName, parsed.UsesPictureSettings);
- presetHandler.addPreset(parsed.PresetName, queryGen.generateCLIQuery(this, 0, null), parsed.UsesPictureSettings);
-
- if (presetHandler.addPreset(parsed.PresetName + " (Imported)", queryGen.generateCLIQuery(this, 0, null), parsed.UsesPictureSettings))
- {
- TreeNode preset_treeview = new TreeNode(parsed.PresetName + " (Imported)") { ForeColor = Color.Black };
- treeView_presets.Nodes.Add(preset_treeview);
- }
- }
- }
+ importPreset();
}
private void btn_new_preset_Click(object sender, EventArgs e)
{
@@ -473,6 +447,10 @@ namespace Handbrake {
treeView_presets.CollapseAll();
}
+ private void pmnu_import_Click(object sender, EventArgs e)
+ {
+ importPreset();
+ }
private void pmnu_saveChanges_Click(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show("Do you wish to include picture settings when updating the preset: " + treeView_presets.SelectedNode.Text, "Update Preset", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
@@ -626,6 +604,36 @@ namespace Handbrake }
}
}
+ private void importPreset()
+ {
+ Import imp = new Import();
+ if (openPreset.ShowDialog() == DialogResult.OK)
+ {
+ QueryParser parsed = imp.importMacPreset(openPreset.FileName);
+ if (presetHandler.checkIfUserPresetExists(parsed.PresetName + " (Imported)"))
+ {
+ DialogResult result = MessageBox.Show("This preset appears to already exist. Would you like to overwrite it?", "Overwrite preset?",
+ MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
+ if (result == DialogResult.Yes)
+ {
+ PresetLoader.presetLoader(this, parsed, parsed.PresetName, parsed.UsesPictureSettings);
+ presetHandler.updatePreset(parsed.PresetName + " (Imported)", queryGen.generateCLIQuery(this, 0, null),
+ parsed.UsesPictureSettings);
+ }
+ }
+ else
+ {
+ PresetLoader.presetLoader(this, parsed, parsed.PresetName, parsed.UsesPictureSettings);
+ presetHandler.addPreset(parsed.PresetName, queryGen.generateCLIQuery(this, 0, null), parsed.UsesPictureSettings);
+
+ if (presetHandler.addPreset(parsed.PresetName + " (Imported)", queryGen.generateCLIQuery(this, 0, null), parsed.UsesPictureSettings))
+ {
+ TreeNode preset_treeview = new TreeNode(parsed.PresetName + " (Imported)") { ForeColor = Color.Black };
+ treeView_presets.Nodes.Add(preset_treeview);
+ }
+ }
+ }
+ }
#endregion
#region ToolStrip
|