OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 16 Jan 2010 21:32:19 +0000 (21:32 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 16 Jan 2010 21:32:19 +0000 (21:32 +0000)
- Improve the In-Gui encode status option. by default, the CLI window is not completely hidden when this is set however there is an option to show it to allow "ctrl-c" clean exits.

git-svn-id: svn://localhost/HandBrake/trunk@3073 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/EncodeQueue/Encode.cs
win/C#/Functions/Main.cs
win/C#/Properties/Settings.Designer.cs
win/C#/Properties/Settings.settings
win/C#/app.config
win/C#/frmMain.Designer.cs
win/C#/frmMain.cs
win/C#/frmOptions.Designer.cs
win/C#/frmOptions.cs

index 8061bc3..9a3b426 100644 (file)
@@ -54,6 +54,8 @@ namespace Handbrake.EncodeQueue
                 {\r
                     cliStart.RedirectStandardOutput = true;\r
                     cliStart.UseShellExecute = false;\r
+                    if (!Properties.Settings.Default.showCliForInGuiEncodeStatus)\r
+                        cliStart.CreateNoWindow = true;\r
                 }\r
                 if (Properties.Settings.Default.cli_minimized)\r
                     cliStart.WindowStyle = ProcessWindowStyle.Minimized;\r
@@ -102,14 +104,19 @@ namespace Handbrake.EncodeQueue
         /// <summary>\r
         /// Kill the CLI process\r
         /// </summary>\r
-        protected void Stop()\r
+        public void Stop()\r
         {\r
-            if (EncodeEnded != null)\r
-                EncodeEnded(this, new EventArgs());\r
-\r
             if (HbProcess != null)\r
                 HbProcess.Kill();\r
+\r
+            Process[] list = Process.GetProcessesByName("HandBrakeCLI");\r
+            foreach (Process process in list)\r
+                    process.Kill();\r
+\r
             IsEncoding = false;\r
+\r
+            if (EncodeEnded != null)\r
+                EncodeEnded(this, new EventArgs());\r
         }\r
 \r
         /// <summary>\r
@@ -156,21 +163,29 @@ namespace Handbrake.EncodeQueue
         /// <param name="encJob"></param>\r
         protected void AddCLIQueryToLog(Job encJob)\r
         {\r
-            string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";\r
-            string logPath = Path.Combine(logDir, "last_encode_log.txt");\r
-\r
-            StreamReader reader = new StreamReader(File.Open(logPath, FileMode.Open, FileAccess.Read, FileShare.Read));\r
-            String log = reader.ReadToEnd();\r
-            reader.Close();\r
-\r
-            StreamWriter writer = new StreamWriter(File.Create(logPath));\r
-\r
-            writer.Write("### CLI Query: " + encJob.Query + "\n\n");\r
-            writer.Write("### User Query: " + encJob.CustomQuery + "\n\n");\r
-            writer.Write("#########################################\n\n");\r
-            writer.WriteLine(log);\r
-            writer.Flush();\r
-            writer.Close();\r
+            try\r
+            {\r
+                string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) +\r
+                                "\\HandBrake\\logs";\r
+                string logPath = Path.Combine(logDir, "last_encode_log.txt");\r
+\r
+                StreamReader reader =\r
+                    new StreamReader(File.Open(logPath, FileMode.Open, FileAccess.Read, FileShare.Read));\r
+                String log = reader.ReadToEnd();\r
+                reader.Close();\r
+\r
+                StreamWriter writer = new StreamWriter(File.Create(logPath));\r
+\r
+                writer.Write("### CLI Query: " + encJob.Query + "\n\n");\r
+                writer.Write("### User Query: " + encJob.CustomQuery + "\n\n");\r
+                writer.Write("#########################################\n\n");\r
+                writer.WriteLine(log);\r
+                writer.Flush();\r
+                writer.Close();\r
+            } catch (Exception exc)\r
+            {\r
+             \r
+            }\r
         }\r
 \r
         /// <summary>\r
index 5cdbf52..f218767 100644 (file)
@@ -205,7 +205,7 @@ namespace Handbrake.Functions
                 return;\r
 \r
             Properties.Settings.Default.cliLastModified = lastModified;\r
-            \r
+\r
             Process cliProcess = new Process();\r
             ProcessStartInfo handBrakeCLI = new ProcessStartInfo("HandBrakeCLI.exe", " -u -v0")\r
                                                 {\r
@@ -345,11 +345,36 @@ namespace Handbrake.Functions
                 {\r
                     if (!file.Name.Contains("last_scan_log") && !file.Name.Contains("last_encode_log") && !file.Name.Contains("tmp_appReadable_log.txt"))\r
                         File.Delete(file.FullName);\r
+\r
                 }\r
             }\r
         }\r
 \r
         /// <summary>\r
+        /// Clear old log files x days in the past\r
+        /// </summary>\r
+        public static void ClearOldLogs()\r
+        {\r
+            string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";\r
+            if (Directory.Exists(logDir))\r
+            {\r
+                DirectoryInfo info = new DirectoryInfo(logDir);\r
+                FileInfo[] logFiles = info.GetFiles("*.txt");\r
+\r
+                foreach (FileInfo file in logFiles)\r
+                {\r
+                    if (file.LastWriteTime < DateTime.Now.AddDays(-30))\r
+                    {\r
+                        if (!file.Name.Contains("last_scan_log") && !file.Name.Contains("last_encode_log") && !file.Name.Contains("tmp_appReadable_log.txt"))\r
+                            File.Delete(file.FullName);\r
+\r
+                    }\r
+                }\r
+            }\r
+        }\r
+\r
+\r
+        /// <summary>\r
         /// Begins checking for an update to HandBrake.\r
         /// </summary>\r
         /// <param name="callback">The method that will be called when the check is finished.</param>\r
index f97bef8..5fb2156 100644 (file)
@@ -488,5 +488,29 @@ namespace Handbrake.Properties {
                 this["previewScanCount"] = value;\r
             }\r
         }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("False")]\r
+        public bool clearOldLogs {\r
+            get {\r
+                return ((bool)(this["clearOldLogs"]));\r
+            }\r
+            set {\r
+                this["clearOldLogs"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("True")]\r
+        public bool showCliForInGuiEncodeStatus {\r
+            get {\r
+                return ((bool)(this["showCliForInGuiEncodeStatus"]));\r
+            }\r
+            set {\r
+                this["showCliForInGuiEncodeStatus"] = value;\r
+            }\r
+        }\r
     }\r
 }\r
index 264ad81..de0057e 100644 (file)
     <Setting Name="previewScanCount" Type="System.Int32" Scope="User">\r
       <Value Profile="(Default)">10</Value>\r
     </Setting>\r
+    <Setting Name="clearOldLogs" Type="System.Boolean" Scope="User">\r
+      <Value Profile="(Default)">False</Value>\r
+    </Setting>\r
+    <Setting Name="showCliForInGuiEncodeStatus" Type="System.Boolean" Scope="User">\r
+      <Value Profile="(Default)">True</Value>\r
+    </Setting>\r
   </Settings>\r
 </SettingsFile>
