WinGui:
authorsr55 <sr55.hb@outlook.com>
Sun, 24 Aug 2008 17:57:54 +0000 (17:57 +0000)
committersr55 <sr55.hb@outlook.com>
Sun, 24 Aug 2008 17:57:54 +0000 (17:57 +0000)
- Adds checkbox to enable decomb.
- Program Options updated with an option to customize decomb values.

- Queue Recovery feature. If you close the GUI without letting a queue complete, the user will be prompted if they'd like to recover the queue on next launch.
- Small bugfix with the queue HandBrakeCLI monitor thread not stopping when the GUI is closed.

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

12 files changed:
win/C#/Functions/Common.cs
win/C#/Functions/Queue.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
win/C#/frmQueue.Designer.cs
win/C#/frmQueue.cs
win/C#/frmQueue.resx

index f0cab1cdee7cf22c51d0158792ff720093826746..7ff2ec8060a2558ce6eb587eef1f73932ca01d50 100644 (file)
@@ -562,7 +562,13 @@ namespace Handbrake.Functions
             }\r
 \r
             if (mainWindow.check_decomb.Checked)\r
-                query += " --decomb ";\r
+            {\r
+                string decombValue = Properties.Settings.Default.decomb;\r
+                if (decombValue != "" && decombValue != Properties.Settings.Default.default_decomb)\r
+                    query += " --decomb=\"" + decombValue + "\"";\r
+                else\r
+                    query += " --decomb ";\r
+            }\r
 \r
             if (mainWindow.check_grayscale.Checked)\r
                 query += " -g ";\r
@@ -1226,5 +1232,42 @@ namespace Handbrake.Functions
         }\r
 \r
         #endregion\r
+\r
+        #region Queue\r
+        /// <summary>\r
+        /// Check if the queue recovery file contains records.\r
+        /// If it does, it means the last queue did not complete before HandBrake closed.\r
+        /// So, return a boolean if true. \r
+        /// </summary>\r
+        public Boolean check_queue_recovery()\r
+        {\r
+            try\r
+            {\r
+                string tempPath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.dat");\r
+                using (StreamReader reader = new StreamReader(tempPath))\r
+                {\r
+                    string queue_item = reader.ReadLine();\r
+                    if (queue_item == null)\r
+                    {\r
+                        reader.Close();\r
+                        reader.Dispose();\r
+                        return false;\r
+                    }\r
+                    else // There exists an item in the recovery queue file, so try and recovr it.\r
+                    {\r
+                        reader.Close();\r
+                        reader.Dispose();\r
+                        return true;\r
+                    }\r
+                }\r
+            }\r
+            catch (Exception)\r
+            {\r
+                // Keep quiet about the error.\r
+                return false;\r
+            }\r
+        }\r
+        #endregion\r
+\r
     }\r
 }
\ No newline at end of file
index e566c2e088070f1762e94d94d2170fc50461472a..ad4ecaf448b4fa92e5f442f1293e575293c7fbaf 100644 (file)
@@ -2,6 +2,8 @@
 using System.Collections.Generic;\r
 using System.Text;\r
 using System.Collections;\r
+using System.IO;\r
+using System.Windows.Forms;\r
 \r
 namespace Handbrake.Functions\r
 {\r
@@ -23,7 +25,7 @@ namespace Handbrake.Functions
         {\r
             string query = queue[0].ToString();\r
             lastQuery = query;\r
-            remove(0);\r
+            remove(0);    // Remove the item which we are about to pass out.\r
             return query;\r
         }\r
 \r
@@ -102,5 +104,55 @@ namespace Handbrake.Functions
             }\r
         }\r
 \r
+        /// <summary>\r
+        /// Writes the current queue to disk. hb_queue_recovery.dat\r
+        /// This function is called after getNextItemForEncoding()\r
+        /// </summary>\r
+        public void write2disk()\r
+        {\r
+            try\r
+            {\r
+                string tempPath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.dat");\r
+                using (StreamWriter writer = new StreamWriter(tempPath))\r
+                {\r
+                    foreach (string item in queue)\r
+                    {\r
+                        writer.WriteLine(item);\r
+                    }\r
+                    writer.Close();\r
+                    writer.Dispose();\r
+                }\r
+            }\r
+            catch (Exception)\r
+            {\r
+               // Any Errors will be out of diskspace/permissions problems. Don't report them as they'll annoy the user.\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Recover the queue from hb_queue_recovery.dat\r
+        /// </summary>\r
+        public void recoverQueue()\r
+        {\r
+            try\r
+            {\r
+                string tempPath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.dat");\r
+                using (StreamReader reader = new StreamReader(tempPath))\r
+                {\r
+                    string queue_item = reader.ReadLine();\r
+\r
+                    while (queue_item != null)\r
+                    {\r
+                        this.add(queue_item);\r
+                        queue_item = reader.ReadLine();\r
+                    }\r
+                }\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show("HandBrake was unable to recover the queue. \nError Information:" + exc.ToString(),"Queue Recovery Error",MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+            }\r
+        }\r
+\r
     }\r
 }\r
index 9b7fc066809cd01481549d09da4febe6106c7119..487ee378cb1d7c8c1aca61c063417199f32a3341 100644 (file)
@@ -226,5 +226,29 @@ namespace Handbrake.Properties {
                 this["checkSnapshot"] = value;\r
             }\r
         }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("4:10:15:9:10:35:9")]\r
