summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-02-19 20:48:16 +0000
committersr55 <[email protected]>2009-02-19 20:48:16 +0000
commit265a667a15963aa62dfd56bc46041da9f9c23f50 (patch)
treeadffc4e42458878594037cdea50d9a4a5d9cfa5a /win
parent40f3eab91de2779cf2490fa51b6b232a0d4432ae (diff)
WinGui:
- Fixed a bug in the preset update function. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2168 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/C#/Presets/PresetsHandler.cs15
1 files changed, 7 insertions, 8 deletions
diff --git a/win/C#/Presets/PresetsHandler.cs b/win/C#/Presets/PresetsHandler.cs
index 7bf3f903d..aa52d0685 100644
--- a/win/C#/Presets/PresetsHandler.cs
+++ b/win/C#/Presets/PresetsHandler.cs
@@ -89,6 +89,7 @@ namespace Handbrake.Presets
item.Query = query;
item.PictureSettings = pictureSettings;
MessageBox.Show("Changes to \"" + presetName + "\" Saved", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ updateUserPresetsFile();
}
}
}
@@ -225,10 +226,8 @@ namespace Handbrake.Presets
presets.Clear();
user_presets.Clear();
- string filePath = string.Empty;
-
// Load in the users presets from user_presets.xml
- filePath = Application.StartupPath.ToString() + "\\presets.xml";
+ string filePath = Application.StartupPath + "\\presets.xml";
if (File.Exists(filePath))
{
using (FileStream strm = new FileStream(filePath, FileMode.Open, FileAccess.Read))
@@ -244,7 +243,7 @@ namespace Handbrake.Presets
}
// Load in the users presets from user_presets.xml
- filePath = Application.StartupPath.ToString() + "\\user_presets.xml";
+ filePath = Application.StartupPath + "\\user_presets.xml";
if (File.Exists(filePath))
{
using (FileStream strm = new FileStream(filePath, FileMode.Open, FileAccess.Read))
@@ -266,7 +265,7 @@ namespace Handbrake.Presets
/// </summary>
private void updatePresetsFile()
{
- string userPresets = Application.StartupPath.ToString() + "\\presets.xml";
+ string userPresets = Application.StartupPath + "\\presets.xml";
try
{
using (FileStream strm = new FileStream(userPresets, FileMode.Create, FileAccess.Write))
@@ -278,7 +277,7 @@ namespace Handbrake.Presets
}
catch (Exception exc)
{
- MessageBox.Show("Unable to write to the file. Please make sure the location has the correct permissions for file writing.\n Error Information: \n\n" + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+ MessageBox.Show("Unable to write to the file. Please make sure the location has the correct permissions for file writing.\n Error Information: \n\n" + exc, "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
}
}
@@ -288,7 +287,7 @@ namespace Handbrake.Presets
/// </summary>
private void updateUserPresetsFile()
{
- string userPresets = Application.StartupPath.ToString() + "\\user_presets.xml";
+ string userPresets = Application.StartupPath + "\\user_presets.xml";
try
{
using (FileStream strm = new FileStream(userPresets, FileMode.Create, FileAccess.Write))
@@ -300,7 +299,7 @@ namespace Handbrake.Presets
}
catch (Exception exc)
{
- MessageBox.Show("Unable to write to the file. Please make sure the location has the correct permissions for file writing.\n Error Information: \n\n" + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+ MessageBox.Show("Unable to write to the file. Please make sure the location has the correct permissions for file writing.\n Error Information: \n\n" + exc, "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
}
}