diff options
author | sr55 <[email protected]> | 2008-09-27 22:42:23 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2008-09-27 22:42:23 +0000 |
commit | 37897e9ed4608d8f3e400d4090220f3a92a55fc3 (patch) | |
tree | f5ade466eeed35665cd708fd67a8f7b74521c920 /win/C#/frmQueue.cs | |
parent | b5afbe5d8d9a81b79481fbfee67831ecd3728859 (diff) |
WinGui:
- Refined the Queue look.
- Fixed bug which cause the move up and down buttons to cause an exception.
- When you select an item on the queue and move it up or down, it will now remain selected. This saves re-selecting the item every time you want to move it up or down.
- Added pending encodes counter.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1780 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmQueue.cs')
-rw-r--r-- | win/C#/frmQueue.cs | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs index e27241921..07f4717c6 100644 --- a/win/C#/frmQueue.cs +++ b/win/C#/frmQueue.cs @@ -41,6 +41,7 @@ namespace Handbrake {
queue = qw;
redrawQueue();
+ lbl_encodesPending.Text = list_queue.Items.Count + " encode(s) pending";
}
/// <summary>
@@ -59,7 +60,8 @@ namespace Handbrake private void redrawQueue()
{
list_queue.Items.Clear();
- foreach (ArrayList queue_item in queue.getQueue())
+ ArrayList theQueue = queue.getQueue();
+ foreach (ArrayList queue_item in theQueue)
{
string q_item = queue_item[1].ToString();
Functions.QueryParser parsed = Functions.QueryParser.Parse(q_item);
@@ -195,6 +197,8 @@ namespace Handbrake lbl_aEnc.Text = "-";
lbl_title.Text = "-";
lbl_chapt.Text = "-";
+
+ lbl_encodesPending.Text = list_queue.Items.Count + " encode(s) pending";
}
catch (Exception exc)
{
@@ -226,6 +230,7 @@ namespace Handbrake progressBar.PerformStep();
lbl_progressValue.Text = string.Format("{0} %", progressBar.Value);
+ lbl_encodesPending.Text = list_queue.Items.Count + " encode(s) pending";
}
catch (Exception exc)
{
@@ -281,9 +286,16 @@ namespace Handbrake {
if (list_queue.SelectedIndices.Count != 0)
{
- queue.moveUp(list_queue.SelectedIndices[0]);
+ int selected = list_queue.SelectedIndices[0];
+
+ queue.moveUp(selected);
queue.write2disk("hb_queue_recovery.dat"); // Update the queue recovery file
redrawQueue();
+
+ if (selected - 1 > 0)
+ list_queue.Items[selected -1].Selected = true;
+
+ list_queue.Select();
}
}
@@ -292,9 +304,16 @@ namespace Handbrake {
if (list_queue.SelectedIndices.Count != 0)
{
+ int selected = list_queue.SelectedIndices[0];
+
queue.moveDown(list_queue.SelectedIndices[0]);
queue.write2disk("hb_queue_recovery.dat"); // Update the queue recovery file
redrawQueue();
+
+ if (selected +1 < list_queue.Items.Count)
+ list_queue.Items[selected + 1].Selected = true;
+
+ list_queue.Select();
}
}
@@ -306,6 +325,7 @@ namespace Handbrake queue.remove(list_queue.SelectedIndices[0]);
queue.write2disk("hb_queue_recovery.dat"); // Update the queue recovery file
redrawQueue();
+ lbl_encodesPending.Text = list_queue.Items.Count + " encode(s) pending";
}
}
|