\ No newline at end of file
index 4be8682..4dff91b 100644 (file)
             <setting name="previewScanCount" serializeAs="String">\r
                 <value>10</value>\r
             </setting>\r
+            <setting name="clearOldLogs" serializeAs="String">\r
+                <value>False</value>\r
+            </setting>\r
+            <setting name="showCliForInGuiEncodeStatus" serializeAs="String">\r
+                <value>True</value>\r
+            </setting>\r
         </Handbrake.Properties.Settings>\r
     </userSettings>\r
 <startup><supportedRuntime version="v2.0.50727"/></startup></configuration>\r
index 1b23506..cb73f5b 100644 (file)
@@ -100,7 +100,6 @@ namespace Handbrake
             this.Label47 = new System.Windows.Forms.Label();\r
             this.Label3 = new System.Windows.Forms.Label();\r
             this.tab_audio = new System.Windows.Forms.TabPage();\r
-            this.AudioSettings = new Handbrake.Controls.AudioPanel();\r
             this.AudioMenuRowHeightHack = new System.Windows.Forms.ImageList(this.components);\r
             this.tab_video = new System.Windows.Forms.TabPage();\r
             this.lbl_qualityValue = new System.Windows.Forms.Label();\r
@@ -113,17 +112,13 @@ namespace Handbrake
             this.lbl_SliderValue = new System.Windows.Forms.Label();\r
             this.Label46 = new System.Windows.Forms.Label();\r
             this.tab_picture = new System.Windows.Forms.TabPage();\r
-            this.PictureSettings = new Handbrake.Controls.PictureSettings();\r
             this.Check_ChapterMarkers = new System.Windows.Forms.CheckBox();\r
             this.tabs_panel = new System.Windows.Forms.TabControl();\r
             this.tab_filters = new System.Windows.Forms.TabPage();\r
-            this.Filters = new Handbrake.Controls.Filters();\r
             this.tab_subtitles = new System.Windows.Forms.TabPage();\r
-            this.Subtitles = new Handbrake.Controls.Subtitles();\r
             this.tab_chapters = new System.Windows.Forms.TabPage();\r
             this.label31 = new System.Windows.Forms.Label();\r
             this.tab_advanced = new System.Windows.Forms.TabPage();\r
-            this.x264Panel = new Handbrake.Controls.x264Panel();\r
             this.tab_query = new System.Windows.Forms.TabPage();\r
             this.btn_clear = new System.Windows.Forms.Button();\r
             this.label34 = new System.Windows.Forms.Label();\r
@@ -176,6 +171,11 @@ namespace Handbrake
             this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();\r
             this.openPreset = new System.Windows.Forms.OpenFileDialog();\r
             this.File_ChapterImport = new System.Windows.Forms.OpenFileDialog();\r
+            this.PictureSettings = new Handbrake.Controls.PictureSettings();\r
+            this.Filters = new Handbrake.Controls.Filters();\r
+            this.AudioSettings = new Handbrake.Controls.AudioPanel();\r
+            this.Subtitles = new Handbrake.Controls.Subtitles();\r
+            this.x264Panel = new Handbrake.Controls.x264Panel();\r
             notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);\r
             notifyIconMenu.SuspendLayout();\r
             ((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();\r
@@ -805,15 +805,6 @@ namespace Handbrake
             this.tab_audio.Text = "Audio";\r
             this.tab_audio.UseVisualStyleBackColor = true;\r
             // \r
-            // AudioSettings\r
-            // \r
-            this.AudioSettings.BackColor = System.Drawing.Color.Transparent;\r
-            this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.AudioSettings.Location = new System.Drawing.Point(0, 0);\r
-            this.AudioSettings.Name = "AudioSettings";\r
-            this.AudioSettings.Size = new System.Drawing.Size(715, 310);\r
-            this.AudioSettings.TabIndex = 0;\r
-            // \r
             // AudioMenuRowHeightHack\r
             // \r
             this.AudioMenuRowHeightHack.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;\r
@@ -962,16 +953,6 @@ namespace Handbrake
             this.tab_picture.Text = "Picture";\r
             this.tab_picture.UseVisualStyleBackColor = true;\r
             // \r
-            // PictureSettings\r
-            // \r
-            this.PictureSettings.BackColor = System.Drawing.Color.Transparent;\r
-            this.PictureSettings.Enabled = false;\r
-            this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.PictureSettings.Location = new System.Drawing.Point(0, 0);\r
-            this.PictureSettings.Name = "PictureSettings";\r
-            this.PictureSettings.Size = new System.Drawing.Size(666, 279);\r
-            this.PictureSettings.TabIndex = 0;\r
-            // \r
             // Check_ChapterMarkers\r
             // \r
             this.Check_ChapterMarkers.AutoSize = true;\r
@@ -1011,15 +992,6 @@ namespace Handbrake
             this.tab_filters.Text = "Video Filters";\r
             this.tab_filters.UseVisualStyleBackColor = true;\r
             // \r
-            // Filters\r
-            // \r
-            this.Filters.BackColor = System.Drawing.Color.Transparent;\r
-            this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.Filters.Location = new System.Drawing.Point(0, 0);\r
-            this.Filters.Name = "Filters";\r
-            this.Filters.Size = new System.Drawing.Size(713, 310);\r
-            this.Filters.TabIndex = 0;\r
-            // \r
             // tab_subtitles\r
             // \r
             this.tab_subtitles.Controls.Add(this.Subtitles);\r
@@ -1031,15 +1003,6 @@ namespace Handbrake
             this.tab_subtitles.Text = "Subtitles";\r
             this.tab_subtitles.UseVisualStyleBackColor = true;\r
             // \r
-            // Subtitles\r
-            // \r
-            this.Subtitles.BackColor = System.Drawing.Color.Transparent;\r
-            this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.Subtitles.Location = new System.Drawing.Point(0, 0);\r
-            this.Subtitles.Name = "Subtitles";\r
-            this.Subtitles.Size = new System.Drawing.Size(722, 310);\r
-            this.Subtitles.TabIndex = 0;\r
-            // \r
             // tab_chapters\r
             // \r
             this.tab_chapters.BackColor = System.Drawing.Color.Transparent;\r
@@ -1077,16 +1040,6 @@ namespace Handbrake
             this.tab_advanced.Text = "Advanced";\r
             this.tab_advanced.UseVisualStyleBackColor = true;\r
             // \r
-            // x264Panel\r
-            // \r
-            this.x264Panel.BackColor = System.Drawing.Color.Transparent;\r
-            this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.x264Panel.Location = new System.Drawing.Point(0, 0);\r
-            this.x264Panel.Name = "x264Panel";\r
-            this.x264Panel.Size = new System.Drawing.Size(720, 306);\r
-            this.x264Panel.TabIndex = 0;\r
-            this.x264Panel.x264Query = "";\r
-            // \r
             // tab_query\r
             // \r
             this.tab_query.Controls.Add(this.btn_clear);\r
@@ -1651,6 +1604,54 @@ namespace Handbrake
             // \r
             this.File_ChapterImport.Filter = "CSV Files|*.csv";\r
             // \r
+            // PictureSettings\r
+            // \r
+            this.PictureSettings.BackColor = System.Drawing.Color.Transparent;\r
+            this.PictureSettings.CurrentlySelectedPreset = null;\r
+            this.PictureSettings.Enabled = false;\r
+            this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.PictureSettings.Location = new System.Drawing.Point(0, 0);\r
+            this.PictureSettings.Name = "PictureSettings";\r
+            this.PictureSettings.Size = new System.Drawing.Size(666, 279);\r
+            this.PictureSettings.TabIndex = 0;\r
+            // \r
+            // Filters\r
+            // \r
+            this.Filters.BackColor = System.Drawing.Color.Transparent;\r
+            this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Filters.Location = new System.Drawing.Point(0, 0);\r
+            this.Filters.Name = "Filters";\r
+            this.Filters.Size = new System.Drawing.Size(713, 310);\r
+            this.Filters.TabIndex = 0;\r
+            // \r
+            // AudioSettings\r
+            // \r
+            this.AudioSettings.BackColor = System.Drawing.Color.Transparent;\r
+            this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.AudioSettings.Location = new System.Drawing.Point(0, 0);\r
+            this.AudioSettings.Name = "AudioSettings";\r
+            this.AudioSettings.Size = new System.Drawing.Size(715, 310);\r
+            this.AudioSettings.TabIndex = 0;\r
+            // \r
+            // Subtitles\r
+            // \r
+            this.Subtitles.BackColor = System.Drawing.Color.Transparent;\r
+            this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Subtitles.Location = new System.Drawing.Point(0, 0);\r
+            this.Subtitles.Name = "Subtitles";\r
+            this.Subtitles.Size = new System.Drawing.Size(722, 310);\r
+            this.Subtitles.TabIndex = 0;\r
+            // \r
+            // x264Panel\r
+            // \r
+            this.x264Panel.BackColor = System.Drawing.Color.Transparent;\r
+            this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.x264Panel.Location = new System.Drawing.Point(0, 0);\r
+            this.x264Panel.Name = "x264Panel";\r
+            this.x264Panel.Size = new System.Drawing.Size(720, 306);\r
+            this.x264Panel.TabIndex = 0;\r
+            this.x264Panel.x264Query = "";\r
+            // \r
             // frmMain\r
             // \r
             this.AllowDrop = true;\r
index 4d45b7f..fc8728f 100644 (file)
@@ -81,6 +81,15 @@ namespace Handbrake
                 }\r
             }\r
 \r
