]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Sat, 19 Mar 2011 15:46:21 +0000 (15:46 +0000)
committersr55 <sr55.hb@outlook.com>
Sat, 19 Mar 2011 15:46:21 +0000 (15:46 +0000)
- Improvements to the log window code.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3850 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrake.ApplicationServices/Services/Encode.cs
win/CS/HandBrake.ApplicationServices/Services/ScanService.cs
win/CS/HandBrake.ApplicationServices/Utilities/UtilityService.cs
win/CS/Properties/Settings.Designer.cs
win/CS/Properties/Settings.settings
win/CS/app.config
win/CS/frmActivityWindow.Designer.cs
win/CS/frmActivityWindow.cs
win/CS/frmActivityWindow.resx
win/CS/frmOptions.Designer.cs
win/CS/frmOptions.cs

index 4a6333da7d9c28a2759c76312c1417fc603702d9..c7a00dda59daab3527c5f11875835533299cf7c5 100644 (file)
@@ -57,6 +57,11 @@ namespace HandBrake.ApplicationServices.Services
         /// </summary>\r
         static readonly object fileWriterLock = new object();\r
 \r
+        /// <summary>\r
+        /// The Log File Header\r
+        /// </summary>\r
+        StringBuilder header = UtilityService.CreateCliLogHeader(null);\r
+\r
         #endregion\r
 \r
         /// <summary>\r
@@ -65,6 +70,7 @@ namespace HandBrake.ApplicationServices.Services
         public Encode()\r
         {\r
             this.EncodeStarted += this.EncodeEncodeStarted;\r
+            this.logBuffer = new StringBuilder();\r
             GrowlCommunicator.Register();\r
         }\r
 \r
@@ -104,20 +110,8 @@ namespace HandBrake.ApplicationServices.Services
         public string ActivityLog\r
         {\r
             get\r
-            {\r
-                if (this.IsEncoding == false)\r
-                {\r
-                    try\r
-                    {\r
-                        ReadFile(); // Read the last log file back in if it exists\r
-                    }\r
-                    catch (Exception exc)\r
-                    {\r
-                        return exc.ToString();\r
-                    }\r
-                }\r
-\r
-                return string.IsNullOrEmpty(this.logBuffer.ToString()) ? "No log data available..." : this.logBuffer.ToString();\r
+            {   \r
+                return string.IsNullOrEmpty(this.logBuffer.ToString()) ? header + "No log data available..." : header + this.logBuffer.ToString();\r
             }\r
         }\r
 \r
@@ -395,56 +389,6 @@ namespace HandBrake.ApplicationServices.Services
                 this.EncodeCompleted(this, new EncodeCompletedEventArgs(true, null, string.Empty));\r
         }\r
 \r
-        /// <summary>\r
-        /// Read the log file\r
-        /// </summary>\r
-        private void ReadFile()\r
-        {\r
-            logBuffer = new StringBuilder();\r
-            lock (logBuffer)\r
-            {\r
-                // 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),\r
-                // we'll need to make a copy of it.\r
-                string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";\r
-                string logFile = Path.Combine(logDir, string.Format("last_encode_log{0}.txt", Init.InstanceId));\r
-                string logFile2 = Path.Combine(logDir, string.Format("tmp_appReadable_log{0}.txt", Init.InstanceId));\r
-                int logFilePosition = 0;\r
-\r
-                try\r
-                {\r
-                    // Copy the log file.\r
-                    if (File.Exists(logFile))\r
-                        File.Copy(logFile, logFile2, true);\r
-                    else\r
-                        return;\r
-\r
-                    // Start the Reader\r
-                    // Only use text which continues on from the last read line\r
-                    using (StreamReader sr = new StreamReader(logFile2))\r
-                    {\r
-                        string line;\r
-                        int i = 1;\r
-                        while ((line = sr.ReadLine()) != null)\r
-                        {\r
-                            if (i > logFilePosition)\r
-                            {\r
-                                logBuffer.AppendLine(line);\r
-                                logFilePosition++;\r
-                            }\r
-                            i++;\r
-                        }\r
-                        sr.Close();\r
-                    }\r
-                }\r
-                catch (Exception exc)\r
-                {\r
-                    logBuffer.Append(\r
-                        Environment.NewLine + "Unable to read Log file..." + Environment.NewLine + exc +\r
-                        Environment.NewLine);\r
-                }\r
-            }\r
-        }\r
-\r
         /// <summary>\r
         /// Setup the logging.\r
         /// </summary>\r
