From: sr55 Date: Mon, 9 Mar 2009 11:49:20 +0000 (+0000) Subject: WinGui X-Git-Tag: 0.9.4~715 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82a445c939dd4d63ee957190dce2de8d594a7782;p=handbrake WinGui - Removed undeeded activate call for show queue - Moved re-add job to the toolbar Queue menu. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2246 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 07828e81a..4ec8b2892 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -645,7 +645,6 @@ namespace Handbrake private void btn_showQueue_Click(object sender, EventArgs e) { queueWindow.Show(); - queueWindow.Activate(); } private void tb_preview_Click(object sender, EventArgs e) { diff --git a/win/C#/frmQueue.Designer.cs b/win/C#/frmQueue.Designer.cs index c67872b8b..0f09bf69e 100644 --- a/win/C#/frmQueue.Designer.cs +++ b/win/C#/frmQueue.Designer.cs @@ -40,7 +40,6 @@ namespace Handbrake this.btn_up = new System.Windows.Forms.Button(); this.btn_delete = new System.Windows.Forms.Button(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.btn_re_add = new System.Windows.Forms.Button(); this.label4 = new System.Windows.Forms.Label(); this.lbl_chapt = new System.Windows.Forms.Label(); this.lbl_title = new System.Windows.Forms.Label(); @@ -58,6 +57,8 @@ namespace Handbrake this.mnu_batch = new System.Windows.Forms.ToolStripMenuItem(); this.mnu_import = new System.Windows.Forms.ToolStripMenuItem(); this.mnu_export = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.mnu_readd = new System.Windows.Forms.ToolStripMenuItem(); this.SaveFile = new System.Windows.Forms.SaveFileDialog(); this.list_queue = new System.Windows.Forms.ListView(); this.Title = new System.Windows.Forms.ColumnHeader(); @@ -128,22 +129,6 @@ namespace Handbrake this.btn_delete.UseVisualStyleBackColor = true; this.btn_delete.Click += new System.EventHandler(this.btn_delete_Click); // - // btn_re_add - // - this.btn_re_add.BackColor = System.Drawing.SystemColors.ControlLight; - this.btn_re_add.FlatAppearance.BorderColor = System.Drawing.Color.Black; - this.btn_re_add.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btn_re_add.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); - this.btn_re_add.Location = new System.Drawing.Point(607, 39); - this.btn_re_add.Name = "btn_re_add"; - this.btn_re_add.Size = new System.Drawing.Size(157, 22); - this.btn_re_add.TabIndex = 71; - this.btn_re_add.TabStop = false; - this.btn_re_add.Text = "Re-Add Current"; - this.toolTip1.SetToolTip(this.btn_re_add, "Re-add the current or last job to the queue"); - this.btn_re_add.UseVisualStyleBackColor = true; - this.btn_re_add.Click += new System.EventHandler(this.btn_re_add_Click); - // // label4 // this.label4.AutoSize = true; @@ -251,7 +236,7 @@ namespace Handbrake this.btn_encode.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.btn_encode.ImageTransparentColor = System.Drawing.Color.Magenta; this.btn_encode.Name = "btn_encode"; - this.btn_encode.Size = new System.Drawing.Size(78, 36); + this.btn_encode.Size = new System.Drawing.Size(84, 36); this.btn_encode.Text = "Encode"; this.btn_encode.Click += new System.EventHandler(this.btn_encode_Click); // @@ -262,7 +247,7 @@ namespace Handbrake this.btn_pause.ImageTransparentColor = System.Drawing.Color.Magenta; this.btn_pause.Name = "btn_pause"; this.btn_pause.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; - this.btn_pause.Size = new System.Drawing.Size(72, 36); + this.btn_pause.Size = new System.Drawing.Size(75, 36); this.btn_pause.Text = "Pause"; this.btn_pause.Visible = false; this.btn_pause.Click += new System.EventHandler(this.btn_pause_Click); @@ -277,19 +262,21 @@ namespace Handbrake this.drop_button_queue.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.mnu_batch, this.mnu_import, - this.mnu_export}); + this.mnu_export, + this.toolStripSeparator2, + this.mnu_readd}); this.drop_button_queue.Image = global::Handbrake.Properties.Resources.ActivityWindow; this.drop_button_queue.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.drop_button_queue.ImageTransparentColor = System.Drawing.Color.Magenta; this.drop_button_queue.Name = "drop_button_queue"; - this.drop_button_queue.Size = new System.Drawing.Size(84, 36); + this.drop_button_queue.Size = new System.Drawing.Size(89, 36); this.drop_button_queue.Text = "Queue"; // // mnu_batch // this.mnu_batch.Image = global::Handbrake.Properties.Resources.Output_Small; this.mnu_batch.Name = "mnu_batch"; - this.mnu_batch.Size = new System.Drawing.Size(190, 22); + this.mnu_batch.Size = new System.Drawing.Size(207, 22); this.mnu_batch.Text = "Generate Batch Script"; this.mnu_batch.Click += new System.EventHandler(this.mnu_batch_Click); // @@ -297,7 +284,7 @@ namespace Handbrake // this.mnu_import.Image = global::Handbrake.Properties.Resources.folder; this.mnu_import.Name = "mnu_import"; - this.mnu_import.Size = new System.Drawing.Size(190, 22); + this.mnu_import.Size = new System.Drawing.Size(207, 22); this.mnu_import.Text = "Import Queue"; this.mnu_import.Click += new System.EventHandler(this.mnu_import_Click); // @@ -305,10 +292,22 @@ namespace Handbrake // this.mnu_export.Image = global::Handbrake.Properties.Resources.save; this.mnu_export.Name = "mnu_export"; - this.mnu_export.Size = new System.Drawing.Size(190, 22); + this.mnu_export.Size = new System.Drawing.Size(207, 22); this.mnu_export.Text = "Export Queue"; this.mnu_export.Click += new System.EventHandler(this.mnu_export_Click); // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(204, 6); + // + // mnu_readd + // + this.mnu_readd.Name = "mnu_readd"; + this.mnu_readd.Size = new System.Drawing.Size(207, 22); + this.mnu_readd.Text = "Re-Add Current Job"; + this.mnu_readd.Click += new System.EventHandler(this.mnu_readd_Click); + // // SaveFile // this.SaveFile.Filter = "Batch|.bat"; @@ -380,7 +379,7 @@ namespace Handbrake this.lbl_encodesPending.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.lbl_encodesPending.Margin = new System.Windows.Forms.Padding(0, 3, 10, 2); this.lbl_encodesPending.Name = "lbl_encodesPending"; - this.lbl_encodesPending.Size = new System.Drawing.Size(105, 17); + this.lbl_encodesPending.Size = new System.Drawing.Size(122, 17); this.lbl_encodesPending.Text = "0 encode(s) pending"; // // OpenFile @@ -398,7 +397,6 @@ namespace Handbrake // // splitContainer1.Panel1 // - this.splitContainer1.Panel1.Controls.Add(this.btn_re_add); this.splitContainer1.Panel1.Controls.Add(this.label3); this.splitContainer1.Panel1.Controls.Add(this.label1); this.splitContainer1.Panel1.Controls.Add(this.btn_down); @@ -512,6 +510,7 @@ namespace Handbrake private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel3; - internal System.Windows.Forms.Button btn_re_add; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripMenuItem mnu_readd; } } diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs index ceb127fb4..26fd97311 100644 --- a/win/C#/frmQueue.cs +++ b/win/C#/frmQueue.cs @@ -165,7 +165,19 @@ namespace Handbrake item.SubItems.Add(queue_item.Source); // Source item.SubItems.Add(queue_item.Destination); // Destination item.SubItems.Add(parsed.VideoEncoder); // Video - item.SubItems.Add(parsed.AudioEncoder1); // Audio + + // Display the first 4 audio tracks. + String audio = parsed.AudioEncoder1; + if (parsed.AudioEncoder2 != null) + audio += ", " + parsed.AudioEncoder2; + + if (parsed.AudioEncoder3 != null) + audio += ", " + parsed.AudioEncoder3; + + if (parsed.AudioEncoder4 != null) + audio += ", " + parsed.AudioEncoder4; + + item.SubItems.Add(audio); // Audio list_queue.Items.Add(item); } @@ -208,7 +220,17 @@ namespace Handbrake } lbl_vEnc.Text = parsed.VideoEncoder; - lbl_aEnc.Text = parsed.AudioEncoder1; + String audio = parsed.AudioEncoder1; + if (parsed.AudioEncoder2 != null) + audio += ", " + parsed.AudioEncoder2; + + if (parsed.AudioEncoder3 != null) + audio += ", " + parsed.AudioEncoder3; + + if (parsed.AudioEncoder4 != null) + audio += ", " + parsed.AudioEncoder4; + + lbl_aEnc.Text = audio; } catch (Exception) { @@ -246,15 +268,6 @@ namespace Handbrake } // Queue Management - private void btn_re_add_Click(object sender, EventArgs e) - { - if (queue.getLastQueryItem() != null) - { - queue.add(queue.getLastQueryItem().Query, queue.getLastQueryItem().Source, queue.getLastQueryItem().Destination); - queue.write2disk("hb_queue_recovery.xml"); // Update the queue recovery file - updateUIElements(); - } - } private void btn_up_Click(object sender, EventArgs e) { // If there are selected items and the first item is not selected @@ -344,6 +357,15 @@ namespace Handbrake queue.recoverQueue(OpenFile.FileName); updateUIElements(); } + private void mnu_readd_Click(object sender, EventArgs e) + { + if (queue.getLastQueryItem() != null) + { + queue.add(queue.getLastQueryItem().Query, queue.getLastQueryItem().Source, queue.getLastQueryItem().Destination); + queue.write2disk("hb_queue_recovery.xml"); // Update the queue recovery file + updateUIElements(); + } + } // Hide's the window when the user tries to "x" out of the window instead of closing it. protected override void OnClosing(CancelEventArgs e) @@ -354,5 +376,6 @@ namespace Handbrake } + } }