summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2008-12-28 17:53:25 +0000
committersr55 <[email protected]>2008-12-28 17:53:25 +0000
commit946e0938b2a07a8d065f71502cf0fa6cf77b2f1f (patch)
tree54ec4d0aef682cdd2d9b7315e42d26443ea809d2 /win
parentb67e367457cdb3aae4dedce90beeea6804b2aa32 (diff)
WinGui:
- Right Click menu for the new audio tab. - Made the list rows a tad thicker to make it easier to right click them. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2048 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/C#/frmMain.Designer.cs68
-rw-r--r--win/C#/frmMain.cs49
-rw-r--r--win/C#/frmMain.resx12
3 files changed, 124 insertions, 5 deletions
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs
index b742b8589..94ee4ce3e 100644
--- a/win/C#/frmMain.Designer.cs
+++ b/win/C#/frmMain.Designer.cs
@@ -38,7 +38,7 @@ namespace Handbrake
System.Windows.Forms.Label Label38;
System.Windows.Forms.ContextMenuStrip notifyIconMenu;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
this.btn_restore = new System.Windows.Forms.ToolStripMenuItem();
this.DVD_Save = new System.Windows.Forms.SaveFileDialog();
this.File_Save = new System.Windows.Forms.SaveFileDialog();
@@ -243,6 +243,12 @@ namespace Handbrake
this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
this.StatusStrip = new System.Windows.Forms.StatusStrip();
this.lbl_encode = new System.Windows.Forms.ToolStripStatusLabel();
+ this.audioMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.audioList_movedown = new System.Windows.Forms.ToolStripMenuItem();
+ this.audioList_moveup = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
+ this.audioList_remove = new System.Windows.Forms.ToolStripMenuItem();
+ this.AudioMenuRowHeightHack = new System.Windows.Forms.ImageList(this.components);
Label38 = new System.Windows.Forms.Label();
notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
notifyIconMenu.SuspendLayout();
@@ -272,6 +278,7 @@ namespace Handbrake
this.presets_menu.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.StatusStrip.SuspendLayout();
+ this.audioMenu.SuspendLayout();
this.SuspendLayout();
//
// Label38
@@ -635,9 +642,9 @@ namespace Handbrake
//
// number
//
- dataGridViewCellStyle1.Format = "N0";
- dataGridViewCellStyle1.NullValue = null;
- this.number.DefaultCellStyle = dataGridViewCellStyle1;
+ dataGridViewCellStyle6.Format = "N0";
+ dataGridViewCellStyle6.NullValue = null;
+ this.number.DefaultCellStyle = dataGridViewCellStyle6;
this.number.HeaderText = "Chapter Number";
this.number.MaxInputLength = 3;
this.number.Name = "number";
@@ -1546,13 +1553,16 @@ namespace Handbrake
this.col_samplerate,
this.col_bitrate,
this.col_drc});
+ this.lv_audioList.ContextMenuStrip = this.audioMenu;
this.lv_audioList.FullRowSelect = true;
+ this.lv_audioList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.lv_audioList.HideSelection = false;
this.lv_audioList.LabelWrap = false;
this.lv_audioList.Location = new System.Drawing.Point(16, 79);
this.lv_audioList.MultiSelect = false;
this.lv_audioList.Name = "lv_audioList";
this.lv_audioList.Size = new System.Drawing.Size(668, 147);
+ this.lv_audioList.SmallImageList = this.AudioMenuRowHeightHack;
this.lv_audioList.TabIndex = 48;
this.lv_audioList.UseCompatibleStateImageBehavior = false;
this.lv_audioList.View = System.Windows.Forms.View.Details;
@@ -2838,6 +2848,49 @@ namespace Handbrake
this.lbl_encode.Size = new System.Drawing.Size(31, 17);
this.lbl_encode.Text = "{0}";
//
+ // audioMenu
+ //
+ this.audioMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.audioList_moveup,
+ this.audioList_movedown,
+ this.toolStripSeparator2,
+ this.audioList_remove});
+ this.audioMenu.Name = "audioMenu";
+ this.audioMenu.Size = new System.Drawing.Size(142, 76);
+ //
+ // audioList_movedown
+ //
+ this.audioList_movedown.Name = "audioList_movedown";
+ this.audioList_movedown.Size = new System.Drawing.Size(141, 22);
+ this.audioList_movedown.Text = "Move Down";
+ this.audioList_movedown.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.audioList_movedown.Click += new System.EventHandler(this.audioList_movedown_Click);
+ //
+ // audioList_moveup
+ //
+ this.audioList_moveup.Name = "audioList_moveup";
+ this.audioList_moveup.Size = new System.Drawing.Size(141, 22);
+ this.audioList_moveup.Text = "Move Up";
+ this.audioList_moveup.Click += new System.EventHandler(this.audioList_moveup_Click);
+ //
+ // toolStripSeparator2
+ //
+ this.toolStripSeparator2.Name = "toolStripSeparator2";
+ this.toolStripSeparator2.Size = new System.Drawing.Size(138, 6);
+ //
+ // audioList_remove
+ //
+ this.audioList_remove.Name = "audioList_remove";
+ this.audioList_remove.Size = new System.Drawing.Size(141, 22);
+ this.audioList_remove.Text = "Remove";
+ this.audioList_remove.Click += new System.EventHandler(this.audioList_remove_Click);
+ //
+ // AudioMenuRowHeightHack
+ //
+ this.AudioMenuRowHeightHack.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
+ this.AudioMenuRowHeightHack.ImageSize = new System.Drawing.Size(1, 18);
+ this.AudioMenuRowHeightHack.TransparentColor = System.Drawing.Color.Transparent;
+ //
// frmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -2896,6 +2949,7 @@ namespace Handbrake
this.toolStrip1.PerformLayout();
this.StatusStrip.ResumeLayout(false);
this.StatusStrip.PerformLayout();
+ this.audioMenu.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@@ -3107,6 +3161,12 @@ namespace Handbrake
private System.Windows.Forms.ColumnHeader col_bitrate;
private System.Windows.Forms.ColumnHeader col_drc;
internal System.Windows.Forms.ListView lv_audioList;
+ private System.Windows.Forms.ContextMenuStrip audioMenu;
+ private System.Windows.Forms.ToolStripMenuItem audioList_movedown;
+ private System.Windows.Forms.ToolStripMenuItem audioList_moveup;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
+ private System.Windows.Forms.ToolStripMenuItem audioList_remove;
+ private System.Windows.Forms.ImageList AudioMenuRowHeightHack;
}
} \ No newline at end of file
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index faaa58d7b..aee2f2b5c 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -1198,6 +1198,7 @@ namespace Handbrake
lv_audioList.Select();
}
}
+
private void btn_addAudioTrack_Click(object sender, EventArgs e)
{
// Create a new row for the Audio list based on the currently selected items in the dropdown.
@@ -1215,6 +1216,50 @@ namespace Handbrake
}
private void btn_RemoveAudioTrack_Click(object sender, EventArgs e)
{
+ removeAudioTrack();
+ }
+ private void audioList_moveup_Click(object sender, EventArgs e)
+ {
+ if (lv_audioList.SelectedIndices.Count != 0)
+ {
+ ListViewItem item = lv_audioList.SelectedItems[0];
+ int index = item.Index;
+ index--;
+
+ if (lv_audioList.Items.Count > index && index >= 0)
+ {
+ lv_audioList.Items.Remove(item);
+ lv_audioList.Items.Insert(index, item);
+ item.Selected = true;
+ lv_audioList.Focus();
+ }
+ }
+ }
+ private void audioList_movedown_Click(object sender, EventArgs e)
+ {
+ if (lv_audioList.SelectedIndices.Count != 0)
+ {
+ ListViewItem item = lv_audioList.SelectedItems[0];
+ int index = item.Index;
+ index++;
+
+ if (index < lv_audioList.Items.Count)
+ {
+ lv_audioList.Items.Remove(item);
+ lv_audioList.Items.Insert(index, item);
+ item.Selected = true;
+ lv_audioList.Focus();
+ }
+ }
+
+ }
+
+ private void audioList_remove_Click(object sender, EventArgs e)
+ {
+ removeAudioTrack();
+ }
+ private void removeAudioTrack()
+ {
// Remove the Item and reselect the control if the following conditions are met.
if (lv_audioList.SelectedItems.Count != 0)
{
@@ -1235,6 +1280,7 @@ namespace Handbrake
}
}
}
+
private void lv_audioList_SelectedIndexChanged(object sender, EventArgs e)
{
// Set the dropdown controls based on the selected item in the Audio List.
@@ -1252,6 +1298,7 @@ namespace Handbrake
tb_drc.Value = drcCalculated;
}
}
+
private void drp_subtitle_SelectedIndexChanged(object sender, EventArgs e)
{
if (drp_subtitle.Text.Contains("None"))
@@ -1262,7 +1309,7 @@ namespace Handbrake
else
check_forced.Enabled = true;
}
-
+
// Chapter Marker Tab
private void Check_ChapterMarkers_CheckedChanged(object sender, EventArgs e)
{
diff --git a/win/C#/frmMain.resx b/win/C#/frmMain.resx
index 1ae5e6636..0039ebd87 100644
--- a/win/C#/frmMain.resx
+++ b/win/C#/frmMain.resx
@@ -155,6 +155,12 @@ Make sure you have selected a "Title" from the "Source" box above otherwise
the list will not be populated with the correct amount of chapters.
Note: Do not change any of the chapter numbers!</value>
</data>
+ <metadata name="number.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
+ <metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
<data name="check_Cabac.ToolTip" xml:space="preserve">
<value>CABAC, or context adaptive binary arithmetic coding, is used by x264 to reduce the bitrate needed for a given quality by 15%.
This makes it very cool and very useful, and it should be left on whenever possible. However, it is incompatible with the iPod 5.5G, and makes the AppleTV struggle.
@@ -254,6 +260,12 @@ If you're going to choose between spatial and temporal, spatial is usually bette
<metadata name="frmMainMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>106, 15</value>
</metadata>
+ <metadata name="audioMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 36</value>
+ </metadata>
+ <metadata name="AudioMenuRowHeightHack.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>123, 36</value>
+ </metadata>
<metadata name="presets_menu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1224, 15</value>
</metadata>