@@ -466,9 +410,7 @@ namespace HandBrake.ApplicationServices.Services
                 if (File.Exists(logFile2)) File.Delete(logFile2);\r
 \r
                 fileWriter = new StreamWriter(logFile) { AutoFlush = true };\r
-\r
                 fileWriter.WriteLine(UtilityService.CreateCliLogHeader(encodeQueueTask));\r
-                logBuffer.AppendLine(UtilityService.CreateCliLogHeader(encodeQueueTask));\r
             }\r
             catch (Exception)\r
             {\r
index 7064d935869bef02e94fd49dc5dc03f34944f0b9..091b4478ccc28c9c3219a3f82bcbb0783d53c91c 100644 (file)
@@ -24,11 +24,6 @@ namespace HandBrake.ApplicationServices.Services
     {\r
         #region Private Variables\r
 \r
-        /// <summary>\r
-        /// A Lock object\r
-        /// </summary>\r
-        private static readonly object locker = new object();\r
-\r
         /// <summary>\r
         /// The CLI data parser\r
         /// </summary>\r
@@ -40,14 +35,14 @@ namespace HandBrake.ApplicationServices.Services
         private StringBuilder logBuffer;\r
 \r
         /// <summary>\r
-        /// The line number thats been read to in the log file\r
+        /// The Process belonging to the CLI\r
         /// </summary>\r
-        private int logFilePosition;\r
+        private Process hbProc;\r
 \r
         /// <summary>\r
-        /// The Process belonging to the CLI\r
+        /// The Log File Header\r
         /// </summary>\r
-        private Process hbProc;\r
+        StringBuilder header = UtilityService.CreateCliLogHeader(null);\r
 \r
         #endregion\r
 \r
@@ -56,6 +51,7 @@ namespace HandBrake.ApplicationServices.Services
         /// </summary>\r
         public ScanService()\r
         {\r
+            this.logBuffer = new StringBuilder();\r
         }\r
 \r
         #region Events\r
@@ -96,16 +92,7 @@ namespace HandBrake.ApplicationServices.Services
         {\r
             get\r
             {\r
-                if (IsScanning)\r
-                    return readData.Buffer.ToString();\r
-\r
-                if (logBuffer == null)\r
-                {\r
-                    ResetLogReader(false);\r
-                    ReadLastScanFile();\r
-                }\r
-\r
-                return logBuffer != null ? logBuffer.ToString() : string.Empty;\r
+                return string.IsNullOrEmpty(this.logBuffer.ToString()) ? header + "No log data available..." : header + this.logBuffer.ToString();\r
             }\r
         }\r
 \r
@@ -165,7 +152,7 @@ namespace HandBrake.ApplicationServices.Services
                     this.ScanStared(this, new EventArgs());\r
                 }\r
 \r
-                ResetLogReader(true);\r
+                logBuffer = new StringBuilder();\r
 \r
                 string handbrakeCLIPath = Path.Combine(Application.StartupPath, "HandBrakeCLI.exe");\r
                 string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) +\r
@@ -263,73 +250,6 @@ namespace HandBrake.ApplicationServices.Services
             }\r
         }\r
 \r
