summaryrefslogtreecommitdiffstats
path: root/win/C#/Controls/Subtitles.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-06-26 15:23:53 +0000
committersr55 <[email protected]>2009-06-26 15:23:53 +0000
commite7b1cb58bd6939a48469d4c23062cd48d2b82d0b (patch)
treef8c219329898d3c3f523390b8c308423192ee6f1 /win/C#/Controls/Subtitles.cs
parentf34a12947c422484c04a7f3bf12120996c7f293e (diff)
WinGui:
- Right Click menu for subtitles Panel. Move Up/Down and remove options. - Confirmation dialog for the new clear logs option. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2627 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Controls/Subtitles.cs')
-rw-r--r--win/C#/Controls/Subtitles.cs45
1 files changed, 40 insertions, 5 deletions
diff --git a/win/C#/Controls/Subtitles.cs b/win/C#/Controls/Subtitles.cs
index b5dfeef95..47864f2ee 100644
--- a/win/C#/Controls/Subtitles.cs
+++ b/win/C#/Controls/Subtitles.cs
@@ -6,10 +6,6 @@ namespace Handbrake.Controls
public partial class Subtitles : UserControl
{
- // TODO
- // - Right click menu for adding/removal of tracks.
- // - Multi-select for removal.
-
public Subtitles()
{
InitializeComponent();
@@ -171,6 +167,46 @@ namespace Handbrake.Controls
lv_subList.Select();
}
}
+
+ // Right Click Menu
+ private void mnu_moveup_Click(object sender, EventArgs e)
+ {
+ if (lv_subList.SelectedIndices.Count != 0)
+ {
+ ListViewItem item = lv_subList.SelectedItems[0];
+ int index = item.Index;
+ index--;
+
+ if (lv_subList.Items.Count > index && index >= 0)
+ {
+ lv_subList.Items.Remove(item);
+ lv_subList.Items.Insert(index, item);
+ item.Selected = true;
+ lv_subList.Focus();
+ }
+ }
+ }
+ private void mnu_movedown_Click(object sender, EventArgs e)
+ {
+ if (lv_subList.SelectedIndices.Count != 0)
+ {
+ ListViewItem item = lv_subList.SelectedItems[0];
+ int index = item.Index;
+ index++;
+
+ if (index < lv_subList.Items.Count)
+ {
+ lv_subList.Items.Remove(item);
+ lv_subList.Items.Insert(index, item);
+ item.Selected = true;
+ lv_subList.Focus();
+ }
+ }
+ }
+ private void mnu_remove_Click(object sender, EventArgs e)
+ {
+ removeTrack();
+ }
// Functions
private void setNoDefault()
@@ -229,6 +265,5 @@ namespace Handbrake.Controls
i++;
}
}
-
}
}