+        public string decomb {\r
+            get {\r
+                return ((string)(this["decomb"]));\r
+            }\r
+            set {\r
+                this["decomb"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("4:10:15:9:10:35:9")]\r
+        public string default_decomb {\r
+            get {\r
+                return ((string)(this["default_decomb"]));\r
+            }\r
+            set {\r
+                this["default_decomb"] = value;\r
+            }\r
+        }\r
     }\r
 }\r
index 41a1690286d3738856e1d9f4ffe87704bc103c62..db282ddad373fa2b9dcff9086cc56da5cb8f9274 100644 (file)
     <Setting Name="checkSnapshot" Type="System.String" Scope="User">\r
       <Value Profile="(Default)" />\r
     </Setting>\r
+    <Setting Name="decomb" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)">4:10:15:9:10:35:9</Value>\r
+    </Setting>\r
+    <Setting Name="default_decomb" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)">4:10:15:9:10:35:9</Value>\r
+    </Setting>\r
   </Settings>\r
 </SettingsFile>
\ No newline at end of file
index 8d69ad837b3e45dfdce4a828207bde677a4951cc..2ade94d35b42836b733169634809d2b339b06334 100644 (file)
             <setting name="checkSnapshot" serializeAs="String">\r
                 <value />\r
             </setting>\r
+            <setting name="decomb" serializeAs="String">\r
+                <value>4:10:15:9:10:35:9</value>\r
+            </setting>\r
+            <setting name="default_decomb" serializeAs="String">\r
+                <value>4:10:15:9:10:35:9</value>\r
+            </setting>\r
         </Handbrake.Properties.Settings>\r
     </userSettings>\r
 </configuration>
\ No newline at end of file
index 7cc774290122391b6e3bf94d7b5bc2547dcad5df..255469be61eddfd0921b18cb101f68d1ff412694 100644 (file)
@@ -166,6 +166,7 @@ namespace Handbrake
             this.Label46 = new System.Windows.Forms.Label();\r
             this.Label40 = new System.Windows.Forms.Label();\r
             this.TabPage1 = new System.Windows.Forms.TabPage();\r
+            this.check_decomb = new System.Windows.Forms.CheckBox();\r
             this.label6 = new System.Windows.Forms.Label();\r
             this.drp_anamorphic = new System.Windows.Forms.ComboBox();\r
             this.text_bottom = new System.Windows.Forms.NumericUpDown();\r
@@ -258,7 +259,6 @@ namespace Handbrake
             this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);\r
             this.StatusStrip = new System.Windows.Forms.StatusStrip();\r
             this.lbl_encode = new System.Windows.Forms.ToolStripStatusLabel();\r
-            this.check_decomb = new System.Windows.Forms.CheckBox();\r
             Label38 = new System.Windows.Forms.Label();\r
             notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);\r
             notifyIconMenu.SuspendLayout();\r
@@ -1400,7 +1400,7 @@ namespace Handbrake
             this.TabPage2.Location = new System.Drawing.Point(4, 22);\r
             this.TabPage2.Name = "TabPage2";\r
             this.TabPage2.Padding = new System.Windows.Forms.Padding(3);\r
-            this.TabPage2.Size = new System.Drawing.Size(697, 302);\r
+            this.TabPage2.Size = new System.Drawing.Size(697, 307);\r
             this.TabPage2.TabIndex = 3;\r
             this.TabPage2.Text = "Audio && Subtitles";\r
             // \r
@@ -1740,7 +1740,7 @@ namespace Handbrake
             this.TabPage3.Location = new System.Drawing.Point(4, 22);\r
             this.TabPage3.Name = "TabPage3";\r
             this.TabPage3.Padding = new System.Windows.Forms.Padding(3);\r
