]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Wed, 17 Dec 2008 00:11:23 +0000 (00:11 +0000)
committersr55 <sr55.hb@outlook.com>
Wed, 17 Dec 2008 00:11:23 +0000 (00:11 +0000)
- Some fixes in the new code which handles encoding across the Queue and MainWindow.
- Small UI tweaks on Activity Window and Generate Preview Window

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

win/C#/frmActivityWindow.Designer.cs
win/C#/frmGenPreview.cs
win/C#/frmMain.Designer.cs
win/C#/frmMain.cs
win/C#/frmQueue.cs

index a57603e50a97267fb508485d72f263b7b7ea4186..cdd7d2d60e3f9312cc9ff1bfa5536e917f6f74d5 100644 (file)
@@ -72,13 +72,13 @@ namespace Handbrake
             this.rightClickMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
             this.mnu_copy_log});\r
             this.rightClickMenu.Name = "rightClickMenu";\r
-            this.rightClickMenu.Size = new System.Drawing.Size(153, 48);\r
+            this.rightClickMenu.Size = new System.Drawing.Size(111, 26);\r
             // \r
             // mnu_copy_log\r
             // \r
             this.mnu_copy_log.Image = global::Handbrake.Properties.Resources.copy;\r
             this.mnu_copy_log.Name = "mnu_copy_log";\r
-            this.mnu_copy_log.Size = new System.Drawing.Size(152, 22);\r
+            this.mnu_copy_log.Size = new System.Drawing.Size(110, 22);\r
             this.mnu_copy_log.Text = "Copy";\r
             this.mnu_copy_log.Click += new System.EventHandler(this.mnu_copy_log_Click);\r
             // \r
@@ -109,14 +109,14 @@ namespace Handbrake
             this.toolStripDropDownButton1.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
             this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;\r
             this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";\r
-            this.toolStripDropDownButton1.Size = new System.Drawing.Size(94, 22);\r
+            this.toolStripDropDownButton1.Size = new System.Drawing.Size(85, 22);\r
             this.toolStripDropDownButton1.Text = "Select Log";\r
             // \r
             // btn_encode_log\r
             // \r
             this.btn_encode_log.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;\r
             this.btn_encode_log.Name = "btn_encode_log";\r
-            this.btn_encode_log.Size = new System.Drawing.Size(151, 22);\r
+            this.btn_encode_log.Size = new System.Drawing.Size(140, 22);\r
             this.btn_encode_log.Text = "Encode Log";\r
             this.btn_encode_log.Click += new System.EventHandler(this.btn_encode_log_Click);\r
             // \r
@@ -124,7 +124,7 @@ namespace Handbrake
             // \r
             this.btn_scan_log.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;\r
             this.btn_scan_log.Name = "btn_scan_log";\r
-            this.btn_scan_log.Size = new System.Drawing.Size(151, 22);\r
+            this.btn_scan_log.Size = new System.Drawing.Size(140, 22);\r
             this.btn_scan_log.Text = "Scan Log";\r
             this.btn_scan_log.Click += new System.EventHandler(this.btn_scan_log_Click);\r
             // \r
@@ -134,7 +134,7 @@ namespace Handbrake
             this.btn_copy.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
             this.btn_copy.ImageTransparentColor = System.Drawing.Color.Magenta;\r
             this.btn_copy.Name = "btn_copy";\r
-            this.btn_copy.Size = new System.Drawing.Size(122, 22);\r
+            this.btn_copy.Size = new System.Drawing.Size(111, 22);\r
             this.btn_copy.Text = "Copy to clipboard";\r
             this.btn_copy.Click += new System.EventHandler(this.btn_copy_Click);\r
             // \r
@@ -159,6 +159,7 @@ namespace Handbrake
             // \r
             // lbl_slb\r
             // \r
+            this.lbl_slb.BackColor = System.Drawing.Color.Transparent;\r
             this.lbl_slb.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.lbl_slb.Name = "lbl_slb";\r
             this.lbl_slb.Size = new System.Drawing.Size(94, 17);\r
@@ -168,7 +169,7 @@ namespace Handbrake
             // \r
             this.txt_log.BackColor = System.Drawing.Color.Transparent;\r
             this.txt_log.Name = "txt_log";\r
-            this.txt_log.Size = new System.Drawing.Size(85, 17);\r
+            this.txt_log.Size = new System.Drawing.Size(74, 17);\r
             this.txt_log.Text = "{selected log}";\r
             // \r
             // frmActivityWindow\r
index 3d6528de95f9f0e1464a51245c9f56c949f14267..d2d7aee144b080a7a98aa7ac0a0deb70b4029e78 100644 (file)
@@ -24,6 +24,7 @@ namespace Handbrake
         {\r
             InitializeComponent();\r
             this.mainWindow = mw;\r
+            cb_duration.SelectedIndex = 0;\r
         }\r
 \r
         private void btn_play_Click(object sender, EventArgs e)\r
index 34bbd48cb81e43ac3d9aefdb74013cbdad306e39..2911b062cdcf2b5da806ff20eb3e69ea48085a82 100644 (file)
@@ -1639,7 +1639,8 @@ namespace Handbrake
             this.HelpToolStripMenuItem});\r
             this.frmMainMenu.Location = new System.Drawing.Point(0, 0);\r
             this.frmMainMenu.Name = "frmMainMenu";\r
-            this.frmMainMenu.Size = new System.Drawing.Size(985, 24);\r
+            this.frmMainMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;\r
+            this.frmMainMenu.Size = new System.Drawing.Size(983, 24);\r
             this.frmMainMenu.TabIndex = 0;\r
             this.frmMainMenu.Text = "MenuStrip1";\r
             // \r
