summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-08-19 13:27:27 +0000
committersr55 <[email protected]>2009-08-19 13:27:27 +0000
commiteb400c89a2c419b8a886ce25dc4f0de18c515ad0 (patch)
tree9620f27d7ccba5b9bb39880c11a2e051ed47db31
parent3b4e2879eb8e8c96285bac452a1be865977bba1e (diff)
WinGui:
- Further improvements to Chapter Marker tab usability, including a reset chapter marker names option on a right click menu. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2768 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/C#/frmMain.Designer.cs26
-rw-r--r--win/C#/frmMain.cs23
-rw-r--r--win/C#/frmMain.resx3
3 files changed, 43 insertions, 9 deletions
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs
index 46c3f2a9d..87e36209f 100644
--- a/win/C#/frmMain.Designer.cs
+++ b/win/C#/frmMain.Designer.cs
@@ -172,6 +172,8 @@ namespace Handbrake
this.AudioSettings = new Handbrake.Controls.AudioPanel();
this.Subtitles = new Handbrake.Controls.Subtitles();
this.x264Panel = new Handbrake.Controls.x264Panel();
+ this.ChaptersMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.mnu_resetChapters = new System.Windows.Forms.ToolStripMenuItem();
notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
notifyIconMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();
@@ -197,6 +199,7 @@ namespace Handbrake
this.tableLayoutPanel3.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
+ this.ChaptersMenu.SuspendLayout();
this.SuspendLayout();
//
// notifyIconMenu
@@ -384,6 +387,7 @@ namespace Handbrake
this.data_chpt.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.number,
this.name});
+ this.data_chpt.ContextMenuStrip = this.ChaptersMenu;
this.data_chpt.Location = new System.Drawing.Point(16, 55);
this.data_chpt.MultiSelect = false;
this.data_chpt.Name = "data_chpt";
@@ -529,7 +533,7 @@ namespace Handbrake
// mnu_killCLI
//
this.mnu_killCLI.Name = "mnu_killCLI";
- this.mnu_killCLI.Size = new System.Drawing.Size(152, 22);
+ this.mnu_killCLI.Size = new System.Drawing.Size(143, 22);
this.mnu_killCLI.Text = "Cancel Scan";
this.mnu_killCLI.Visible = false;
this.mnu_killCLI.Click += new System.EventHandler(this.mnu_killCLI_Click);
@@ -537,7 +541,7 @@ namespace Handbrake
// mnu_exit
//
this.mnu_exit.Name = "mnu_exit";
- this.mnu_exit.Size = new System.Drawing.Size(152, 22);
+ this.mnu_exit.Size = new System.Drawing.Size(143, 22);
this.mnu_exit.Text = "E&xit";
this.mnu_exit.Click += new System.EventHandler(this.mnu_exit_Click);
//
@@ -1605,6 +1609,21 @@ namespace Handbrake
this.x264Panel.TabIndex = 0;
this.x264Panel.x264Query = "";
//
+ // ChaptersMenu
+ //
+ this.ChaptersMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.mnu_resetChapters});
+ this.ChaptersMenu.Name = "presets_menu";
+ this.ChaptersMenu.Size = new System.Drawing.Size(191, 26);
+ this.ChaptersMenu.Text = ";";
+ //
+ // mnu_resetChapters
+ //
+ this.mnu_resetChapters.Name = "mnu_resetChapters";
+ this.mnu_resetChapters.Size = new System.Drawing.Size(190, 22);
+ this.mnu_resetChapters.Text = "Reset Chapter Names";
+ this.mnu_resetChapters.Click += new System.EventHandler(this.mnu_resetChapters_Click);
+ //
// frmMain
//
this.AllowDrop = true;
@@ -1662,6 +1681,7 @@ namespace Handbrake
this.tableLayoutPanel1.PerformLayout();
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
+ this.ChaptersMenu.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@@ -1800,5 +1820,7 @@ namespace Handbrake
private OpenFileDialog openPreset;
private Button btn_importChapters;
private OpenFileDialog File_ChapterImport;
+ private ContextMenuStrip ChaptersMenu;
+ private ToolStripMenuItem mnu_resetChapters;
}
} \ No newline at end of file
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index b80ae3b10..c0008185d 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -1011,13 +1011,18 @@ namespace Handbrake
// Disable chapter markers if only 1 chapter is selected.
if (chapterStart == chapterEnd)
{
- btn_importChapters.Enabled = false;
Check_ChapterMarkers.Enabled = false;
+ btn_importChapters.Enabled = false;
+ data_chpt.Enabled = false;
}
else
{
- btn_importChapters.Enabled = true;
Check_ChapterMarkers.Enabled = true;
+ if (Check_ChapterMarkers.Checked)
+ {
+ btn_importChapters.Enabled = true;
+ data_chpt.Enabled = true;
+ }
}
}
@@ -1334,18 +1339,13 @@ namespace Handbrake
{
if (drop_format.SelectedIndex != 1)
setExtension(".m4v");
- data_chpt.Rows.Clear();
data_chpt.Enabled = true;
btn_importChapters.Enabled = true;
- DataGridView chapterGridView = Main.chapterNaming(data_chpt, drop_chapterFinish.Text);
- if (chapterGridView != null)
- data_chpt = chapterGridView;
}
else
{
if (drop_format.SelectedIndex != 1 && !Properties.Settings.Default.useM4v)
setExtension(".mp4");
- data_chpt.Rows.Clear();
data_chpt.Enabled = false;
btn_importChapters.Enabled = false;
}
@@ -1360,6 +1360,15 @@ namespace Handbrake
data_chpt = imported;
}
}
+ private void mnu_resetChapters_Click(object sender, EventArgs e)
+ {
+ data_chpt.Rows.Clear();
+ DataGridView chapterGridView = Main.chapterNaming(data_chpt, drop_chapterFinish.Text);
+ if (chapterGridView != null)
+ {
+ data_chpt = chapterGridView;
+ }
+ }
// Query Editor Tab
private void btn_generate_Query_Click(object sender, EventArgs e)
diff --git a/win/C#/frmMain.resx b/win/C#/frmMain.resx
index 00495e0fd..184e7a96c 100644
--- a/win/C#/frmMain.resx
+++ b/win/C#/frmMain.resx
@@ -135,6 +135,9 @@
<metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
+ <metadata name="ChaptersMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>935, 54</value>
+ </metadata>
<data name="data_chpt.ToolTip" xml:space="preserve">
<value>Here you can name each chapter that the encoded video will contain.
Make sure you have selected a "Title" from the "Source" box above otherwise