-            this.TabPage3.Size = new System.Drawing.Size(697, 302);\r
+            this.TabPage3.Size = new System.Drawing.Size(697, 307);\r
             this.TabPage3.TabIndex = 2;\r
             this.TabPage3.Text = "Video";\r
             // \r
@@ -1899,6 +1899,18 @@ namespace Handbrake
             this.TabPage1.TabIndex = 0;\r
             this.TabPage1.Text = "Picture Settings";\r
             // \r
+            // check_decomb\r
+            // \r
+            this.check_decomb.AutoSize = true;\r
+            this.check_decomb.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_decomb.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_decomb.Location = new System.Drawing.Point(314, 215);\r
+            this.check_decomb.Name = "check_decomb";\r
+            this.check_decomb.Size = new System.Drawing.Size(73, 17);\r
+            this.check_decomb.TabIndex = 32;\r
+            this.check_decomb.Text = "Decomb";\r
+            this.check_decomb.UseVisualStyleBackColor = false;\r
+            // \r
             // label6\r
             // \r
             this.label6.AutoSize = true;\r
@@ -2248,7 +2260,7 @@ namespace Handbrake
             this.tab_chapters.Controls.Add(this.Check_ChapterMarkers);\r
             this.tab_chapters.Location = new System.Drawing.Point(4, 22);\r
             this.tab_chapters.Name = "tab_chapters";\r
-            this.tab_chapters.Size = new System.Drawing.Size(697, 302);\r
+            this.tab_chapters.Size = new System.Drawing.Size(697, 307);\r
             this.tab_chapters.TabIndex = 6;\r
             this.tab_chapters.Text = "Chapters";\r
             // \r
@@ -2875,7 +2887,7 @@ namespace Handbrake
             this.tabPage4.Controls.Add(this.rtf_query);\r
             this.tabPage4.Location = new System.Drawing.Point(4, 22);\r
             this.tabPage4.Name = "tabPage4";\r
-            this.tabPage4.Size = new System.Drawing.Size(697, 302);\r
+            this.tabPage4.Size = new System.Drawing.Size(697, 307);\r
             this.tabPage4.TabIndex = 7;\r
             this.tabPage4.Text = "Query Editor";\r
             // \r
@@ -3150,18 +3162,6 @@ namespace Handbrake
             this.lbl_encode.Size = new System.Drawing.Size(31, 17);\r
             this.lbl_encode.Text = "{0}";\r
             // \r
-            // check_decomb\r
-            // \r
-            this.check_decomb.AutoSize = true;\r
-            this.check_decomb.BackColor = System.Drawing.Color.Transparent;\r
-            this.check_decomb.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.check_decomb.Location = new System.Drawing.Point(314, 215);\r
-            this.check_decomb.Name = "check_decomb";\r
-            this.check_decomb.Size = new System.Drawing.Size(73, 17);\r
-            this.check_decomb.TabIndex = 32;\r
-            this.check_decomb.Text = "Decomb";\r
-            this.check_decomb.UseVisualStyleBackColor = false;\r
-            // \r
             // frmMain\r
             // \r
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
index 16d9c54e42e732d1167e7cd203866e8d16256e70..d9a239d4cf2e8807e2d9adcbde5dd6d1c1dbf191 100644 (file)
@@ -116,6 +116,9 @@ namespace Handbrake
 \r
             // Some event Handlers. Used for minimize to taskbar\r
             this.Resize += new EventHandler(frmMain_Resize);\r
+\r
+            // Queue Recovery\r
+            queueRecovery();\r
         }\r
 \r
         // Startup Functions\r
@@ -164,6 +167,24 @@ namespace Handbrake
             }\r
             catch (Exception) { /* Do Nothing */ }\r
         }\r
