summaryrefslogtreecommitdiffstats
path: root/win/C#/frmActivityWindow.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-10-31 17:57:41 +0000
committersr55 <[email protected]>2010-10-31 17:57:41 +0000
commit57c8671f6c5e4cb263abbc4977959f19c92a02e8 (patch)
tree48d64a761c4e62ec0fdd21e8c1784a83ab71e8b2 /win/C#/frmActivityWindow.cs
parent812a95f0dcf1b396a213deaf93d50ab896d249f9 (diff)
WinGui:
- Tweak to the Activity window to make it clearer which encode log is selected. Also improves the logic which selects the correct log when the window loads. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3633 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmActivityWindow.cs')
-rw-r--r--win/C#/frmActivityWindow.cs49
1 files changed, 22 insertions, 27 deletions
diff --git a/win/C#/frmActivityWindow.cs b/win/C#/frmActivityWindow.cs
index c09ceb382..ee3d3bf75 100644
--- a/win/C#/frmActivityWindow.cs
+++ b/win/C#/frmActivityWindow.cs
@@ -158,14 +158,27 @@ namespace Handbrake
/// The sender.
/// </param>
/// <param name="e">
- /// The e.
+ /// The EventArgs.
/// </param>
- private void NewActivityWindow_Load(object sender, EventArgs e)
+ private void ActivityWindowLoad(object sender, EventArgs e)
{
try
{
- ActivityLogMode activitLogMode = (ActivityLogMode)Enum.ToObject(typeof(ActivityLogMode), Properties.Settings.Default.ActivityWindowLastMode);
- SetMode(activitLogMode);
+ // Set the inital log file.
+ if (encode.IsEncoding)
+ {
+ this.logSelector.SelectedIndex = 1;
+ }
+ else if (scan.IsScanning)
+ {
+ this.logSelector.SelectedIndex = 0;
+ }
+ else
+ {
+ // Otherwise, use the last mode the window was in.
+ ActivityLogMode activitLogMode = (ActivityLogMode)Enum.ToObject(typeof(ActivityLogMode), Properties.Settings.Default.ActivityWindowLastMode);
+ this.logSelector.SelectedIndex = activitLogMode == ActivityLogMode.Scan ? 0 : 1;
+ }
}
catch (Exception exc)
{
@@ -430,31 +443,13 @@ namespace Handbrake
}
/// <summary>
- /// Set scan mode
+ /// Change the Log file in the viewer
/// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void BtnScanLogClick(object sender, EventArgs e)
+ /// <param name="sender">The Sender </param>
+ /// <param name="e">The EventArgs</param>
+ private void LogSelectorClick(object sender, EventArgs e)
{
- SetMode(ActivityLogMode.Scan);
- }
-
- /// <summary>
- /// Set the encode mode
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void BtnEncodeLogClick(object sender, EventArgs e)
- {
- SetMode(ActivityLogMode.Encode);
+ this.SetMode((string)this.logSelector.SelectedItem == "Scan Log" ? ActivityLogMode.Scan : ActivityLogMode.Encode);
}
/* Overrides */