diff options
author | sr55 <[email protected]> | 2008-11-19 20:35:09 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2008-11-19 20:35:09 +0000 |
commit | 8abbb1b394bf512451c46d32015d883f5f1dabb7 (patch) | |
tree | 2500fcdbc3927574b15e95c2cc3ad647af8cadea | |
parent | 4f73174d5e3440a1bb53424c1592bd6ff0dc6b91 (diff) |
WinGui:
- Fix Format dropdown. It was not setting the file extension correctly, thus not updating the audio and video encoder dropdowns.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1932 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | win/C#/Functions/Main.cs | 17 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 25 |
2 files changed, 20 insertions, 22 deletions
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs index 6374d7407..f8600d3e9 100644 --- a/win/C#/Functions/Main.cs +++ b/win/C#/Functions/Main.cs @@ -19,23 +19,6 @@ namespace Handbrake.Functions class Main
{
/// <summary>
- /// Take in a File destination and change it's file extension to a new Extension
- /// </summary>
- /// <param name="destination"></param>
- /// <param name="newExtension"></param>
- /// <returns>String of the new file path and extension</returns>
- public string setExtension(string destination, string newExtension)
- {
- destination.Replace(".mp4", newExtension);
- destination.Replace(".m4v", newExtension);
- destination.Replace(".mkv", newExtension);
- destination.Replace(".avi", newExtension);
- destination.Replace(".ogm", newExtension);
-
- return destination;
- }
-
- /// <summary>
/// Calculate the duration of the selected title and chapters
/// </summary>
public TimeSpan calculateDuration(string chapter_start, string chapter_end, Parsing.Title selectedTitle)
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index e7345b539..d66692da6 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -713,15 +713,16 @@ namespace Handbrake private void drop_format_SelectedIndexChanged(object sender, EventArgs e)
{
if (drop_format.SelectedIndex == 0)
- text_destination.Text = hb_common_func.setExtension(text_destination.Text, ".mp4");
+ setExtension(".mp4");
else if (drop_format.SelectedIndex == 1)
- text_destination.Text = hb_common_func.setExtension(text_destination.Text, ".m4v");
+ setExtension(".m4v");
else if (drop_format.SelectedIndex == 2)
- text_destination.Text = hb_common_func.setExtension(text_destination.Text, ".mkv");
+ setExtension(".mkv");
else if (drop_format.SelectedIndex == 3)
- text_destination.Text = hb_common_func.setExtension(text_destination.Text, ".avi");
+ setExtension(".avi");
else if (drop_format.SelectedIndex == 4)
- text_destination.Text = hb_common_func.setExtension(text_destination.Text, ".ogm");
+ setExtension(".ogm");
+
}
//Video Tab
@@ -1578,6 +1579,20 @@ namespace Handbrake }
}
}
+ /// <summary>
+ /// Take in a File destination and change it's file extension to a new Extension
+ /// </summary>
+ /// <param name="destination"></param>
+ /// <param name="newExtension"></param>
+ /// <returns>String of the new file path and extension</returns>
+ public void setExtension(string newExtension)
+ {
+ text_destination.Text = text_destination.Text.Replace(".mp4", newExtension);
+ text_destination.Text = text_destination.Text.Replace(".m4v", newExtension);
+ text_destination.Text = text_destination.Text.Replace(".mkv", newExtension);
+ text_destination.Text = text_destination.Text.Replace(".avi", newExtension);
+ text_destination.Text = text_destination.Text.Replace(".ogm", newExtension);
+ }
#endregion
#region Drive Detection
|