+        private void queueRecovery()\r
+        {\r
+            if (hb_common_func.check_queue_recovery() == true)\r
+            {\r
+                DialogResult result;\r
+                result = MessageBox.Show("HandBrake has detected unfinished items on the queue from the last time the application was launched. Would you like to recover these?","Queue Recovery Possible", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
+\r
+                if (result == DialogResult.Yes)\r
+                    encodeQueue.recoverQueue(); // Start Recovery\r
+                else\r
+                {\r
+                    // Remove the Queue recovery file if the user doesn't want to recovery the last queue.\r
+                    string queuePath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.dat");\r
+                    if (File.Exists(queuePath))\r
+                        File.Delete(queuePath);\r
+                }\r
+            }\r
+        }\r
 \r
         #endregion\r
 \r
@@ -343,6 +364,7 @@ namespace Handbrake
                     query = rtf_query.Text;\r
 \r
                 encodeQueue.add(query);\r
+                encodeQueue.write2disk(); // Writes the queue to the recovery file, just incase the GUI crashes.\r
 \r
                 queueWindow.setQueue(encodeQueue);\r
                 queueWindow.Show();\r
index 4db4e7e1b61c683366cdac7041b98e023695190c..1e16230771f1256a06ccadfd966ee26a46bc3c17 100644 (file)
@@ -50,6 +50,9 @@ namespace Handbrake
             this.check_userDefaultSettings = new System.Windows.Forms.CheckBox();\r
             this.label1 = new System.Windows.Forms.Label();\r
             this.label2 = new System.Windows.Forms.Label();\r
+            this.tab_picture = new System.Windows.Forms.TabPage();\r
+            this.txt_decomb = new System.Windows.Forms.TextBox();\r
+            this.label3 = new System.Windows.Forms.Label();\r
             this.tab_cli = new System.Windows.Forms.TabPage();\r
             this.check_cli_minimized = new System.Windows.Forms.CheckBox();\r
             this.label12 = new System.Windows.Forms.Label();\r
@@ -58,16 +61,17 @@ namespace Handbrake
             this.drp_processors = new System.Windows.Forms.ComboBox();\r
             this.Label4 = new System.Windows.Forms.Label();\r
             this.tab_advanced = new System.Windows.Forms.TabPage();\r
+            this.lbl_appcastUnstable = new System.Windows.Forms.Label();\r
+            this.check_snapshot = new System.Windows.Forms.CheckBox();\r
             this.btn_drive_detect = new System.Windows.Forms.CheckBox();\r
             this.label6 = new System.Windows.Forms.Label();\r
             this.label8 = new System.Windows.Forms.Label();\r
             this.pictureBox2 = new System.Windows.Forms.PictureBox();\r
             this.pathFinder = new System.Windows.Forms.FolderBrowserDialog();\r
             this.ToolTip = new System.Windows.Forms.ToolTip(this.components);\r
-            this.check_snapshot = new System.Windows.Forms.CheckBox();\r
-            this.lbl_appcastUnstable = new System.Windows.Forms.Label();\r
             this.tab_options.SuspendLayout();\r
             this.tab_general.SuspendLayout();\r
+            this.tab_picture.SuspendLayout();\r
             this.tab_cli.SuspendLayout();\r
             this.tab_advanced.SuspendLayout();\r
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();\r
@@ -110,6 +114,7 @@ namespace Handbrake
             // tab_options\r
             // \r
             this.tab_options.Controls.Add(this.tab_general);\r
+            this.tab_options.Controls.Add(this.tab_picture);\r
             this.tab_options.Controls.Add(this.tab_cli);\r
             this.tab_options.Controls.Add(this.tab_advanced);\r
             this.tab_options.Location = new System.Drawing.Point(12, 55);\r
@@ -257,6 +262,36 @@ namespace Handbrake
             this.label2.TabIndex = 54;\r
             this.label2.Text = "When Done:";\r
             // \r
+            // tab_picture\r
+            // \r
+            this.tab_picture.Controls.Add(this.txt_decomb);\r
+            this.tab_picture.Controls.Add(this.label3);\r
+            this.tab_picture.Location = new System.Drawing.Point(4, 22);\r
+            this.tab_picture.Name = "tab_picture";\r
+            this.tab_picture.Size = new System.Drawing.Size(482, 236);\r
+            this.tab_picture.TabIndex = 5;\r
+            this.tab_picture.Text = "Picture";\r
+            this.tab_picture.UseVisualStyleBackColor = true;\r
+            // \r
+            // txt_decomb\r
+            // \r
+            this.txt_decomb.Location = new System.Drawing.Point(90, 16);\r
+            this.txt_decomb.Name = "txt_decomb";\r
+            this.txt_decomb.Size = new System.Drawing.Size(181, 21);\r
+            this.txt_decomb.TabIndex = 78;\r
+            this.ToolTip.SetToolTip(this.txt_decomb, "Default location where Auto named files are stored.");\r
+            this.txt_decomb.TextChanged += new System.EventHandler(this.txt_decomb_TextChanged);\r
+            // \r
+            // label3\r
+            // \r
+            this.label3.AutoSize = true;\r
+            this.label3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label3.Location = new System.Drawing.Point(21, 19);\r
+            this.label3.Name = "label3";\r
+            this.label3.Size = new System.Drawing.Size(63, 13);\r
+            this.label3.TabIndex = 77;\r
+            this.label3.Text = "Decomb:";\r
+            // \r
             // tab_cli\r
             // \r
             this.tab_cli.Controls.Add(this.check_cli_minimized);\r
@@ -374,6 +409,31 @@ namespace Handbrake
             this.tab_advanced.Text = "Advanced";\r
             this.tab_advanced.UseVisualStyleBackColor = true;\r
             // \r
+            // lbl_appcastUnstable\r
+            // \r
+            this.lbl_appcastUnstable.AutoSize = true;\r
+            this.lbl_appcastUnstable.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_appcastUnstable.Location = new System.Drawing.Point(6, 42);\r
+            this.lbl_appcastUnstable.Name = "lbl_appcastUnstable";\r
+            this.lbl_appcastUnstable.Size = new System.Drawing.Size(64, 13);\r
+            this.lbl_appcastUnstable.TabIndex = 81;\r
+            this.lbl_appcastUnstable.Text = "Updates:";\r
+            // \r
+            // check_snapshot\r
+            // \r
+            this.check_snapshot.AutoSize = true;\r
+            this.check_snapshot.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_snapshot.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_snapshot.Location = new System.Drawing.Point(76, 41);\r
+            this.check_snapshot.Name = "check_snapshot";\r
+            this.check_snapshot.Size = new System.Drawing.Size(273, 17);\r
+            this.check_snapshot.TabIndex = 80;\r
+            this.check_snapshot.Text = "Check for unstable development snapshots";\r
+            this.ToolTip.SetToolTip(this.check_snapshot, "Enables the built in update checker to check for the latest development snapshot " +\r
+                    "builds.\r\nWarning: These are considered unstable builds and are not supported!");\r
+            this.check_snapshot.UseVisualStyleBackColor = false;\r
+            this.check_snapshot.CheckedChanged += new System.EventHandler(this.check_snapshot_CheckedChanged);\r
+            // \r
             // btn_drive_detect\r
             // \r
             this.btn_drive_detect.AutoSize = true;\r
@@ -392,7 +452,7 @@ namespace Handbrake
             // \r
             this.label6.AutoSize = true;\r
             this.label6.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label6.Location = new System.Drawing.Point(27, 19);\r
+            this.label6.Location = new System.Drawing.Point(35, 19);\r
             this.label6.Name = "label6";\r
             this.label6.Size = new System.Drawing.Size(35, 13);\r
             this.label6.TabIndex = 71;\r
@@ -424,31 +484,6 @@ namespace Handbrake
             this.ToolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;\r
             this.ToolTip.ToolTipTitle = "Tooltip";\r
             // \r
-            // check_snapshot\r
-            // \r
-            this.check_snapshot.AutoSize = true;\r
-            this.check_snapshot.BackColor = System.Drawing.Color.Transparent;\r
-            this.check_snapshot.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.check_snapshot.Location = new System.Drawing.Point(76, 41);\r
-            this.check_snapshot.Name = "check_snapshot";\r
-            this.check_snapshot.Size = new System.Drawing.Size(273, 17);\r
-            this.check_snapshot.TabIndex = 80;\r
-            this.check_snapshot.Text = "Check for unstable development snapshots";\r
-            this.ToolTip.SetToolTip(this.check_snapshot, "Enables the built in update checker to check for the latest development snapshot " +\r
-                    "builds.\r\nWarning: These are considered unstable builds and are not supported!");\r
-            this.check_snapshot.UseVisualStyleBackColor = false;\r
-            this.check_snapshot.CheckedChanged += new System.EventHandler(this.check_snapshot_CheckedChanged);\r
-            // \r
-            // lbl_appcastUnstable\r
-            // \r
-            this.lbl_appcastUnstable.AutoSize = true;\r
-            this.lbl_appcastUnstable.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.lbl_appcastUnstable.Location = new System.Drawing.Point(6, 42);\r
-            this.lbl_appcastUnstable.Name = "lbl_appcastUnstable";\r
-            this.lbl_appcastUnstable.Size = new System.Drawing.Size(64, 13);\r
-            this.lbl_appcastUnstable.TabIndex = 81;\r
-            this.lbl_appcastUnstable.Text = "Updates:";\r
-            // \r
             // frmOptions\r
             // \r
             this.ClientSize = new System.Drawing.Size(514, 355);\r
@@ -467,6 +502,8 @@ namespace Handbrake
             this.tab_options.ResumeLayout(false);\r
             this.tab_general.ResumeLayout(false);\r
             this.tab_general.PerformLayout();\r
+            this.tab_picture.ResumeLayout(false);\r
+            this.tab_picture.PerformLayout();\r
             this.tab_cli.ResumeLayout(false);\r
             this.tab_cli.PerformLayout();\r
             this.tab_advanced.ResumeLayout(false);\r
@@ -509,5 +546,8 @@ namespace Handbrake
         internal System.Windows.Forms.ToolTip ToolTip;\r
         private System.Windows.Forms.Label lbl_appcastUnstable;\r
         internal System.Windows.Forms.CheckBox check_snapshot;\r
+        private System.Windows.Forms.TabPage tab_picture;\r
+        private System.Windows.Forms.TextBox txt_decomb;\r
+        private System.Windows.Forms.Label label3;\r
     }\r
 }