+            // Clear the log files in the background\r
+            if (Properties.Settings.Default.clearOldLogs)\r
+            {\r
+                lblStatus.Text = "Clearing Old Log Files ...";\r
+                Application.DoEvents();\r
+                Thread clearLog = new Thread(Main.ClearOldLogs);\r
+                clearLog.Start();\r
+            }\r
+\r
             // Setup the GUI components\r
             lblStatus.Text = "Setting up the GUI ...";\r
             Application.DoEvents();\r
@@ -102,14 +111,11 @@ namespace Handbrake
 \r
                     if (query != null)\r
                     {\r
-                        //Ok, Reset all the H264 widgets before changing the preset\r
                         x264Panel.reset2Defaults();\r
 \r
-                        // Send the query from the file to the Query Parser class, then load the preset\r
                         QueryParser presetQuery = QueryParser.Parse(query);\r
                         PresetLoader.presetLoader(this, presetQuery, Properties.Settings.Default.defaultPreset, loadPictureSettings);\r
 \r
-                        // The x264 widgets will need updated, so do this now:\r
                         x264Panel.X264_StandardizeOptString();\r
                         x264Panel.X264_SetCurrentSettingsInPanel();\r
                     }\r
@@ -663,16 +669,31 @@ namespace Handbrake
         {\r
             if (btn_start.Text == "Stop")\r
             {\r
-                DialogResult result = MessageBox.Show("Are you sure you wish to cancel the encode?", "Cancel Encode?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
+                DialogResult result;\r
+                if (Properties.Settings.Default.enocdeStatusInGui && !Properties.Settings.Default.showCliForInGuiEncodeStatus)\r
+                    result = MessageBox.Show("Are you sure you wish to cancel the encode?\n\nPlease note, when 'Enable in-GUI encode status' is enabled, stopping this encode will render the file unplayable. ",\r
+                        "Cancel Encode?",MessageBoxButtons.YesNo,MessageBoxIcon.Question);\r
+                else\r
+                    result = MessageBox.Show("Are you sure you wish to cancel the encode?", "Cancel Encode?",\r
+                        MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
 \r
                 if (result == DialogResult.Yes)\r
                 {\r
                     // Pause The Queue\r
                     encodeQueue.Pause();\r
 \r
-                    // Allow the CLI to exit cleanly\r
-                    Win32.SetForegroundWindow((int)encodeQueue.ProcessHandle);\r
-                    SendKeys.Send("^C");\r
+                    if (Properties.Settings.Default.enocdeStatusInGui && !Properties.Settings.Default.showCliForInGuiEncodeStatus)\r
+                    {\r
+                        encodeQueue.Stop();\r
+                        if (encodeQueue.HbProcess != null)\r
+                            encodeQueue.HbProcess.WaitForExit();\r
+                    }\r
+                    else\r
+                    {\r
+                        // Allow the CLI to exit cleanly\r
+                        Win32.SetForegroundWindow((int) encodeQueue.ProcessHandle);\r
+                        SendKeys.Send("^C");\r
+                    }\r
 \r
                     // Update the GUI\r
                     setEncodeFinished();\r
@@ -1845,11 +1866,6 @@ namespace Handbrake
 \r
         }\r
 \r
-        private void UpdateGuiWithQueueItemAfterScan()\r
-        {\r
-            \r
-        }\r
-\r
         // This is the END of the road ****************************************\r
     }\r
 }
\ No newline at end of file
index 580b646..554351c 100644 (file)
@@ -68,22 +68,22 @@ namespace Handbrake
             this.drop_preferredLang = new System.Windows.Forms.ComboBox();\r
             this.radio_dub = new System.Windows.Forms.RadioButton();\r
             this.tab_cli = new System.Windows.Forms.TabPage();\r
-            this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();\r
+            this.check_clearOldLogs = new System.Windows.Forms.CheckBox();\r
             this.label12 = new System.Windows.Forms.Label();\r
             this.check_cli_minimized = new System.Windows.Forms.CheckBox();\r
+            this.btn_viewLogs = new System.Windows.Forms.Button();\r
+            this.drp_processors = new System.Windows.Forms.ComboBox();\r
+            this.Label11 = new System.Windows.Forms.Label();\r
             this.label9 = new System.Windows.Forms.Label();\r
-            this.btn_saveLog = new System.Windows.Forms.Button();\r
+            this.Label4 = new System.Windows.Forms.Label();\r
+            this.btn_clearLogs = new System.Windows.Forms.Button();\r
+            this.drp_Priority = new System.Windows.Forms.ComboBox();\r
             this.check_logsInSpecifiedLocation = new System.Windows.Forms.CheckBox();\r
-            this.Label11 = new System.Windows.Forms.Label();\r
             this.check_saveLogWithVideo = new System.Windows.Forms.CheckBox();\r
-            this.Label4 = new System.Windows.Forms.Label();\r
             this.label3 = new System.Windows.Forms.Label();\r
-            this.text_logPath = new System.Windows.Forms.TextBox();\r
+            this.btn_saveLog = new System.Windows.Forms.Button();\r
             this.cb_logVerboseLvl = new System.Windows.Forms.ComboBox();\r
-            this.drp_Priority = new System.Windows.Forms.ComboBox();\r
-            this.drp_processors = new System.Windows.Forms.ComboBox();\r
-            this.btn_viewLogs = new System.Windows.Forms.Button();\r
-            this.btn_clearLogs = new System.Windows.Forms.Button();\r
+            this.text_logPath = new System.Windows.Forms.TextBox();\r
             this.label14 = new System.Windows.Forms.Label();\r
             this.tab_advanced = new System.Windows.Forms.TabPage();\r
             this.drop_previewScanCount = new System.Windows.Forms.ComboBox();\r
@@ -136,13 +136,13 @@ namespace Handbrake
             this.label27 = new System.Windows.Forms.Label();\r
             this.openFile_vlc = new System.Windows.Forms.OpenFileDialog();\r
             this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel();\r
+            this.check_showCliForInGUIEncode = new System.Windows.Forms.CheckBox();\r
             this.tab_options.SuspendLayout();\r
             this.tab_general.SuspendLayout();\r
             this.tab_picture.SuspendLayout();\r
             this.tableLayoutPanel2.SuspendLayout();\r
             this.tab_audio_sub.SuspendLayout();\r
             this.tab_cli.SuspendLayout();\r
-            this.tableLayoutPanel3.SuspendLayout();\r
             this.tab_advanced.SuspendLayout();\r
             this.tab_debug.SuspendLayout();\r
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();\r
@@ -578,7 +578,23 @@ namespace Handbrake
             // \r
             // tab_cli\r
             // \r
-            this.tab_cli.Controls.Add(this.tableLayoutPanel3);\r
+            this.tab_cli.Controls.Add(this.check_clearOldLogs);\r
+            this.tab_cli.Controls.Add(this.label12);\r
+            this.tab_cli.Controls.Add(this.check_cli_minimized);\r
+            this.tab_cli.Controls.Add(this.btn_viewLogs);\r
+            this.tab_cli.Controls.Add(this.drp_processors);\r
+            this.tab_cli.Controls.Add(this.Label11);\r
+            this.tab_cli.Controls.Add(this.label9);\r
+            this.tab_cli.Controls.Add(this.Label4);\r
+            this.tab_cli.Controls.Add(this.btn_clearLogs);\r
+            this.tab_cli.Controls.Add(this.drp_Priority);\r
+            this.tab_cli.Controls.Add(this.check_logsInSpecifiedLocation);\r
+            this.tab_cli.Controls.Add(this.check_saveLogWithVideo);\r
+            this.tab_cli.Controls.Add(this.label3);\r
+            this.tab_cli.Controls.Add(this.btn_saveLog);\r
+            this.tab_cli.Controls.Add(this.cb_logVerboseLvl);\r
+            this.tab_cli.Controls.Add(this.text_logPath);\r
+            this.tab_cli.Controls.Add(this.label14);\r
             this.tab_cli.Location = new System.Drawing.Point(4, 22);\r
             this.tab_cli.Name = "tab_cli";\r
             this.tab_cli.Padding = new System.Windows.Forms.Padding(10);\r
@@ -587,59 +603,28 @@ namespace Handbrake
             this.tab_cli.Text = "CLI";\r
             this.tab_cli.UseVisualStyleBackColor = true;\r
             // \r
-            // tableLayoutPanel3\r
-            // \r
-            this.tableLayoutPanel3.AutoSize = true;\r
-            this.tableLayoutPanel3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\r
-            this.tableLayoutPanel3.ColumnCount = 7;\r
-            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\r
-            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));\r
-            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\r
-            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\r
-            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\r
-            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));\r
-            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\r
-            this.tableLayoutPanel3.Controls.Add(this.label12, 0, 0);\r
-            this.tableLayoutPanel3.Controls.Add(this.check_cli_minimized, 2, 0);\r
-            this.tableLayoutPanel3.Controls.Add(this.label9, 0, 4);\r
-            this.tableLayoutPanel3.Controls.Add(this.btn_saveLog, 6, 7);\r
-            this.tableLayoutPanel3.Controls.Add(this.check_logsInSpecifiedLocation, 2, 6);\r
-            this.tableLayoutPanel3.Controls.Add(this.Label11, 2, 1);\r
-            this.tableLayoutPanel3.Controls.Add(this.check_saveLogWithVideo, 2, 5);\r
-            this.tableLayoutPanel3.Controls.Add(this.Label4, 2, 2);\r
-            this.tableLayoutPanel3.Controls.Add(this.label3, 2, 4);\r
-            this.tableLayoutPanel3.Controls.Add(this.text_logPath, 3, 7);\r
-            this.tableLayoutPanel3.Controls.Add(this.cb_logVerboseLvl, 3, 4);\r
-            this.tableLayoutPanel3.Controls.Add(this.drp_Priority, 3, 2);\r
-            this.tableLayoutPanel3.Controls.Add(this.drp_processors, 3, 1);\r
-            this.tableLayoutPanel3.Controls.Add(this.btn_viewLogs, 2, 8);\r
-            this.tableLayoutPanel3.Controls.Add(this.btn_clearLogs, 4, 8);\r
-            this.tableLayoutPanel3.Controls.Add(this.label14, 2, 7);\r
-            this.tableLayoutPanel3.Location = new System.Drawing.Point(10, 10);\r
-            this.tableLayoutPanel3.Name = "tableLayoutPanel3";\r
-            this.tableLayoutPanel3.RowCount = 10;\r
-            this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));\r
-            this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.tableLayoutPanel3.Size = new System.Drawing.Size(560, 227);\r
-            this.tableLayoutPanel3.TabIndex = 62;\r
+            // check_clearOldLogs\r
+            // \r
+            this.check_clearOldLogs.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
+            this.check_clearOldLogs.AutoSize = true;\r
+            this.check_clearOldLogs.Location = new System.Drawing.Point(73, 265);\r
+            this.check_clearOldLogs.Name = "check_clearOldLogs";\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
+                    "tion Data Log folder.");\r
+            this.check_clearOldLogs.UseVisualStyleBackColor = true;\r
+            this.check_clearOldLogs.CheckedChanged += new System.EventHandler(this.check_clearOldLogs_CheckedChanged);\r
             // \r
             // label12\r
             // \r
             this.label12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\r
             this.label12.AutoSize = true;\r
             this.label12.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label12.Location = new System.Drawing.Point(11, 5);\r
