From 8d0ae93b8d307e098ada51f019770c3a3c29d23f Mon Sep 17 00:00:00 2001 From: sr55 Date: Wed, 8 Jul 2009 17:49:25 +0000 Subject: WinGui: - 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 | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'win/C#/Controls') diff --git a/win/C#/Controls/Subtitles.cs b/win/C#/Controls/Subtitles.cs index c4068fa3d..48a6f3c7a 100644 --- a/win/C#/Controls/Subtitles.cs +++ b/win/C#/Controls/Subtitles.cs @@ -2,14 +2,12 @@ using System.Collections.Generic; using System.Windows.Forms; using Handbrake.Functions; -using System.IO; namespace Handbrake.Controls { public partial class Subtitles : UserControl { - - IDictionary LangMap = new Dictionary(); + readonly IDictionary LangMap = new Dictionary(); public Subtitles() { @@ -23,12 +21,12 @@ namespace Handbrake.Controls srt_lang.SelectedIndex = 40; } - private int fileContainer; + private int FileContainer; public void setContainer(int value) { - fileContainer = value; + FileContainer = value; Boolean trigger = false; - if (fileContainer != 1) + if (FileContainer != 1) foreach (ListViewItem item in lv_subList.Items) { if (item.SubItems[1].Text.Contains("Bitmap")) @@ -66,7 +64,7 @@ namespace Handbrake.Controls } Boolean addTrack = true; - if (fileContainer == 0) + if (FileContainer == 0) { burnedVal = "Yes"; // MP4 must have bitmap subs burned in. @@ -250,6 +248,13 @@ namespace Handbrake.Controls private void srt_browse_Click(object sender, EventArgs e) { openFileDialog.ShowDialog(); + + // Update an item in the list if required. + if (lv_subList.Items.Count != 0 && lv_subList.SelectedIndices.Count != 0) + { + lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[5].Text = openFileDialog.FileName; + lv_subList.Select(); + } } // Right Click Menu -- cgit v1.2.3