\ No newline at end of file
index d947a6354ca6db93968d0feea06100566d9ae6c7..fb48f803dab1dfec3366498d8d1a5e5452af3493 100644 (file)
@@ -45,6 +45,8 @@ namespace Handbrake
             if (Properties.Settings.Default.defaultSettings == "Checked")\r
                 check_userDefaultSettings.CheckState = CheckState.Checked;\r
 \r
+            txt_decomb.Text = Properties.Settings.Default.decomb;\r
+\r
             drp_processors.Text = Properties.Settings.Default.Processors;\r
             drp_Priority.Text = Properties.Settings.Default.processPriority;\r
             drp_completeOption.Text = Properties.Settings.Default.CompletionOption;\r
@@ -124,7 +126,12 @@ namespace Handbrake
             pathFinder.ShowDialog();\r
             text_an_path.Text = pathFinder.SelectedPath;\r
         }\r
-        \r
+\r
+        private void txt_decomb_TextChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.decomb = txt_decomb.Text;\r
+        }\r
+\r
         private void btn_drive_detect_CheckedChanged(object sender, EventArgs e)\r
         {\r
             Properties.Settings.Default.drive_detection = btn_drive_detect.CheckState.ToString();\r
@@ -152,8 +159,5 @@ namespace Handbrake
         }\r
         #endregion\r
 \r
