summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-03-19 15:46:21 +0000
committersr55 <[email protected]>2011-03-19 15:46:21 +0000
commit64503043ab114ffa207431c5c6a2293f1936278d (patch)
tree5fc4b346b4fa2a3db174d5ebd9284a56a2e1ad2b /win
parent6e531a9eadeeed119e9dbec4e642bde5ff7c42e9 (diff)
WinGui:
- Improvements to the log window code. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3850 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Encode.cs74
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/ScanService.cs94
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/UtilityService.cs36
-rw-r--r--win/CS/Properties/Settings.Designer.cs2
-rw-r--r--win/CS/Properties/Settings.settings2
-rw-r--r--win/CS/app.config2
-rw-r--r--win/CS/frmActivityWindow.Designer.cs25
-rw-r--r--win/CS/frmActivityWindow.cs28
-rw-r--r--win/CS/frmActivityWindow.resx12
-rw-r--r--win/CS/frmOptions.Designer.cs6
-rw-r--r--win/CS/frmOptions.cs4
11 files changed, 92 insertions, 193 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
index 4a6333da7..c7a00dda5 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
@@ -57,6 +57,11 @@ namespace HandBrake.ApplicationServices.Services
/// </summary>
static readonly object fileWriterLock = new object();
+ /// <summary>
+ /// The Log File Header
+ /// </summary>
+ StringBuilder header = UtilityService.CreateCliLogHeader(null);
+
#endregion
/// <summary>
@@ -65,6 +70,7 @@ namespace HandBrake.ApplicationServices.Services
public Encode()
{
this.EncodeStarted += this.EncodeEncodeStarted;
+ this.logBuffer = new StringBuilder();
GrowlCommunicator.Register();
}
@@ -104,20 +110,8 @@ namespace HandBrake.ApplicationServices.Services
public string ActivityLog
{
get
- {
- if (this.IsEncoding == false)
- {
- try
- {
- ReadFile(); // Read the last log file back in if it exists
- }
- catch (Exception exc)
- {
- return exc.ToString();
- }
- }
-
- return string.IsNullOrEmpty(this.logBuffer.ToString()) ? "No log data available..." : this.logBuffer.ToString();
+ {
+ return string.IsNullOrEmpty(this.logBuffer.ToString()) ? header + "No log data available..." : header + this.logBuffer.ToString();
}
}
@@ -396,56 +390,6 @@ namespace HandBrake.ApplicationServices.Services
}
/// <summary>
- /// Read the log file
- /// </summary>
- private void ReadFile()
- {
- logBuffer = new StringBuilder();
- lock (logBuffer)
- {
- // last_encode_log.txt is the primary log file. Since .NET can't read this file whilst the CLI is outputing to it (Not even in read only mode),
- // we'll need to make a copy of it.
- string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
- string logFile = Path.Combine(logDir, string.Format("last_encode_log{0}.txt", Init.InstanceId));
- string logFile2 = Path.Combine(logDir, string.Format("tmp_appReadable_log{0}.txt", Init.InstanceId));
- int logFilePosition = 0;
-
- try
- {
- // Copy the log file.
- if (File.Exists(logFile))
- File.Copy(logFile, logFile2, true);
- else
- return;
-
- // Start the Reader
- // Only use text which continues on from the last read line
- using (StreamReader sr = new StreamReader(logFile2))
- {
- string line;
- int i = 1;
- while ((line = sr.ReadLine()) != null)
- {
- if (i > logFilePosition)
- {
- logBuffer.AppendLine(line);
- logFilePosition++;
- }
- i++;
- }
- sr.Close();
- }
- }
- catch (Exception exc)
- {
- logBuffer.Append(
- Environment.NewLine + "Unable to read Log file..." + Environment.NewLine + exc +
- Environment.NewLine);
- }
- }
- }
-
- /// <summary>
/// Setup the logging.
/// </summary>
/// <param name="encodeQueueTask">
@@ -466,9 +410,7 @@ namespace HandBrake.ApplicationServices.Services
if (File.Exists(logFile2)) File.Delete(logFile2);
fileWriter = new StreamWriter(logFile) { AutoFlush = true };
-
fileWriter.WriteLine(UtilityService.CreateCliLogHeader(encodeQueueTask));
- logBuffer.AppendLine(UtilityService.CreateCliLogHeader(encodeQueueTask));
}
catch (Exception)
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs b/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs
index 7064d9358..091b4478c 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs
@@ -25,11 +25,6 @@ namespace HandBrake.ApplicationServices.Services
#region Private Variables
/// <summary>
- /// A Lock object
- /// </summary>
- private static readonly object locker = new object();
-
- /// <summary>
/// The CLI data parser
/// </summary>
private Parser readData;
@@ -40,14 +35,14 @@ namespace HandBrake.ApplicationServices.Services
private StringBuilder logBuffer;
/// <summary>
- /// The line number thats been read to in the log file
+ /// The Process belonging to the CLI
/// </summary>
- private int logFilePosition;
+ private Process hbProc;
/// <summary>
- /// The Process belonging to the CLI
+ /// The Log File Header
/// </summary>
- private Process hbProc;
+ StringBuilder header = UtilityService.CreateCliLogHeader(null);
#endregion
@@ -56,6 +51,7 @@ namespace HandBrake.ApplicationServices.Services
/// </summary>
public ScanService()
{
+ this.logBuffer = new StringBuilder();
}
#region Events
@@ -96,16 +92,7 @@ namespace HandBrake.ApplicationServices.Services
{
get
{
- if (IsScanning)
- return readData.Buffer.ToString();
-
- if (logBuffer == null)
- {
- ResetLogReader(false);
- ReadLastScanFile();
- }
-
- return logBuffer != null ? logBuffer.ToString() : string.Empty;
+ return string.IsNullOrEmpty(this.logBuffer.ToString()) ? header + "No log data available..." : header + this.logBuffer.ToString();
}
}
@@ -165,7 +152,7 @@ namespace HandBrake.ApplicationServices.Services
this.ScanStared(this, new EventArgs());
}
- ResetLogReader(true);
+ logBuffer = new StringBuilder();
string handbrakeCLIPath = Path.Combine(Application.StartupPath, "HandBrakeCLI.exe");
string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) +
@@ -264,73 +251,6 @@ namespace HandBrake.ApplicationServices.Services
}
/// <summary>
- /// Read the log file
- /// </summary>
- private void ReadLastScanFile()
- {
- lock (locker)
- {
- // last_encode_log.txt is the primary log file. Since .NET can't read this file whilst the CLI is outputing to it (Not even in read only mode),
- // we'll need to make a copy of it.
- string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) +
- "\\HandBrake\\logs";
- string logFile = Path.Combine(logDir, string.Format("last_scan_log{0}.txt", Init.InstanceId == 0 ? string.Empty : Init.InstanceId.ToString()));
- string logFile2 = Path.Combine(logDir, string.Format("tmp_appReadable_log{0}.txt", Init.InstanceId == 0 ? string.Empty : Init.InstanceId.ToString()));
-
- try
- {
- // Make sure the application readable log file does not already exist. FileCopy fill fail if it does.
- if (File.Exists(logFile2))
- File.Delete(logFile2);
-
- // Copy the log file.
- if (File.Exists(logFile))
- File.Copy(logFile, logFile2, true);
- else
- {
- ResetLogReader(true);
- return;
- }
-
- // Start the Reader
- // Only use text which continues on from the last read line
- StreamReader sr = new StreamReader(logFile2);
- string line;
- int i = 1;
- while ((line = sr.ReadLine()) != null)
- {
- if (i > logFilePosition)
- {
- logBuffer.AppendLine(line);
- logFilePosition++;
- }
- i++;
- }
- sr.Close();
- sr.Dispose();
- }
- catch (Exception exc)
- {
- ResetLogReader(true);
- }
- }
- }
-
- /// <summary>
- /// Reset the Log Reader
- /// </summary>
- /// <param name="addHeader">
- /// The add Header.
- /// </param>
- private void ResetLogReader(bool addHeader)
- {
- logFilePosition = 0;
- logBuffer = new StringBuilder();
- if (addHeader)
- logBuffer.AppendLine(UtilityService.CreateCliLogHeader(null));
- }
-
- /// <summary>
/// Fire an event when the scan process progresses
/// </summary>
/// <param name="sender">the sender</param>
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/UtilityService.cs b/win/CS/HandBrake.ApplicationServices/Utilities/UtilityService.cs
index 3cddf5e0b..948567138 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/UtilityService.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/UtilityService.cs
@@ -105,27 +105,39 @@ namespace HandBrake.ApplicationServices.Utilities
/// <returns>
/// The create cli log header.
/// </returns>
- public static string CreateCliLogHeader(QueueTask encJob)
+ public static StringBuilder CreateCliLogHeader(QueueTask encJob)
{
StringBuilder logHeader = new StringBuilder();
- logHeader.AppendLine(String.Format("# {0}", Init.HandBrakeGuiVersionString));
- logHeader.AppendLine(String.Format("# Running: {0}", Environment.OSVersion));
- logHeader.AppendLine(String.Format("# CPU: {0}", SystemInfo.GetCpuCount));
- logHeader.AppendLine(String.Format("# Ram: {0} MB", SystemInfo.TotalPhysicalMemory));
- logHeader.AppendLine(String.Format("# Screen: {0}x{1}", SystemInfo.ScreenBounds.Bounds.Width, SystemInfo.ScreenBounds.Bounds.Height));
- logHeader.AppendLine(String.Format("# Temp Dir: {0}", Path.GetTempPath()));
- logHeader.AppendLine(String.Format("# Install Dir: {0}", Application.StartupPath));
- logHeader.AppendLine(String.Format("# Data Dir: {0}\n", Application.UserAppDataPath));
+ logHeader.AppendLine(String.Format("{0}", Init.HandBrakeGuiVersionString));
+ logHeader.AppendLine(String.Format("OS: {0}", Environment.OSVersion));
+ logHeader.AppendLine(String.Format("CPU: {0}", SystemInfo.GetCpuCount));
+ logHeader.Append(String.Format("Ram: {0} MB, ", SystemInfo.TotalPhysicalMemory));
+ logHeader.AppendLine(String.Format("Screen: {0}x{1}", SystemInfo.ScreenBounds.Bounds.Width, SystemInfo.ScreenBounds.Bounds.Height));
+ logHeader.AppendLine(String.Format("Temp Dir: {0}", Path.GetTempPath()));
+ logHeader.AppendLine(String.Format("Install Dir: {0}", Application.StartupPath));
+ logHeader.AppendLine(String.Format("Data Dir: {0}\n", Application.UserAppDataPath));
if (encJob != null)
{
- logHeader.AppendLine(String.Format("# CLI Query: {0}", encJob.Query));
- logHeader.AppendLine(String.Format("# User Query: {0}", encJob.CustomQuery));
+ logHeader.AppendLine(String.Format("CLI Query: {0}", encJob.Query));
+ logHeader.AppendLine(String.Format("User Query: {0}", encJob.CustomQuery));
}
logHeader.AppendLine("-------------------------------------------");
- return logHeader.ToString();
+ return logHeader;
+ }
+
+ /// <summary>
+ /// Return the standard log format line of text for a given log message
+ /// </summary>
+ /// <param name="message">The Log Message</param>
+ /// <returns>
+ /// A Log Message in the format: "[hh:mm:ss] message"
+ /// </returns>
+ public static string LogLine(string message)
+ {
+ return string.Format("[{0}] {1}", DateTime.Now.TimeOfDay, message);
}
}
}
diff --git a/win/CS/Properties/Settings.Designer.cs b/win/CS/Properties/Settings.Designer.cs
index 5e1a2bfb9..9adc2577f 100644
--- a/win/CS/Properties/Settings.Designer.cs
+++ b/win/CS/Properties/Settings.Designer.cs
@@ -444,7 +444,7 @@ namespace Handbrake.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool clearOldLogs {
get {
return ((bool)(this["clearOldLogs"]));
diff --git a/win/CS/Properties/Settings.settings b/win/CS/Properties/Settings.settings
index 08849f0ea..0a2c6c787 100644
--- a/win/CS/Properties/Settings.settings
+++ b/win/CS/Properties/Settings.settings
@@ -108,7 +108,7 @@
<Value Profile="(Default)">10</Value>
</Setting>
<Setting Name="clearOldLogs" Type="System.Boolean" Scope="User">
- <Value Profile="(Default)">False</Value>
+ <Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="showCliForInGuiEncodeStatus" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
diff --git a/win/CS/app.config b/win/CS/app.config
index c4155cd07..3b131d6ed 100644
--- a/win/CS/app.config
+++ b/win/CS/app.config
@@ -116,7 +116,7 @@
<value>10</value>
</setting>
<setting name="clearOldLogs" serializeAs="String">
- <value>False</value>
+ <value>True</value>
</setting>
<setting name="showCliForInGuiEncodeStatus" serializeAs="String">
<value>False</value>
diff --git a/win/CS/frmActivityWindow.Designer.cs b/win/CS/frmActivityWindow.Designer.cs
index b71122f64..4344c4e87 100644
--- a/win/CS/frmActivityWindow.Designer.cs
+++ b/win/CS/frmActivityWindow.Designer.cs
@@ -44,6 +44,7 @@ namespace Handbrake
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.btn_copy = new System.Windows.Forms.ToolStripButton();
this.logSelector = new System.Windows.Forms.ToolStripComboBox();
+ this.btn_openLogDirectory = new System.Windows.Forms.ToolStripButton();
this.panel1 = new System.Windows.Forms.Panel();
this.rightClickMenu.SuspendLayout();
this.toolStrip1.SuspendLayout();
@@ -68,7 +69,7 @@ namespace Handbrake
this.mnu_copy_log,
this.mnu_openLogFolder});
this.rightClickMenu.Name = "rightClickMenu";
- this.rightClickMenu.Size = new System.Drawing.Size(254, 48);
+ this.rightClickMenu.Size = new System.Drawing.Size(178, 48);
//
// mnu_copy_log
//
@@ -82,8 +83,8 @@ namespace Handbrake
//
this.mnu_openLogFolder.Image = global::Handbrake.Properties.Resources.folder;
this.mnu_openLogFolder.Name = "mnu_openLogFolder";
- this.mnu_openLogFolder.Size = new System.Drawing.Size(253, 22);
- this.mnu_openLogFolder.Text = "Open Individual Log File Directory";
+ this.mnu_openLogFolder.Size = new System.Drawing.Size(177, 22);
+ this.mnu_openLogFolder.Text = "Open Log Directory";
this.mnu_openLogFolder.Click += new System.EventHandler(this.MnuOpenLogFolderClick);
//
// ToolTip
@@ -95,7 +96,8 @@ namespace Handbrake
this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.btn_copy,
- this.logSelector});
+ this.logSelector,
+ this.btn_openLogDirectory});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
@@ -109,14 +111,15 @@ namespace Handbrake
this.btn_copy.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.btn_copy.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btn_copy.Name = "btn_copy";
- this.btn_copy.Size = new System.Drawing.Size(122, 22);
- this.btn_copy.Text = "Copy to clipboard";
+ this.btn_copy.Size = new System.Drawing.Size(55, 22);
+ this.btn_copy.Text = "Copy";
this.btn_copy.Click += new System.EventHandler(this.BtnCopyClick);
//
// logSelector
//
this.logSelector.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.logSelector.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.logSelector.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.logSelector.Items.AddRange(new object[] {
"Scan Log",
"Encode Log"});
@@ -124,6 +127,15 @@ namespace Handbrake
this.logSelector.Size = new System.Drawing.Size(121, 25);
this.logSelector.SelectedIndexChanged += new System.EventHandler(this.LogSelectorClick);
//
+ // btn_openLogDirectory
+ //
+ this.btn_openLogDirectory.Image = global::Handbrake.Properties.Resources.folder;
+ this.btn_openLogDirectory.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.btn_openLogDirectory.Name = "btn_openLogDirectory";
+ this.btn_openLogDirectory.Size = new System.Drawing.Size(130, 22);
+ this.btn_openLogDirectory.Text = "Open Log Directory";
+ this.btn_openLogDirectory.Click += new System.EventHandler(this.btn_openLogDirectory_Click);
+ //
// panel1
//
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -169,5 +181,6 @@ namespace Handbrake
private System.Windows.Forms.ToolStripMenuItem mnu_copy_log;
private System.Windows.Forms.ToolStripMenuItem mnu_openLogFolder;
private System.Windows.Forms.ToolStripComboBox logSelector;
+ private System.Windows.Forms.ToolStripButton btn_openLogDirectory;
}
} \ No newline at end of file
diff --git a/win/CS/frmActivityWindow.cs b/win/CS/frmActivityWindow.cs
index b5e81ba37..c3dc5c966 100644
--- a/win/CS/frmActivityWindow.cs
+++ b/win/CS/frmActivityWindow.cs
@@ -129,6 +129,8 @@ namespace Handbrake
? "Activity Window (Scan Log)"
: "Activity Window (Encode Log)";
+ this.logSelector.SelectedIndex = mode == ActivityLogMode.Scan ? 0 : 1;
+
if (mode == ActivityLogMode.Scan)
{
scan.ScanCompleted += stopWindowRefresh;
@@ -410,16 +412,26 @@ namespace Handbrake
/// </param>
private void MnuOpenLogFolderClick(object sender, EventArgs e)
{
+ btn_openLogDirectory_Click(sender, e);
+ }
+
+ /// <summary>
+ /// Open the Log Directory
+ /// </summary>
+ /// <param name="sender">The Sender</param>
+ /// <param name="e">The Evennt Args</param>
+ private void btn_openLogDirectory_Click(object sender, EventArgs e)
+ {
string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
string windir = Environment.GetEnvironmentVariable("WINDIR");
Process prc = new Process
- {
- StartInfo =
- {
- FileName = windir + @"\explorer.exe",
- Arguments = logDir
- }
- };
+ {
+ StartInfo =
+ {
+ FileName = windir + @"\explorer.exe",
+ Arguments = logDir
+ }
+ };
prc.Start();
}
@@ -468,5 +480,7 @@ namespace Handbrake
this.Dispose();
base.OnClosing(e);
}
+
+
}
} \ No newline at end of file
diff --git a/win/CS/frmActivityWindow.resx b/win/CS/frmActivityWindow.resx
index ab607e8cf..bc1cc8d50 100644
--- a/win/CS/frmActivityWindow.resx
+++ b/win/CS/frmActivityWindow.resx
@@ -112,21 +112,21 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <metadata name="rightClickMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <metadata name="rightClickMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>205, 18</value>
</metadata>
- <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
- <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>105, 17</value>
</metadata>
- <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btn_copy.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
diff --git a/win/CS/frmOptions.Designer.cs b/win/CS/frmOptions.Designer.cs
index c304e4d35..3d44d4afe 100644
--- a/win/CS/frmOptions.Designer.cs
+++ b/win/CS/frmOptions.Designer.cs
@@ -681,7 +681,7 @@ namespace Handbrake
this.check_preventSleep.AutoSize = true;
this.check_preventSleep.Location = new System.Drawing.Point(73, 45);
this.check_preventSleep.Name = "check_preventSleep";
- this.check_preventSleep.Size = new System.Drawing.Size(260, 17);
+ this.check_preventSleep.Size = new System.Drawing.Size(266, 17);
this.check_preventSleep.TabIndex = 91;
this.check_preventSleep.Text = "Prevent the system from sleeping when encoding.";
this.ToolTip.SetToolTip(this.check_preventSleep, "Prevent system from sleeping during encoding.");
@@ -694,7 +694,7 @@ namespace Handbrake
this.check_clearOldLogs.AutoSize = true;
this.check_clearOldLogs.Location = new System.Drawing.Point(73, 234);
this.check_clearOldLogs.Name = "check_clearOldLogs";
- this.check_clearOldLogs.Size = new System.Drawing.Size(162, 17);
+ this.check_clearOldLogs.Size = new System.Drawing.Size(166, 17);
this.check_clearOldLogs.TabIndex = 90;
this.check_clearOldLogs.Text = "Clear logs older than 30 days";
this.ToolTip.SetToolTip(this.check_clearOldLogs, "Clear logs which are older than 30 days.\r\nThis only applies to HandBrakes Applica" +
@@ -789,7 +789,7 @@ namespace Handbrake
this.check_logsInSpecifiedLocation.AutoSize = true;
this.check_logsInSpecifiedLocation.Location = new System.Drawing.Point(73, 139);
this.check_logsInSpecifiedLocation.Name = "check_logsInSpecifiedLocation";
- this.check_logsInSpecifiedLocation.Size = new System.Drawing.Size(305, 17);
+ this.check_logsInSpecifiedLocation.Size = new System.Drawing.Size(306, 17);
this.check_logsInSpecifiedLocation.TabIndex = 87;
this.check_logsInSpecifiedLocation.Text = "Put a copy of individual encode logs in a specified location:";
this.ToolTip.SetToolTip(this.check_logsInSpecifiedLocation, "Place a copy of the encode log in the same folder as the encoded movie.");
diff --git a/win/CS/frmOptions.cs b/win/CS/frmOptions.cs
index 1a3fd1919..7c95eac40 100644
--- a/win/CS/frmOptions.cs
+++ b/win/CS/frmOptions.cs
@@ -12,11 +12,9 @@ namespace Handbrake
using System.Windows.Forms;
using HandBrake.ApplicationServices;
- using HandBrake.ApplicationServices.Services;
using HandBrake.ApplicationServices.Utilities;
using Handbrake.Functions;
- using Handbrake.Model;
using Handbrake.Properties;
/// <summary>
@@ -408,7 +406,7 @@ namespace Handbrake
MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
- UtilityService.ClearLogFiles(30);
+ UtilityService.ClearLogFiles(0);
MessageBox.Show(this, "HandBrake's Log file directory has been cleared!", "Notice", MessageBoxButtons.OK,
MessageBoxIcon.Information);
}