-        /// <summary>\r
-        /// Read the log file\r
-        /// </summary>\r
-        private void ReadLastScanFile()\r
-        {\r
-            lock (locker)\r
-            {\r
-                // 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),\r
-                // we'll need to make a copy of it.\r
-                string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) +\r
-                                "\\HandBrake\\logs";\r
-                string logFile = Path.Combine(logDir, string.Format("last_scan_log{0}.txt", Init.InstanceId == 0 ? string.Empty : Init.InstanceId.ToString()));\r
-                string logFile2 = Path.Combine(logDir, string.Format("tmp_appReadable_log{0}.txt", Init.InstanceId == 0 ? string.Empty : Init.InstanceId.ToString()));\r
-\r
-                try\r
-                {\r
-                    // Make sure the application readable log file does not already exist. FileCopy fill fail if it does.\r
-                    if (File.Exists(logFile2))\r
-                        File.Delete(logFile2);\r
-\r
-                    // Copy the log file.\r
-                    if (File.Exists(logFile))\r
-                        File.Copy(logFile, logFile2, true);\r
-                    else\r
-                    {\r
-                        ResetLogReader(true);\r
-                        return;\r
-                    }\r
-\r
-                    // Start the Reader\r
-                    // Only use text which continues on from the last read line\r
-                    StreamReader sr = new StreamReader(logFile2);\r
-                    string line;\r
-                    int i = 1;\r
-                    while ((line = sr.ReadLine()) != null)\r
-                    {\r
-                        if (i > logFilePosition)\r
-                        {\r
-                            logBuffer.AppendLine(line);\r
-                            logFilePosition++;\r
-                        }\r
-                        i++;\r
-                    }\r
-                    sr.Close();\r
-                    sr.Dispose();\r
-                }\r
-                catch (Exception exc)\r
-                {\r
-                    ResetLogReader(true);\r
-                }\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Reset the Log Reader\r
-        /// </summary>\r
-        /// <param name="addHeader">\r
-        /// The add Header.\r
-        /// </param>\r
-        private void ResetLogReader(bool addHeader)\r
-        {\r
-            logFilePosition = 0;\r
-            logBuffer = new StringBuilder();\r
-            if (addHeader)\r
-                logBuffer.AppendLine(UtilityService.CreateCliLogHeader(null));\r
-        }\r
-\r
         /// <summary>\r
         /// Fire an event when the scan process progresses\r
         /// </summary>\r
index 3cddf5e0b2a1b0fe388083ee7853b92bd6796416..9485671385e796d6d4e647fdd151911665602321 100644 (file)
@@ -105,27 +105,39 @@ namespace HandBrake.ApplicationServices.Utilities
         /// <returns>\r
         /// The create cli log header.\r
         /// </returns>\r
-        public static string CreateCliLogHeader(QueueTask encJob)\r
+        public static StringBuilder CreateCliLogHeader(QueueTask encJob)\r
         {\r
             StringBuilder logHeader = new StringBuilder();\r
 \r
-            logHeader.AppendLine(String.Format("{0}", Init.HandBrakeGuiVersionString));\r
-            logHeader.AppendLine(String.Format("# Running: {0}", Environment.OSVersion));\r
-            logHeader.AppendLine(String.Format("CPU: {0}", SystemInfo.GetCpuCount));\r
-            logHeader.AppendLine(String.Format("# Ram: {0} MB", SystemInfo.TotalPhysicalMemory));\r
-            logHeader.AppendLine(String.Format("Screen: {0}x{1}", SystemInfo.ScreenBounds.Bounds.Width, SystemInfo.ScreenBounds.Bounds.Height));\r
-            logHeader.AppendLine(String.Format("Temp Dir: {0}", Path.GetTempPath()));\r
-            logHeader.AppendLine(String.Format("Install Dir: {0}", Application.StartupPath));\r
-            logHeader.AppendLine(String.Format("Data Dir: {0}\n", Application.UserAppDataPath));\r
+            logHeader.AppendLine(String.Format("{0}", Init.HandBrakeGuiVersionString));\r
+            logHeader.AppendLine(String.Format("OS: {0}", Environment.OSVersion));\r
+            logHeader.AppendLine(String.Format("CPU: {0}", SystemInfo.GetCpuCount));\r
+            logHeader.Append(String.Format("Ram: {0} MB, ", SystemInfo.TotalPhysicalMemory));\r
+            logHeader.AppendLine(String.Format("Screen: {0}x{1}", SystemInfo.ScreenBounds.Bounds.Width, SystemInfo.ScreenBounds.Bounds.Height));\r
+            logHeader.AppendLine(String.Format("Temp Dir: {0}", Path.GetTempPath()));\r
+            logHeader.AppendLine(String.Format("Install Dir: {0}", Application.StartupPath));\r
+            logHeader.AppendLine(String.Format("Data Dir: {0}\n", Application.UserAppDataPath));\r
 \r
             if (encJob != null)\r
             {\r
-                logHeader.AppendLine(String.Format("CLI Query: {0}", encJob.Query));\r
-                logHeader.AppendLine(String.Format("User Query: {0}", encJob.CustomQuery));\r
+                logHeader.AppendLine(String.Format("CLI Query: {0}", encJob.Query));\r
+                logHeader.AppendLine(String.Format("User Query: {0}", encJob.CustomQuery));\r
             }\r
             logHeader.AppendLine("-------------------------------------------");\r
 \r
-            return logHeader.ToString();\r
+            return logHeader;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Return the standard log format line of text for a given log message\r
+        /// </summary>\r
+        /// <param name="message">The Log Message</param>\r
+        /// <returns>\r
+        /// A Log Message in the format: "[hh:mm:ss] message"\r
+        /// </returns>\r
+        public static string LogLine(string message)\r
+        {\r
+            return string.Format("[{0}] {1}", DateTime.Now.TimeOfDay, message);\r
         }\r
     }\r
 }\r