@@ -3042,7 +3043,7 @@ namespace Handbrake
             this.toolStrip1.Location = new System.Drawing.Point(0, 24);\r
             this.toolStrip1.Name = "toolStrip1";\r
             this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;\r
-            this.toolStrip1.Size = new System.Drawing.Size(985, 39);\r
+            this.toolStrip1.Size = new System.Drawing.Size(983, 39);\r
             this.toolStrip1.TabIndex = 1;\r
             this.toolStrip1.Text = "toolStrip1";\r
             // \r
@@ -3172,9 +3173,9 @@ namespace Handbrake
             // \r
             this.StatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
             this.lbl_encode});\r
-            this.StatusStrip.Location = new System.Drawing.Point(0, 629);\r
+            this.StatusStrip.Location = new System.Drawing.Point(0, 627);\r
             this.StatusStrip.Name = "StatusStrip";\r
-            this.StatusStrip.Size = new System.Drawing.Size(985, 22);\r
+            this.StatusStrip.Size = new System.Drawing.Size(983, 22);\r
             this.StatusStrip.TabIndex = 7;\r
             this.StatusStrip.Text = "statusStrip1";\r
             // \r
@@ -3189,7 +3190,7 @@ namespace Handbrake
             // \r
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
-            this.ClientSize = new System.Drawing.Size(985, 651);\r
+            this.ClientSize = new System.Drawing.Size(983, 649);\r
             this.Controls.Add(this.GroupBox1);\r
             this.Controls.Add(this.groupBox_dest);\r
             this.Controls.Add(this.groupBox_output);\r
index 3efa040c5fa035928d923d095cfebc95af7ef851..d5b70e363948b80537c62e75aa8cb8ec371629dd 100644 (file)
@@ -471,9 +471,13 @@ namespace Handbrake
                 else\r
                     query = queryGen.GenerateTheQuery(this);\r
 \r
-                encodeQueue.add(query, text_source.Text, text_destination.Text);\r
-                encodeQueue.write2disk("hb_queue_recovery.xml");\r
+                if (encodeQueue.count() == 0)\r
+                {\r
+                    encodeQueue.add(query, text_source.Text, text_destination.Text);\r
+                    encodeQueue.write2disk("hb_queue_recovery.xml");\r
+                }\r
                 queueWindow.setQueue(encodeQueue);\r
+                queueWindow.Show();\r
                 queueWindow.frmMain_encode();\r
 \r
                 setEncodeStatus(1); // Encode is running, so setup the GUI appropriately\r
index 86ae4b5bd7ee08de196c14177dfcb8db7f000fd8..648deef8972abd39a064c70a560c0b31c6bf12ce 100644 (file)
@@ -81,6 +81,15 @@ namespace Handbrake
             {\r
                 if (queue.count() != 0)\r
                 {\r
+                    // Setup or reset some values\r
+                    btn_encode.Enabled = false;\r
+                    btn_stop.Visible = true;\r
+                    progressBar.Value = 0;\r
+                    lbl_progressValue.Text = "0 %";\r
+                    if (queue.count() == 0)\r
+                        progressBar.Step = 100;\r
+                    else\r
+                        progressBar.Step = 100 / queue.count();\r
                     Thread theQ = new Thread(startProc);\r
                     theQ.IsBackground = true;\r
                     theQ.Start();\r
@@ -135,19 +144,16 @@ namespace Handbrake
         // Initializes the encode process\r
         private void btn_encode_Click(object sender, EventArgs e)\r
         {\r
-            mainWindow.setLastAction("encode");\r
-            mainWindow.setEncodeStatus(1);\r
-            \r
             if (queue.count() != 0)\r
             {\r
                 btn_encode.Enabled = false;\r
-            }\r
-            cancel = false;\r
+                mainWindow.setLastAction("encode");\r
+                mainWindow.setEncodeStatus(1);\r
 \r
-            // Start the encode\r
-            try\r
-            {\r
-                if (queue.count() != 0)\r
+                cancel = false;\r
+\r
+                // Start the encode\r
+                try\r
                 {\r
                     // Setup or reset some values\r
                     btn_encode.Enabled = false;\r
@@ -162,10 +168,10 @@ namespace Handbrake
                     theQ.IsBackground = true;\r
                     theQ.Start();\r
                 }\r
-            }\r
-            catch (Exception exc)\r
-            {\r
-                MessageBox.Show(exc.ToString());\r
+                catch (Exception exc)\r
+                {\r
+                    MessageBox.Show(exc.ToString());\r
+                }\r
             }\r
         }\r
 \r
@@ -339,8 +345,8 @@ namespace Handbrake
                 queue.write2disk("hb_queue_recovery.xml"); // Update the queue recovery file\r
                 redrawQueue();\r
 \r
-                if (selected - 1 > 0) \r
-                    list_queue.Items[selected -1].Selected = true;\r
+                if (selected - 1 > 0)\r
+                    list_queue.Items[selected - 1].Selected = true;\r
 \r
                 list_queue.Select();\r
             }\r
@@ -355,7 +361,7 @@ namespace Handbrake
                 queue.write2disk("hb_queue_recovery.xml"); // Update the queue recovery file\r
                 redrawQueue();\r
 \r
-                if (selected +1 < list_queue.Items.Count) \r
+                if (selected + 1 < list_queue.Items.Count)\r
                     list_queue.Items[selected + 1].Selected = true;\r
 \r
                 list_queue.Select();\r