summaryrefslogtreecommitdiffstats
path: root/win/C#/frmQueue.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-04-22 12:27:37 +0000
committersr55 <[email protected]>2009-04-22 12:27:37 +0000
commit93f6c9c22d8d3ac46980a012511046b1f4202bc6 (patch)
tree9de22e87df24800ccddb286f68bc44a74bc683a5 /win/C#/frmQueue.cs
parent51efc17fe2d6bf6a7c33e7b35df0d5d5b9633e5a (diff)
WinGui:
- Queue: Can now store unlimited number of audio tracks in presets. It is no longer limited to 4. - Activity Window: Fixed a bug where it was looking at the wrong class for checking the status of encoding. - Activity Window: Improved update / display performance dramatically by removing a List data structure. - Misc: Old code removed / code tweaks git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2349 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmQueue.cs')
-rw-r--r--win/C#/frmQueue.cs48
1 files changed, 23 insertions, 25 deletions
diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs
index 4f8ac2c36..39f548236 100644
--- a/win/C#/frmQueue.cs
+++ b/win/C#/frmQueue.cs
@@ -166,17 +166,15 @@ namespace Handbrake
item.SubItems.Add(queue_item.Destination); // Destination
item.SubItems.Add(parsed.VideoEncoder); // Video
- // Display the first 4 audio tracks.
- String audio = parsed.AudioEncoder1;
- if (parsed.AudioEncoder2 != null)
- audio += ", " + parsed.AudioEncoder2;
-
- if (parsed.AudioEncoder3 != null)
- audio += ", " + parsed.AudioEncoder3;
-
- if (parsed.AudioEncoder4 != null)
- audio += ", " + parsed.AudioEncoder4;
-
+ // Display The Audio Track Information
+ string audio = string.Empty;
+ foreach (Functions.AudioTrack track in parsed.AudioInformation)
+ {
+ if (audio != "")
+ audio += ", " + track.Encoder;
+ else
+ audio = track.Encoder;
+ }
item.SubItems.Add(audio); // Audio
list_queue.Items.Add(item);
@@ -203,9 +201,9 @@ namespace Handbrake
}
// found query is a global varible
- Functions.QueryParser parsed = Functions.QueryParser.Parse(queue.getLastQueryItem().Query);
- lbl_source.Text = queue.getLastQueryItem().Source;
- lbl_dest.Text = queue.getLastQueryItem().Destination;
+ Functions.QueryParser parsed = Functions.QueryParser.Parse(queue.lastQueueItem.Query);
+ lbl_source.Text = queue.lastQueueItem.Source;
+ lbl_dest.Text = queue.lastQueueItem.Destination;
lbl_title.Text = parsed.DVDTitle == 0 ? "Auto" : parsed.DVDTitle.ToString();
@@ -220,16 +218,16 @@ namespace Handbrake
}
lbl_vEnc.Text = parsed.VideoEncoder;
- String audio = parsed.AudioEncoder1;
- if (parsed.AudioEncoder2 != null)
- audio += ", " + parsed.AudioEncoder2;
-
- if (parsed.AudioEncoder3 != null)
- audio += ", " + parsed.AudioEncoder3;
-
- if (parsed.AudioEncoder4 != null)
- audio += ", " + parsed.AudioEncoder4;
+ // Display The Audio Track Information
+ string audio = string.Empty;
+ foreach (Functions.AudioTrack track in parsed.AudioInformation)
+ {
+ if (audio != "")
+ audio += ", " + track.Encoder;
+ else
+ audio = track.Encoder;
+ }
lbl_aEnc.Text = audio;
}
catch (Exception)
@@ -379,9 +377,9 @@ namespace Handbrake
}
private void mnu_readd_Click(object sender, EventArgs e)
{
- if (queue.getLastQueryItem() != null)
+ if (queue.lastQueueItem != null)
{
- queue.add(queue.getLastQueryItem().Query, queue.getLastQueryItem().Source, queue.getLastQueryItem().Destination);
+ queue.add(queue.lastQueueItem.Query, queue.lastQueueItem.Source, queue.lastQueueItem.Destination);
queue.write2disk("hb_queue_recovery.xml"); // Update the queue recovery file
updateUIElements();
}