index 5e1a2bfb9e1bf4c43b11376b4be90621c186def3..9adc2577fc8ba34b9117698158b6a7e0e1a367af 100644 (file)
@@ -444,7 +444,7 @@ namespace Handbrake.Properties {
         \r
         [global::System.Configuration.UserScopedSettingAttribute()]\r
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-        [global::System.Configuration.DefaultSettingValueAttribute("False")]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("True")]\r
         public bool clearOldLogs {\r
             get {\r
                 return ((bool)(this["clearOldLogs"]));\r
index 08849f0eac0eaaddf9a2537922b75a0475689223..0a2c6c7870f680d502be0c1e70743c6a8c51a84d 100644 (file)
       <Value Profile="(Default)">10</Value>\r
     </Setting>\r
     <Setting Name="clearOldLogs" Type="System.Boolean" Scope="User">\r
-      <Value Profile="(Default)">False</Value>\r
+      <Value Profile="(Default)">True</Value>\r
     </Setting>\r
     <Setting Name="showCliForInGuiEncodeStatus" Type="System.Boolean" Scope="User">\r
       <Value Profile="(Default)">False</Value>\r
index c4155cd0753678b17d493ca4148e6ed79d534b34..3b131d6ed3dbc0db5bd0174b77e99b0c139972f7 100644 (file)
         <value>10</value>\r
       </setting>\r
       <setting name="clearOldLogs" serializeAs="String">\r
-        <value>False</value>\r
+        <value>True</value>\r
       </setting>\r
       <setting name="showCliForInGuiEncodeStatus" serializeAs="String">\r
         <value>False</value>\r
index b71122f6435ae286f76110c9233ff7c1e91776ef..4344c4e87d53963f31a5bebeef946c3b9a3cfa3b 100644 (file)
@@ -44,6 +44,7 @@ namespace Handbrake
             this.toolStrip1 = new System.Windows.Forms.ToolStrip();\r
             this.btn_copy = new System.Windows.Forms.ToolStripButton();\r
             this.logSelector = new System.Windows.Forms.ToolStripComboBox();\r
+            this.btn_openLogDirectory = new System.Windows.Forms.ToolStripButton();\r
             this.panel1 = new System.Windows.Forms.Panel();\r
             this.rightClickMenu.SuspendLayout();\r
             this.toolStrip1.SuspendLayout();\r
@@ -68,7 +69,7 @@ namespace Handbrake
             this.mnu_copy_log,\r
             this.mnu_openLogFolder});\r
             this.rightClickMenu.Name = "rightClickMenu";\r
-            this.rightClickMenu.Size = new System.Drawing.Size(254, 48);\r
+            this.rightClickMenu.Size = new System.Drawing.Size(178, 48);\r
             // \r
             // mnu_copy_log\r
             // \r
@@ -82,8 +83,8 @@ namespace Handbrake
             // \r
             this.mnu_openLogFolder.Image = global::Handbrake.Properties.Resources.folder;\r
             this.mnu_openLogFolder.Name = "mnu_openLogFolder";\r
-            this.mnu_openLogFolder.Size = new System.Drawing.Size(253, 22);\r
-            this.mnu_openLogFolder.Text = "Open Individual Log File Directory";\r
+            this.mnu_openLogFolder.Size = new System.Drawing.Size(177, 22);\r
+            this.mnu_openLogFolder.Text = "Open Log Directory";\r
             this.mnu_openLogFolder.Click += new System.EventHandler(this.MnuOpenLogFolderClick);\r
             // \r
             // ToolTip\r
@@ -95,7 +96,8 @@ namespace Handbrake
             this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;\r
             this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
             this.btn_copy,\r