+            this.label12.Location = new System.Drawing.Point(15, 15);\r
             this.label12.Margin = new System.Windows.Forms.Padding(3, 5, 3, 0);\r
             this.label12.Name = "label12";\r
-            this.tableLayoutPanel3.SetRowSpan(this.label12, 2);\r
             this.label12.Size = new System.Drawing.Size(28, 13);\r
             this.label12.TabIndex = 75;\r
             this.label12.Text = "CLI:";\r
@@ -648,8 +633,7 @@ namespace Handbrake
             // \r
             this.check_cli_minimized.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
             this.check_cli_minimized.AutoSize = true;\r
-            this.tableLayoutPanel3.SetColumnSpan(this.check_cli_minimized, 5);\r
-            this.check_cli_minimized.Location = new System.Drawing.Point(65, 3);\r
+            this.check_cli_minimized.Location = new System.Drawing.Point(73, 14);\r
             this.check_cli_minimized.Name = "check_cli_minimized";\r
             this.check_cli_minimized.Size = new System.Drawing.Size(137, 17);\r
             this.check_cli_minimized.TabIndex = 76;\r
@@ -658,39 +642,114 @@ namespace Handbrake
             this.check_cli_minimized.UseVisualStyleBackColor = true;\r
             this.check_cli_minimized.CheckedChanged += new System.EventHandler(this.check_cli_minimized_CheckedChanged);\r
             // \r
