]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Wed, 8 Jul 2009 17:49:25 +0000 (17:49 +0000)
committersr55 <sr55.hb@outlook.com>
Wed, 8 Jul 2009 17:49:25 +0000 (17:49 +0000)
- Small fix to the SRT browse button.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2673 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Controls/Subtitles.cs

index c4068fa3df8c756483d30a3b496fc72d628fc31d..48a6f3c7a71a65e5c0d503f5896bdd708aa3577d 100644 (file)
@@ -2,14 +2,12 @@
 using System.Collections.Generic;\r
 using System.Windows.Forms;\r
 using Handbrake.Functions;\r
-using System.IO;\r
 \r
 namespace Handbrake.Controls\r
 {\r
     public partial class Subtitles : UserControl\r
     {\r
-\r
-        IDictionary<string, string> LangMap = new Dictionary<string, string>();\r
+        readonly IDictionary<string, string> LangMap = new Dictionary<string, string>();\r
 \r
         public Subtitles()\r
         {\r
@@ -23,12 +21,12 @@ namespace Handbrake.Controls
             srt_lang.SelectedIndex = 40;\r
         }\r
 \r
-        private int fileContainer;\r
+        private int FileContainer;\r
         public void setContainer(int value)\r
         {\r
-            fileContainer = value;\r
+            FileContainer = value;\r
             Boolean trigger = false;\r
-            if (fileContainer != 1)\r
+            if (FileContainer != 1)\r
                 foreach (ListViewItem item in lv_subList.Items)\r
                 {\r
                     if (item.SubItems[1].Text.Contains("Bitmap"))\r
@@ -66,7 +64,7 @@ namespace Handbrake.Controls
             }\r
 \r
             Boolean addTrack = true;\r
-            if (fileContainer == 0)\r
+            if (FileContainer == 0)\r
             {\r
                 burnedVal = "Yes";  // MP4 must have bitmap subs burned in.\r
 \r
@@ -250,6 +248,13 @@ namespace Handbrake.Controls
         private void srt_browse_Click(object sender, EventArgs e)\r
         {\r
             openFileDialog.ShowDialog();\r
+\r
+            // Update an item in the  list if required.\r
+            if (lv_subList.Items.Count != 0 && lv_subList.SelectedIndices.Count != 0)\r
+            {\r
+                lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[5].Text = openFileDialog.FileName;\r
+                lv_subList.Select();\r
+            }\r
         }\r
 \r
         // Right Click Menu\r