-            this.logSelector});\r
+            this.logSelector,\r
+            this.btn_openLogDirectory});\r
             this.toolStrip1.Location = new System.Drawing.Point(0, 0);\r
             this.toolStrip1.Name = "toolStrip1";\r
             this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;\r
@@ -109,14 +111,15 @@ namespace Handbrake
             this.btn_copy.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
             this.btn_copy.ImageTransparentColor = System.Drawing.Color.Magenta;\r
             this.btn_copy.Name = "btn_copy";\r
-            this.btn_copy.Size = new System.Drawing.Size(122, 22);\r
-            this.btn_copy.Text = "Copy to clipboard";\r
+            this.btn_copy.Size = new System.Drawing.Size(55, 22);\r
+            this.btn_copy.Text = "Copy";\r
             this.btn_copy.Click += new System.EventHandler(this.BtnCopyClick);\r
             // \r
             // logSelector\r
             // \r
             this.logSelector.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;\r
             this.logSelector.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.logSelector.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.logSelector.Items.AddRange(new object[] {\r
             "Scan Log",\r
             "Encode Log"});\r
@@ -124,6 +127,15 @@ namespace Handbrake
             this.logSelector.Size = new System.Drawing.Size(121, 25);\r
             this.logSelector.SelectedIndexChanged += new System.EventHandler(this.LogSelectorClick);\r
             // \r
+            // btn_openLogDirectory\r
+            // \r
+            this.btn_openLogDirectory.Image = global::Handbrake.Properties.Resources.folder;\r
+            this.btn_openLogDirectory.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.btn_openLogDirectory.Name = "btn_openLogDirectory";\r
+            this.btn_openLogDirectory.Size = new System.Drawing.Size(130, 22);\r
+            this.btn_openLogDirectory.Text = "Open Log Directory";\r
+            this.btn_openLogDirectory.Click += new System.EventHandler(this.btn_openLogDirectory_Click);\r
+            // \r
             // panel1\r
             // \r
             this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;\r
@@ -169,5 +181,6 @@ namespace Handbrake
         private System.Windows.Forms.ToolStripMenuItem mnu_copy_log;\r
         private System.Windows.Forms.ToolStripMenuItem mnu_openLogFolder;\r
         private System.Windows.Forms.ToolStripComboBox logSelector;\r
+        private System.Windows.Forms.ToolStripButton btn_openLogDirectory;\r
     }\r
 }
\ No newline at end of file
index b5e81ba3704d1dc89654714a55ecb07d75cb6731..c3dc5c966f979c2f4a4bbf7692e5d401ccc7dd59 100644 (file)
@@ -129,6 +129,8 @@ namespace Handbrake
                                     ? "Activity Window (Scan Log)"\r
                                     : "Activity Window (Encode Log)";\r
 \r
+                    this.logSelector.SelectedIndex = mode == ActivityLogMode.Scan ? 0 : 1;\r
+\r
                     if (mode == ActivityLogMode.Scan)\r
                     {\r
                         scan.ScanCompleted += stopWindowRefresh;\r
@@ -409,17 +411,27 @@ namespace Handbrake
         /// The e.\r
         /// </param>\r
         private void MnuOpenLogFolderClick(object sender, EventArgs e)\r
+        {\r
+            btn_openLogDirectory_Click(sender, e);\r
+        }\r
+\r
+        /// <summary>\r
+        /// Open the Log Directory\r
+        /// </summary>\r
+        /// <param name="sender">The Sender</param>\r
+        /// <param name="e">The Evennt Args</param>\r
+        private void btn_openLogDirectory_Click(object sender, EventArgs e)\r
         {\r
             string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";\r
             string windir = Environment.GetEnvironmentVariable("WINDIR");\r
             Process prc = new Process\r
-                              {\r
-                                  StartInfo =\r
-                                      {\r
-                                          FileName = windir + @"\explorer.exe",\r
-                                          Arguments = logDir\r
-                                      }\r
-                              };\r
+            {\r
+                StartInfo =\r
+                {\r
+                    FileName = windir + @"\explorer.exe",\r
+                    Arguments = logDir\r
+                }\r
+            };\r
             prc.Start();\r
         }\r
 \r
@@ -468,5 +480,7 @@ namespace Handbrake
             this.Dispose();\r
             base.OnClosing(e);\r
         }\r
+\r
+        \r
     }\r
 }