+            // btn_viewLogs\r
+            // \r
+            this.btn_viewLogs.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
+            this.btn_viewLogs.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_viewLogs.ForeColor = System.Drawing.Color.DarkOrange;\r
+            this.btn_viewLogs.Location = new System.Drawing.Point(129, 227);\r
+            this.btn_viewLogs.Name = "btn_viewLogs";\r
+            this.btn_viewLogs.Size = new System.Drawing.Size(139, 23);\r
+            this.btn_viewLogs.TabIndex = 89;\r
+            this.btn_viewLogs.Text = "View Log Directory";\r
+            this.btn_viewLogs.UseVisualStyleBackColor = true;\r
+            this.btn_viewLogs.Click += new System.EventHandler(this.btn_viewLogs_Click);\r
+            // \r
+            // drp_processors\r
+            // \r
+            this.drp_processors.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
+            this.drp_processors.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drp_processors.FormattingEnabled = true;\r
+            this.drp_processors.Items.AddRange(new object[] {\r
+            "Automatic",\r
+            "1",\r
+            "2",\r
+            "3",\r
+            "4",\r
+            "5",\r
+            "6",\r
+            "7",\r
+            "8"});\r
+            this.drp_processors.Location = new System.Drawing.Point(177, 69);\r
+            this.drp_processors.Name = "drp_processors";\r
+            this.drp_processors.Size = new System.Drawing.Size(111, 21);\r
+            this.drp_processors.TabIndex = 41;\r
+            this.ToolTip.SetToolTip(this.drp_processors, "The number of processor\'s / processor cores. Unless your having problems, leave o" +\r
+                    "n Automatic.");\r
+            this.drp_processors.SelectedIndexChanged += new System.EventHandler(this.drp_processors_SelectedIndexChanged);\r
+            // \r
+            // Label11\r
+            // \r
+            this.Label11.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
+            this.Label11.AutoSize = true;\r
+            this.Label11.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label11.Location = new System.Drawing.Point(70, 45);\r
+            this.Label11.Name = "Label11";\r
+            this.Label11.Size = new System.Drawing.Size(87, 13);\r
+            this.Label11.TabIndex = 40;\r
+            this.Label11.Text = "Processor cores:";\r
+            // \r
             // label9\r
             // \r
             this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\r
             this.label9.AutoSize = true;\r
             this.label9.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label9.Location = new System.Drawing.Point(3, 102);\r
+            this.label9.Location = new System.Drawing.Point(7, 123);\r
             this.label9.Margin = new System.Windows.Forms.Padding(3, 5, 3, 0);\r
             this.label9.Name = "label9";\r
-            this.tableLayoutPanel3.SetRowSpan(this.label9, 2);\r
             this.label9.Size = new System.Drawing.Size(36, 13);\r
             this.label9.TabIndex = 77;\r
             this.label9.Text = "Logs:";\r
             // \r
-            // btn_saveLog\r
+            // Label4\r
             // \r
-            this.btn_saveLog.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
-            this.btn_saveLog.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
-            this.btn_saveLog.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.btn_saveLog.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
-            this.btn_saveLog.Location = new System.Drawing.Point(480, 173);\r
-            this.btn_saveLog.Name = "btn_saveLog";\r
-            this.btn_saveLog.Size = new System.Drawing.Size(77, 22);\r
-            this.btn_saveLog.TabIndex = 82;\r
-            this.btn_saveLog.Text = "Browse";\r
-            this.btn_saveLog.UseVisualStyleBackColor = true;\r
-            this.btn_saveLog.Click += new System.EventHandler(this.btn_saveLog_Click);\r
+            this.Label4.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
+            this.Label4.AutoSize = true;\r
+            this.Label4.BackColor = System.Drawing.Color.Transparent;\r
+            this.Label4.Location = new System.Drawing.Point(70, 72);\r
+            this.Label4.Name = "Label4";\r
+            this.Label4.Size = new System.Drawing.Size(70, 13);\r
+            this.Label4.TabIndex = 42;\r
+            this.Label4.Text = "Priority level:";\r
+            // \r
+            // btn_clearLogs\r
+            // \r
+            this.btn_clearLogs.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
+            this.btn_clearLogs.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_clearLogs.ForeColor = System.Drawing.Color.DarkOrange;\r
+            this.btn_clearLogs.Location = new System.Drawing.Point(274, 227);\r
+            this.btn_clearLogs.Name = "btn_clearLogs";\r
+            this.btn_clearLogs.Size = new System.Drawing.Size(135, 23);\r
+            this.btn_clearLogs.TabIndex = 88;\r
+            this.btn_clearLogs.Text = "Clear Log History";\r
+            this.btn_clearLogs.UseVisualStyleBackColor = true;\r
+            this.btn_clearLogs.Click += new System.EventHandler(this.btn_clearLogs_Click);\r
+            // \r
+            // drp_Priority\r
+            // \r
+            this.drp_Priority.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
+            this.drp_Priority.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.drp_Priority.FormattingEnabled = true;\r
+            this.drp_Priority.Items.AddRange(new object[] {\r
+            "Realtime",\r
+            "High",\r
+            "Above Normal",\r
+            "Normal",\r
+            "Below Normal",\r
+            "Low"});\r
+            this.drp_Priority.Location = new System.Drawing.Point(177, 42);\r
+            this.drp_Priority.Name = "drp_Priority";\r
+            this.drp_Priority.Size = new System.Drawing.Size(111, 21);\r
+            this.drp_Priority.TabIndex = 43;\r
+            this.ToolTip.SetToolTip(this.drp_Priority, "Set the application priority level for the CLI. \r\nIt\'s best to leave this on Belo" +\r
+                    "w Normal if you wish to use your system whilst encoding with HandBrake.\r\n");\r
+            this.drp_Priority.SelectedIndexChanged += new System.EventHandler(this.drp_Priority_SelectedIndexChanged);\r
             // \r
             // check_logsInSpecifiedLocation\r
             // \r
             this.check_logsInSpecifiedLocation.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
             this.check_logsInSpecifiedLocation.AutoSize = true;\r