-\r
-\r
-\r
     }\r
 }
\ No newline at end of file
index c7617df92b48e2d019f80bffe9d6b0951f8f27d6..9c1f87ed0967372001a40a7ed794be11dadf3af5 100644 (file)
@@ -63,12 +63,13 @@ namespace Handbrake
             this.Destination = new System.Windows.Forms.ColumnHeader();\r
             this.EncoderVideo = new System.Windows.Forms.ColumnHeader();\r
             this.Audio = new System.Windows.Forms.ColumnHeader();\r
-            this.lbl_progressValue = new System.Windows.Forms.Label();\r
-            this.progressBar = new System.Windows.Forms.ProgressBar();\r
-            this.label2 = new System.Windows.Forms.Label();\r
-            this.lbl_status = new System.Windows.Forms.Label();\r
+            this.statusStrip1 = new System.Windows.Forms.StatusStrip();\r
+            this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();\r
+            this.progressBar = new System.Windows.Forms.ToolStripProgressBar();\r
+            this.lbl_progressValue = new System.Windows.Forms.ToolStripStatusLabel();\r
             this.toolStrip1.SuspendLayout();\r
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();\r
+            this.statusStrip1.SuspendLayout();\r
             this.SuspendLayout();\r
             // \r
             // btn_down\r
@@ -77,7 +78,7 @@ namespace Handbrake
             this.btn_down.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
             this.btn_down.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.btn_down.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
-            this.btn_down.Location = new System.Drawing.Point(610, 124);\r
+            this.btn_down.Location = new System.Drawing.Point(610, 129);\r
             this.btn_down.Name = "btn_down";\r
             this.btn_down.Size = new System.Drawing.Size(75, 22);\r
             this.btn_down.TabIndex = 33;\r
@@ -92,7 +93,7 @@ namespace Handbrake
             this.btn_up.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
             this.btn_up.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.btn_up.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
-            this.btn_up.Location = new System.Drawing.Point(539, 124);\r
+            this.btn_up.Location = new System.Drawing.Point(540, 129);\r
             this.btn_up.Name = "btn_up";\r
             this.btn_up.Size = new System.Drawing.Size(64, 22);\r
             this.btn_up.TabIndex = 32;\r
@@ -107,7 +108,7 @@ namespace Handbrake
             this.btn_delete.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
             this.btn_delete.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.btn_delete.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
-            this.btn_delete.Location = new System.Drawing.Point(692, 124);\r
+            this.btn_delete.Location = new System.Drawing.Point(692, 129);\r
             this.btn_delete.Name = "btn_delete";\r
             this.btn_delete.Size = new System.Drawing.Size(75, 22);\r
             this.btn_delete.TabIndex = 31;\r
