]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Wed, 19 Nov 2008 20:35:09 +0000 (20:35 +0000)
committersr55 <sr55.hb@outlook.com>
Wed, 19 Nov 2008 20:35:09 +0000 (20:35 +0000)
- 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

win/C#/Functions/Main.cs
win/C#/frmMain.cs

index 6374d74072fdef7dae8c3bfab9375d93324724b0..f8600d3e98f836047062aa2e063aeacccf3ac97c 100644 (file)
@@ -18,23 +18,6 @@ namespace Handbrake.Functions
 {\r
     class Main\r
     {\r
-        /// <summary>\r
-        /// Take in a File destination and change it's file extension to a new Extension\r
-        /// </summary>\r
-        /// <param name="destination"></param>\r
-        /// <param name="newExtension"></param>\r
-        /// <returns>String of the new file path and extension</returns>\r
-        public string setExtension(string destination, string newExtension)\r
-        {\r
-            destination.Replace(".mp4", newExtension);\r
-            destination.Replace(".m4v", newExtension);\r
-            destination.Replace(".mkv", newExtension);\r
-            destination.Replace(".avi", newExtension);\r
-            destination.Replace(".ogm", newExtension);\r
-\r
-            return destination;\r
-        }\r
-\r
         /// <summary>\r
         /// Calculate the duration of the selected title and chapters\r
         /// </summary>\r
index e7345b539d6455f494a5c1ede35d5fb5f456f4fe..d66692da62a03d48baae8cab118be2d95fb8568f 100644 (file)
@@ -713,15 +713,16 @@ namespace Handbrake
         private void drop_format_SelectedIndexChanged(object sender, EventArgs e)\r
         {\r
             if (drop_format.SelectedIndex == 0)\r
-                text_destination.Text = hb_common_func.setExtension(text_destination.Text, ".mp4");\r
+                setExtension(".mp4");\r
             else if (drop_format.SelectedIndex == 1)\r
-                text_destination.Text = hb_common_func.setExtension(text_destination.Text, ".m4v");\r
+                setExtension(".m4v");\r
             else if (drop_format.SelectedIndex == 2)\r
-                text_destination.Text = hb_common_func.setExtension(text_destination.Text, ".mkv");\r
+                setExtension(".mkv");\r
             else if (drop_format.SelectedIndex == 3)\r
-                text_destination.Text = hb_common_func.setExtension(text_destination.Text, ".avi");\r
+                setExtension(".avi");\r
             else if (drop_format.SelectedIndex == 4)\r
-                text_destination.Text = hb_common_func.setExtension(text_destination.Text, ".ogm");\r
+                setExtension(".ogm");\r
+\r
         }\r
 \r
         //Video Tab\r
@@ -1578,6 +1579,20 @@ namespace Handbrake
                 }\r
             }\r
         }\r
+        /// <summary>\r
+        /// Take in a File destination and change it's file extension to a new Extension\r
+        /// </summary>\r
+        /// <param name="destination"></param>\r
+        /// <param name="newExtension"></param>\r
+        /// <returns>String of the new file path and extension</returns>\r
+        public void setExtension(string newExtension)\r
+        {\r
+            text_destination.Text = text_destination.Text.Replace(".mp4", newExtension);\r
+            text_destination.Text = text_destination.Text.Replace(".m4v", newExtension);\r
+            text_destination.Text = text_destination.Text.Replace(".mkv", newExtension);\r
+            text_destination.Text = text_destination.Text.Replace(".avi", newExtension);\r
+            text_destination.Text = text_destination.Text.Replace(".ogm", newExtension);\r
+        }\r
         #endregion\r
 \r
         #region Drive Detection\r