-            this.tableLayoutPanel3.SetColumnSpan(this.check_logsInSpecifiedLocation, 5);\r
-            this.check_logsInSpecifiedLocation.Location = new System.Drawing.Point(65, 150);\r
+            this.check_logsInSpecifiedLocation.Location = new System.Drawing.Point(73, 170);\r
             this.check_logsInSpecifiedLocation.Name = "check_logsInSpecifiedLocation";\r
             this.check_logsInSpecifiedLocation.Size = new System.Drawing.Size(306, 17);\r
             this.check_logsInSpecifiedLocation.TabIndex = 87;\r
@@ -699,23 +758,11 @@ namespace Handbrake
             this.check_logsInSpecifiedLocation.UseVisualStyleBackColor = true;\r
             this.check_logsInSpecifiedLocation.CheckedChanged += new System.EventHandler(this.check_logsInSpecifiedLocation_CheckedChanged);\r
             // \r
-            // Label11\r
-            // \r
-            this.Label11.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
-            this.Label11.AutoSize = true;\r
-            this.Label11.BackColor = System.Drawing.Color.Transparent;\r
-            this.Label11.Location = new System.Drawing.Point(65, 30);\r
-            this.Label11.Name = "Label11";\r
-            this.Label11.Size = new System.Drawing.Size(87, 13);\r
-            this.Label11.TabIndex = 40;\r
-            this.Label11.Text = "Processor cores:";\r
-            // \r
             // check_saveLogWithVideo\r
             // \r
             this.check_saveLogWithVideo.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
             this.check_saveLogWithVideo.AutoSize = true;\r
-            this.tableLayoutPanel3.SetColumnSpan(this.check_saveLogWithVideo, 5);\r
-            this.check_saveLogWithVideo.Location = new System.Drawing.Point(65, 127);\r
+            this.check_saveLogWithVideo.Location = new System.Drawing.Point(73, 147);\r
             this.check_saveLogWithVideo.Name = "check_saveLogWithVideo";\r
             this.check_saveLogWithVideo.Size = new System.Drawing.Size(382, 17);\r
             this.check_saveLogWithVideo.TabIndex = 83;\r
@@ -724,133 +771,62 @@ namespace Handbrake
             this.check_saveLogWithVideo.UseVisualStyleBackColor = true;\r
             this.check_saveLogWithVideo.CheckedChanged += new System.EventHandler(this.check_saveLogWithVideo_CheckedChanged);\r
             // \r
-            // Label4\r
-            // \r
-            this.Label4.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
-            this.Label4.AutoSize = true;\r
-            this.Label4.BackColor = System.Drawing.Color.Transparent;\r
-            this.Label4.Location = new System.Drawing.Point(65, 57);\r
-            this.Label4.Name = "Label4";\r
-            this.Label4.Size = new System.Drawing.Size(70, 13);\r
-            this.Label4.TabIndex = 42;\r
-            this.Label4.Text = "Priority level:";\r
-            // \r
             // label3\r
             // \r
             this.label3.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
             this.label3.AutoSize = true;\r
             this.label3.BackColor = System.Drawing.Color.Transparent;\r
-            this.label3.Location = new System.Drawing.Point(65, 104);\r
+            this.label3.Location = new System.Drawing.Point(70, 123);\r
             this.label3.Name = "label3";\r
             this.label3.Size = new System.Drawing.Size(101, 13);\r
             this.label3.TabIndex = 85;\r
             this.label3.Text = "Log verbosity level:";\r
             // \r
-            // text_logPath\r
+            // btn_saveLog\r
             // \r
-            this.text_logPath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));\r
-            this.tableLayoutPanel3.SetColumnSpan(this.text_logPath, 3);\r
-            this.text_logPath.Location = new System.Drawing.Point(172, 173);\r
-            this.text_logPath.Name = "text_logPath";\r
-            this.text_logPath.Size = new System.Drawing.Size(302, 21);\r
-            this.text_logPath.TabIndex = 80;\r
-            this.ToolTip.SetToolTip(this.text_logPath, "The default location where auto named files are stored.");\r
-            this.text_logPath.TextChanged += new System.EventHandler(this.text_logPath_TextChanged);\r
+            this.btn_saveLog.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
+            this.btn_saveLog.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
+            this.btn_saveLog.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.btn_saveLog.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
+            this.btn_saveLog.Location = new System.Drawing.Point(437, 200);\r
+            this.btn_saveLog.Name = "btn_saveLog";\r
+            this.btn_saveLog.Size = new System.Drawing.Size(77, 22);\r
+            this.btn_saveLog.TabIndex = 82;\r
+            this.btn_saveLog.Text = "Browse";\r
+            this.btn_saveLog.UseVisualStyleBackColor = true;\r
+            this.btn_saveLog.Click += new System.EventHandler(this.btn_saveLog_Click);\r
             // \r
             // cb_logVerboseLvl\r
             // \r
             this.cb_logVerboseLvl.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
-            this.tableLayoutPanel3.SetColumnSpan(this.cb_logVerboseLvl, 4);\r
             this.cb_logVerboseLvl.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
             this.cb_logVerboseLvl.FormattingEnabled = true;\r
             this.cb_logVerboseLvl.Items.AddRange(new object[] {\r
             "0",\r
             "1",\r
             "2"});\r
-            this.cb_logVerboseLvl.Location = new System.Drawing.Point(172, 100);\r
+            this.cb_logVerboseLvl.Location = new System.Drawing.Point(177, 120);\r
             this.cb_logVerboseLvl.Name = "cb_logVerboseLvl";\r
             this.cb_logVerboseLvl.Size = new System.Drawing.Size(111, 21);\r
             this.cb_logVerboseLvl.TabIndex = 86;\r
             this.ToolTip.SetToolTip(this.cb_logVerboseLvl, "Activity Log Verbosity Level");\r
             this.cb_logVerboseLvl.SelectedIndexChanged += new System.EventHandler(this.cb_logVerboseLvl_SelectedIndexChanged);\r
             // \r