\ No newline at end of file
index ab607e8cfb7ff4eff4d75ecd548c7f762e763dc9..bc1cc8d50dc9cfd76c5c19ba7808a6dbbb7e0890 100644 (file)
     <value>2.0</value>\r
   </resheader>\r
   <resheader name="reader">\r
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
   </resheader>\r
   <resheader name="writer">\r
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
   </resheader>\r
-  <metadata name="rightClickMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+  <metadata name="rightClickMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
     <value>205, 18</value>\r
   </metadata>\r
-  <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+  <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
     <value>17, 17</value>\r
   </metadata>\r
-  <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+  <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
     <value>105, 17</value>\r
   </metadata>\r
-  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
   <data name="btn_copy.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
     <value>\r
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
index c304e4d3519318c064956e8f6826c170110cc9f0..3d44d4afe3ba0e61b49f7b256c7cb901b60fa500 100644 (file)
@@ -681,7 +681,7 @@ namespace Handbrake
             this.check_preventSleep.AutoSize = true;\r
             this.check_preventSleep.Location = new System.Drawing.Point(73, 45);\r
             this.check_preventSleep.Name = "check_preventSleep";\r
-            this.check_preventSleep.Size = new System.Drawing.Size(260, 17);\r
+            this.check_preventSleep.Size = new System.Drawing.Size(266, 17);\r
             this.check_preventSleep.TabIndex = 91;\r
             this.check_preventSleep.Text = "Prevent the system from sleeping when encoding.";\r
             this.ToolTip.SetToolTip(this.check_preventSleep, "Prevent system from sleeping during encoding.");\r
@@ -694,7 +694,7 @@ namespace Handbrake
             this.check_clearOldLogs.AutoSize = true;\r
             this.check_clearOldLogs.Location = new System.Drawing.Point(73, 234);\r
             this.check_clearOldLogs.Name = "check_clearOldLogs";\r
-            this.check_clearOldLogs.Size = new System.Drawing.Size(162, 17);\r
+            this.check_clearOldLogs.Size = new System.Drawing.Size(166, 17);\r
             this.check_clearOldLogs.TabIndex = 90;\r
             this.check_clearOldLogs.Text = "Clear logs older than 30 days";\r
             this.ToolTip.SetToolTip(this.check_clearOldLogs, "Clear logs which are older than 30 days.\r\nThis only applies to HandBrakes Applica" +\r
@@ -789,7 +789,7 @@ namespace Handbrake
             this.check_logsInSpecifiedLocation.AutoSize = true;\r
             this.check_logsInSpecifiedLocation.Location = new System.Drawing.Point(73, 139);\r
             this.check_logsInSpecifiedLocation.Name = "check_logsInSpecifiedLocation";\r
-            this.check_logsInSpecifiedLocation.Size = new System.Drawing.Size(305, 17);\r
+            this.check_logsInSpecifiedLocation.Size = new System.Drawing.Size(306, 17);\r
             this.check_logsInSpecifiedLocation.TabIndex = 87;\r
             this.check_logsInSpecifiedLocation.Text = "Put a copy of individual encode logs in a specified location:";\r
             this.ToolTip.SetToolTip(this.check_logsInSpecifiedLocation, "Place a copy of the encode log in the same folder as the encoded movie.");\r
index 1a3fd19196a8e71976b42e7e1d7a05ca9b92b96e..7c95eac4054211443518aba5608c8189aae93d49 100644 (file)
@@ -12,11 +12,9 @@ namespace Handbrake
     using System.Windows.Forms;\r
 \r
     using HandBrake.ApplicationServices;\r
-    using HandBrake.ApplicationServices.Services;\r
     using HandBrake.ApplicationServices.Utilities;\r
 \r
     using Handbrake.Functions;\r
-    using Handbrake.Model;\r
     using Handbrake.Properties;\r
 \r
     /// <summary>\r
@@ -408,7 +406,7 @@ namespace Handbrake
                                                   MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);\r
             if (result == DialogResult.Yes)\r
             {\r
-                UtilityService.ClearLogFiles(30);\r
+                UtilityService.ClearLogFiles(0);\r
                 MessageBox.Show(this, "HandBrake's Log file directory has been cleared!", "Notice", MessageBoxButtons.OK,\r
                                 MessageBoxIcon.Information);\r
             }\r