@@ -214,7 +215,7 @@ namespace Handbrake
             this.toolStrip1.Location = new System.Drawing.Point(0, 0);\r
             this.toolStrip1.Name = "toolStrip1";\r
             this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;\r
-            this.toolStrip1.Size = new System.Drawing.Size(780, 49);\r
+            this.toolStrip1.Size = new System.Drawing.Size(779, 49);\r
             this.toolStrip1.TabIndex = 71;\r
             this.toolStrip1.Text = "toolStrip1";\r
             // \r
@@ -319,54 +320,43 @@ namespace Handbrake
             this.Audio.Text = "Audio Encoder";\r
             this.Audio.Width = 94;\r
             // \r
-            // lbl_progressValue\r
+            // statusStrip1\r
             // \r
-            this.lbl_progressValue.AutoSize = true;\r
-            this.lbl_progressValue.Location = new System.Drawing.Point(737, 353);\r
-            this.lbl_progressValue.Name = "lbl_progressValue";\r
-            this.lbl_progressValue.Size = new System.Drawing.Size(30, 13);\r
-            this.lbl_progressValue.TabIndex = 36;\r
-            this.lbl_progressValue.Text = "0 %";\r
+            this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.toolStripStatusLabel1,\r
+            this.progressBar,\r
+            this.lbl_progressValue});\r
+            this.statusStrip1.Location = new System.Drawing.Point(0, 359);\r
+            this.statusStrip1.Name = "statusStrip1";\r
+            this.statusStrip1.Size = new System.Drawing.Size(779, 31);\r
+            this.statusStrip1.TabIndex = 73;\r
+            this.statusStrip1.Text = "statusStrip1";\r
+            // \r
+            // toolStripStatusLabel1\r
+            // \r
+            this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";\r
+            this.toolStripStatusLabel1.Size = new System.Drawing.Size(53, 26);\r
+            this.toolStripStatusLabel1.Text = "Progress:";\r
             // \r
             // progressBar\r
             // \r
-            this.progressBar.Location = new System.Drawing.Point(76, 348);\r
             this.progressBar.Name = "progressBar";\r
-            this.progressBar.Size = new System.Drawing.Size(655, 23);\r
+            this.progressBar.Size = new System.Drawing.Size(500, 25);\r
             this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous;\r
-            this.progressBar.TabIndex = 34;\r
             // \r
-            // label2\r
-            // \r
-            this.label2.AutoSize = true;\r
-            this.label2.Location = new System.Drawing.Point(9, 353);\r
-            this.label2.Name = "label2";\r
-            this.label2.Size = new System.Drawing.Size(62, 13);\r
-            this.label2.TabIndex = 35;\r
-            this.label2.Text = "Progress:";\r
-            // \r
-            // lbl_status\r
+            // lbl_progressValue\r
             // \r
-            this.lbl_status.AutoSize = true;\r
-            this.lbl_status.BackColor = System.Drawing.Color.Transparent;\r
-            this.lbl_status.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.lbl_status.Location = new System.Drawing.Point(319, 353);\r
-            this.lbl_status.Name = "lbl_status";\r
-            this.lbl_status.Size = new System.Drawing.Size(176, 13);\r
-            this.lbl_status.TabIndex = 42;\r
-            this.lbl_status.Text = "Encode Queue Completed!";\r
-            this.lbl_status.Visible = false;\r
+            this.lbl_progressValue.Name = "lbl_progressValue";\r
+            this.lbl_progressValue.Size = new System.Drawing.Size(30, 26);\r
+            this.lbl_progressValue.Text = " 0 %";\r
             // \r
             // frmQueue\r
             // \r
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);\r
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
-            this.ClientSize = new System.Drawing.Size(780, 386);\r
-            this.Controls.Add(this.lbl_status);\r
-            this.Controls.Add(this.label2);\r
+            this.ClientSize = new System.Drawing.Size(779, 390);\r
+            this.Controls.Add(this.statusStrip1);\r
             this.Controls.Add(this.list_queue);\r
-            this.Controls.Add(this.progressBar);\r
-            this.Controls.Add(this.lbl_progressValue);\r
             this.Controls.Add(this.pictureBox1);\r
             this.Controls.Add(this.btn_down);\r
             this.Controls.Add(this.btn_up);\r
@@ -384,12 +374,15 @@ namespace Handbrake
             this.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
             this.MaximizeBox = false;\r