-            // drp_Priority\r
-            // \r
-            this.drp_Priority.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
-            this.tableLayoutPanel3.SetColumnSpan(this.drp_Priority, 4);\r
-            this.drp_Priority.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
-            this.drp_Priority.FormattingEnabled = true;\r
-            this.drp_Priority.Items.AddRange(new object[] {\r
-            "Realtime",\r
-            "High",\r
-            "Above Normal",\r
-            "Normal",\r
-            "Below Normal",\r
-            "Low"});\r
-            this.drp_Priority.Location = new System.Drawing.Point(172, 53);\r
-            this.drp_Priority.Name = "drp_Priority";\r
-            this.drp_Priority.Size = new System.Drawing.Size(111, 21);\r
-            this.drp_Priority.TabIndex = 43;\r
-            this.ToolTip.SetToolTip(this.drp_Priority, "Set the application priority level for the CLI. \r\nIt\'s best to leave this on Belo" +\r
-                    "w Normal if you wish to use your system whilst encoding with HandBrake.\r\n");\r
-            this.drp_Priority.SelectedIndexChanged += new System.EventHandler(this.drp_Priority_SelectedIndexChanged);\r
-            // \r
-            // drp_processors\r
-            // \r
-            this.drp_processors.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
-            this.tableLayoutPanel3.SetColumnSpan(this.drp_processors, 4);\r
-            this.drp_processors.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
-            this.drp_processors.FormattingEnabled = true;\r
-            this.drp_processors.Items.AddRange(new object[] {\r
-            "Automatic",\r
-            "1",\r
-            "2",\r
-            "3",\r
-            "4",\r
-            "5",\r
-            "6",\r
-            "7",\r
-            "8"});\r
-            this.drp_processors.Location = new System.Drawing.Point(172, 26);\r
-            this.drp_processors.Name = "drp_processors";\r
-            this.drp_processors.Size = new System.Drawing.Size(111, 21);\r
-            this.drp_processors.TabIndex = 41;\r
-            this.ToolTip.SetToolTip(this.drp_processors, "The number of processor\'s / processor cores. Unless your having problems, leave o" +\r
-                    "n Automatic.");\r
-            this.drp_processors.SelectedIndexChanged += new System.EventHandler(this.drp_processors_SelectedIndexChanged);\r
-            // \r
-            // btn_viewLogs\r
-            // \r
-            this.btn_viewLogs.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
-            this.tableLayoutPanel3.SetColumnSpan(this.btn_viewLogs, 2);\r
-            this.btn_viewLogs.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.btn_viewLogs.ForeColor = System.Drawing.Color.DarkOrange;\r
-            this.btn_viewLogs.Location = new System.Drawing.Point(65, 201);\r
-            this.btn_viewLogs.Name = "btn_viewLogs";\r
-            this.btn_viewLogs.Size = new System.Drawing.Size(139, 23);\r
-            this.btn_viewLogs.TabIndex = 89;\r
-            this.btn_viewLogs.Text = "View Log Directory";\r
-            this.btn_viewLogs.UseVisualStyleBackColor = true;\r
-            this.btn_viewLogs.Click += new System.EventHandler(this.btn_viewLogs_Click);\r
-            // \r
-            // btn_clearLogs\r
+            // text_logPath\r
             // \r
-            this.btn_clearLogs.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
-            this.btn_clearLogs.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.btn_clearLogs.ForeColor = System.Drawing.Color.DarkOrange;\r
-            this.btn_clearLogs.Location = new System.Drawing.Point(210, 201);\r
-            this.btn_clearLogs.Name = "btn_clearLogs";\r
-            this.btn_clearLogs.Size = new System.Drawing.Size(135, 23);\r
-            this.btn_clearLogs.TabIndex = 88;\r
-            this.btn_clearLogs.Text = "Clear Log History";\r
-            this.btn_clearLogs.UseVisualStyleBackColor = true;\r
-            this.btn_clearLogs.Click += new System.EventHandler(this.btn_clearLogs_Click);\r
+            this.text_logPath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));\r
+            this.text_logPath.Location = new System.Drawing.Point(129, 200);\r
+            this.text_logPath.Name = "text_logPath";\r
+            this.text_logPath.Size = new System.Drawing.Size(302, 21);\r
+            this.text_logPath.TabIndex = 80;\r
+            this.ToolTip.SetToolTip(this.text_logPath, "The default location where auto named files are stored.");\r
+            this.text_logPath.TextChanged += new System.EventHandler(this.text_logPath_TextChanged);\r
             // \r
             // label14\r
             // \r
             this.label14.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
             this.label14.AutoSize = true;\r
-            this.label14.Location = new System.Drawing.Point(65, 177);\r
+            this.label14.Location = new System.Drawing.Point(70, 203);\r
             this.label14.Name = "label14";\r
             this.label14.Size = new System.Drawing.Size(53, 13);\r
             this.label14.TabIndex = 81;\r
@@ -858,6 +834,7 @@ namespace Handbrake
             // \r
             // tab_advanced\r
             // \r
+            this.tab_advanced.Controls.Add(this.check_showCliForInGUIEncode);\r
             this.tab_advanced.Controls.Add(this.drop_previewScanCount);\r
             this.tab_advanced.Controls.Add(this.label33);\r
             this.tab_advanced.Controls.Add(this.label6);\r
@@ -890,7 +867,7 @@ namespace Handbrake
             "20",\r
             "25",\r
             "30"});\r
-            this.drop_previewScanCount.Location = new System.Drawing.Point(273, 155);\r
+            this.drop_previewScanCount.Location = new System.Drawing.Point(273, 173);\r
             this.drop_previewScanCount.Name = "drop_previewScanCount";\r
             this.drop_previewScanCount.Size = new System.Drawing.Size(85, 21);\r
             this.drop_previewScanCount.TabIndex = 95;\r
@@ -902,7 +879,7 @@ namespace Handbrake
             // \r
             this.label33.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
             this.label33.AutoSize = true;\r
-            this.label33.Location = new System.Drawing.Point(79, 158);\r
+            this.label33.Location = new System.Drawing.Point(79, 176);\r
             this.label33.Name = "label33";\r
             this.label33.Size = new System.Drawing.Size(181, 13);\r
             this.label33.TabIndex = 94;\r
@@ -968,7 +945,7 @@ namespace Handbrake
             this.check_dvdnav.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
             this.check_dvdnav.AutoSize = true;\r
             this.check_dvdnav.BackColor = System.Drawing.Color.Transparent;\r
-            this.check_dvdnav.Location = new System.Drawing.Point(82, 227);\r
+            this.check_dvdnav.Location = new System.Drawing.Point(82, 247);\r
             this.check_dvdnav.Name = "check_dvdnav";\r
             this.check_dvdnav.Size = new System.Drawing.Size(276, 17);\r
             this.check_dvdnav.TabIndex = 90;\r
@@ -996,7 +973,7 @@ namespace Handbrake
             this.label32.Anchor = System.Windows.Forms.AnchorStyles.Right;\r
             this.label32.AutoSize = true;\r
             this.label32.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label32.Location = new System.Drawing.Point(13, 228);\r
+            this.label32.Location = new System.Drawing.Point(13, 248);\r
             this.label32.Name = "label32";\r
             this.label32.Size = new System.Drawing.Size(33, 13);\r
             this.label32.TabIndex = 89;\r
@@ -1011,7 +988,7 @@ namespace Handbrake
             "0.50",\r
             "0.25",\r
             "0.20"});\r
-            this.drop_x264step.Location = new System.Drawing.Point(273, 190);\r
+            this.drop_x264step.Location = new System.Drawing.Point(273, 210);\r
             this.drop_x264step.Name = "drop_x264step";\r
             this.drop_x264step.Size = new System.Drawing.Size(85, 21);\r
             this.drop_x264step.TabIndex = 86;\r
@@ -1022,7 +999,7 @@ namespace Handbrake
             // \r
             this.label30.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
             this.label30.AutoSize = true;\r
-            this.label30.Location = new System.Drawing.Point(78, 193);\r
+            this.label30.Location = new System.Drawing.Point(78, 213);\r
             this.label30.Name = "label30";\r
             this.label30.Size = new System.Drawing.Size(189, 13);\r
             this.label30.TabIndex = 87;\r
@@ -1048,7 +1025,7 @@ namespace Handbrake
             this.label28.Anchor = System.Windows.Forms.AnchorStyles.Right;\r
             this.label28.AutoSize = true;\r
             this.label28.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label28.Location = new System.Drawing.Point(8, 193);\r
+            this.label28.Location = new System.Drawing.Point(8, 213);\r
             this.label28.Name = "label28";\r
             this.label28.Size = new System.Drawing.Size(38, 13);\r
             this.label28.TabIndex = 85;\r
@@ -1471,6 +1448,20 @@ namespace Handbrake
             this.tableLayoutPanel5.Size = new System.Drawing.Size(594, 429);\r
             this.tableLayoutPanel5.TabIndex = 62;\r
             // \r
+            // check_showCliForInGUIEncode\r
+            // \r
+            this.check_showCliForInGUIEncode.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
+            this.check_showCliForInGUIEncode.AutoSize = true;\r
+            this.check_showCliForInGUIEncode.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_showCliForInGUIEncode.Location = new System.Drawing.Point(100, 152);\r
+            this.check_showCliForInGUIEncode.Name = "check_showCliForInGUIEncode";\r
+            this.check_showCliForInGUIEncode.Size = new System.Drawing.Size(330, 17);\r
+            this.check_showCliForInGUIEncode.TabIndex = 96;\r
+            this.check_showCliForInGUIEncode.Text = "Show CLI window (Allows you to cleanly exit encode with ctrl-c)";\r
+            this.ToolTip.SetToolTip(this.check_showCliForInGUIEncode, "Displays the CLI status in the GUI windows instead of the CLI window.");\r
+            this.check_showCliForInGUIEncode.UseVisualStyleBackColor = false;\r
+            this.check_showCliForInGUIEncode.CheckedChanged += new System.EventHandler(this.check_showCliForInGUIEncode_CheckedChanged);\r
+            // \r
             // frmOptions\r
             // \r
             this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);\r
@@ -1501,8 +1492,6 @@ namespace Handbrake
             this.tab_audio_sub.PerformLayout();\r
             this.tab_cli.ResumeLayout(false);\r
             this.tab_cli.PerformLayout();\r
-            this.tableLayoutPanel3.ResumeLayout(false);\r
-            this.tableLayoutPanel3.PerformLayout();\r
             this.tab_advanced.ResumeLayout(false);\r
             this.tab_advanced.PerformLayout();\r
             this.tab_debug.ResumeLayout(false);\r
@@ -1599,7 +1588,6 @@ namespace Handbrake
         internal System.Windows.Forms.CheckBox check_m4v;\r
         internal System.Windows.Forms.ComboBox drop_updateCheckDays;\r
         private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;\r
-        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;\r
         internal System.Windows.Forms.ComboBox drp_processors;\r
         internal System.Windows.Forms.ComboBox drp_Priority;\r
         private System.Windows.Forms.TableLayoutPanel tableLayoutPanel5;\r
@@ -1617,5 +1605,7 @@ namespace Handbrake
         internal System.Windows.Forms.CheckBox check_GrowlQueue;\r
         internal System.Windows.Forms.ComboBox drop_previewScanCount;\r
         private System.Windows.Forms.Label label33;\r
+        internal System.Windows.Forms.CheckBox check_clearOldLogs;\r
+        internal System.Windows.Forms.CheckBox check_showCliForInGUIEncode;\r
     }\r
 }
\ No newline at end of file
index 790c20e..9fd7c22 100644 (file)
@@ -116,7 +116,6 @@ namespace Handbrake
             // Log Verbosity Level\r
             cb_logVerboseLvl.SelectedIndex = Properties.Settings.Default.verboseLevel;\r
 \r
-\r
             // Save logs in the same directory as encoded files\r
             if (Properties.Settings.Default.saveLogWithVideo)\r
                 check_saveLogWithVideo.CheckState = CheckState.Checked;\r
@@ -128,6 +127,7 @@ namespace Handbrake
             // The saved log path\r
             text_logPath.Text = Properties.Settings.Default.saveLogPath;\r
 \r
+            check_clearOldLogs.Checked = Properties.Settings.Default.clearOldLogs;\r
 \r
             // #############################\r
             // Advanced\r
@@ -156,6 +156,8 @@ namespace Handbrake
             if (Properties.Settings.Default.enocdeStatusInGui)\r
                 check_inGuiStatus.CheckState = CheckState.Checked;\r
 \r
+             check_showCliForInGUIEncode.Checked = Properties.Settings.Default.showCliForInGuiEncodeStatus;\r
+\r
             // Set the preview count\r
             drop_previewScanCount.SelectedItem = Properties.Settings.Default.previewScanCount.ToString();\r
 \r
@@ -290,7 +292,7 @@ namespace Handbrake
         {\r
             if (radio_foreignAndSubs.Checked)\r
                 Properties.Settings.Default.DubAudio = false;\r
-        }       \r
+        }\r
         #endregion\r
 \r
         #region CLI\r
@@ -357,6 +359,11 @@ namespace Handbrake
                                 MessageBoxIcon.Information);\r
             }\r
         }\r
+\r
+        private void check_clearOldLogs_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.clearOldLogs = check_clearOldLogs.Checked;\r
+        }\r
         #endregion\r
 \r
         #region Advanced\r
@@ -391,9 +398,23 @@ namespace Handbrake
         private void check_inGuiStatus_CheckedChanged(object sender, EventArgs e)\r
         {\r
             Properties.Settings.Default.enocdeStatusInGui = check_inGuiStatus.Checked;\r
+\r
+            if (this.IsHandleCreated)\r
+                if (check_inGuiStatus.Checked)\r
+                {\r
+                    MessageBox.Show("This feature is experimental!\n\n You will not be able to \91Stop\92 an encode mid-process.\n"\r
+                                    + "Doing so will render the file unplayable.\n" +\r
+                                    "If you enable 'Show CLI Window', you'll be ablt to hit ctrl-c in the encode window to cleanly exit the CLI. This will give you a playable file.\n\n" +                                    \r
+                                    "You are also limited to 1 instance of HandBrakeCLI on your system.",\r
+                                    "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+                }\r
+        }\r
+\r
+        private void check_showCliForInGUIEncode_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.showCliForInGuiEncodeStatus = check_showCliForInGUIEncode.Checked;\r
         }\r
 \r
-        \r
         private void drop_previewScanCount_SelectedIndexChanged(object sender, EventArgs e)\r
         {\r
             Properties.Settings.Default.previewScanCount = int.Parse(drop_previewScanCount.SelectedItem.ToString());\r