+            this.MinimumSize = new System.Drawing.Size(787, 417);\r
             this.Name = "frmQueue";\r
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\r
             this.Text = "Encode Queue";\r
             this.toolStrip1.ResumeLayout(false);\r
             this.toolStrip1.PerformLayout();\r
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();\r
+            this.statusStrip1.ResumeLayout(false);\r
+            this.statusStrip1.PerformLayout();\r
             this.ResumeLayout(false);\r
             this.PerformLayout();\r
 \r
@@ -424,9 +417,9 @@ namespace Handbrake
         private System.Windows.Forms.ColumnHeader Destination;\r
         private System.Windows.Forms.ColumnHeader EncoderVideo;\r
         private System.Windows.Forms.ColumnHeader Audio;\r
-        private System.Windows.Forms.Label lbl_progressValue;\r
-        private System.Windows.Forms.ProgressBar progressBar;\r
-        private System.Windows.Forms.Label label2;\r
-        private System.Windows.Forms.Label lbl_status;\r
+        private System.Windows.Forms.StatusStrip statusStrip1;\r
+        private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;\r
+        private System.Windows.Forms.ToolStripProgressBar progressBar;\r
+        private System.Windows.Forms.ToolStripStatusLabel lbl_progressValue;\r
     }\r
 }
\ No newline at end of file
index d239203a5b8d13e1a0e729f3ba4b22f8a532cc12..e331b70f6ddfbd9e8130832d2f50e121d771c185 100644 (file)
@@ -97,7 +97,6 @@ namespace Handbrake
         {\r
             if (queue.count() != 0)\r
             {\r
-                lbl_status.Visible = false;\r
                 btn_encode.Enabled = false;\r
             }\r
             cancel = false;\r
@@ -111,9 +110,9 @@ namespace Handbrake
                     btn_stop.Visible = true;\r
                     progressBar.Value = 0;\r
                     lbl_progressValue.Text = "0 %";\r
-                    progressBar.Step = 100 / queue.count();\r
-                    progressBar.Update();\r
+                    progressBar.Step = 100 / queue.count();   \r
                     Thread theQ = new Thread(startProc);\r
+                    theQ.IsBackground = true;\r
                     theQ.Start();\r
                 }\r
             }\r
@@ -178,18 +177,14 @@ namespace Handbrake
 \r
                 if (cancel == true)\r
                 {\r
-                    lbl_status.Visible = true;\r
-                    lbl_status.Text = "Encode Queue Cancelled!";\r
+                    lbl_progressValue.Text = "Encode Queue Cancelled!";\r
                 }\r
                 else\r
                 {\r
-                    lbl_status.Visible = true;\r
-                    lbl_status.Text = "Encode Queue Completed!";\r
+                    lbl_progressValue.Text = "Encode Queue Completed!";\r
                 }\r
 \r
-                lbl_progressValue.Text = "0 %";\r
                 progressBar.Value = 0;\r
-                progressBar.Update();\r
 \r
                 lbl_source.Text = "-";\r
                 lbl_dest.Text = "-";\r
@@ -228,7 +223,6 @@ namespace Handbrake
 \r
                 progressBar.PerformStep();\r
                 lbl_progressValue.Text = string.Format("{0} %", progressBar.Value);\r
-                progressBar.Update();\r
             }\r
             catch (Exception exc)\r
             {\r
@@ -285,6 +279,7 @@ namespace Handbrake
             if (list_queue.SelectedIndices.Count != 0)\r
             {\r
                 queue.moveUp(list_queue.SelectedIndices[0]);\r
+                queue.write2disk(); // Update the queue recovery file\r
                 redrawQueue();\r
             }\r
         }\r
@@ -295,6 +290,7 @@ namespace Handbrake
             if (list_queue.SelectedIndices.Count != 0)\r
             {\r
                 queue.moveDown(list_queue.SelectedIndices[0]);\r
+                queue.write2disk(); // Update the queue recovery file\r
                 redrawQueue();\r
             }\r
         }\r
@@ -305,6 +301,7 @@ namespace Handbrake
             if (list_queue.SelectedIndices.Count != 0)\r
             {\r
                 queue.remove(list_queue.SelectedIndices[0]);\r
+                queue.write2disk(); // Update the queue recovery file\r
                 redrawQueue();\r
             }\r
         }\r
index 11e5d9ba00e26dc47877ceb2bd58fc3e663d64a3..8e6968fbb42c2ce26641e747f191123661723ca9 100644 (file)
   <metadata name="SaveFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
     <value>208, 17</value>\r
   </metadata>\r
+  <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>300, 17</value>\r
+  </metadata>\r
   <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
     <value>\r