summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-08-21 11:42:51 +0000
committersr55 <[email protected]>2009-08-21 11:42:51 +0000
commite0266d30c46507dc9807601b87a67840f791dc2d (patch)
treecfee57881f637215f10261c43a54e5749220242e
parent15697dbce4fe6b06a406deb2160ec8f328f7787f (diff)
WinGui:
- Fix for PictureSettings Panel - Small UI improvements for Audio and Subs panels git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2771 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/C#/Changelog.html5
-rw-r--r--win/C#/Controls/AudioPanel.Designer.cs2
-rw-r--r--win/C#/Controls/PictureSettings.cs18
-rw-r--r--win/C#/Controls/Subtitles.Designer.cs6
-rw-r--r--win/C#/frmMain.Designer.cs46
-rw-r--r--win/C#/frmMain.cs62
6 files changed, 86 insertions, 53 deletions
diff --git a/win/C#/Changelog.html b/win/C#/Changelog.html
index fc6cfe15e..4151f9719 100644
--- a/win/C#/Changelog.html
+++ b/win/C#/Changelog.html
@@ -19,15 +19,18 @@ Windows Platform Specific Changlog.<br />
- Some UI layout changes / improvements<br />
- Added new options: preferred language, "Dub Foreign language audio" and "Use Foreign language audio and Subtitles"<br />
- Remove M4v from format dropdown and add new option "Use iPod/iTunes friendly (.m4v) file extension for MP4<br />
-
+ - Chapter Markers tab now resets far less often. It should retain chapter names after being disabled / re-enabled <br />
+ - Chapter Markers tab now as import functionality. It can now import a csv file <br />
<h4>Fixed</h4>
- Re-written the Picture Settings Panel code so it should now work a lot better.<br />
- Issue where the GUI would error if the encode was stopped too quickly.<br />
- Numerous other fixes including: Quality slider resetting to 0 and other settings lost when a title change occurs.<br />
- Fixes some scaling / quality issues with QuickTime preview. Also added a possible fix for QT not working on 64bit systems.<br />
+ - Chaning the x264 Quality granularity now longer requires an application restart to work correctly <br />
<h2>Changes since 0.9.3</h2>
+
<h4>Major Changes</h4>
- Video Preview window using QuickTime or VLC. (5 to 60 second preview clips) <br />
diff --git a/win/C#/Controls/AudioPanel.Designer.cs b/win/C#/Controls/AudioPanel.Designer.cs
index b6e284895..46a5c2938 100644
--- a/win/C#/Controls/AudioPanel.Designer.cs
+++ b/win/C#/Controls/AudioPanel.Designer.cs
@@ -89,7 +89,7 @@ namespace Handbrake.Controls
this.lv_audioList.Location = new System.Drawing.Point(16, 150);
this.lv_audioList.MultiSelect = false;
this.lv_audioList.Name = "lv_audioList";
- this.lv_audioList.Size = new System.Drawing.Size(689, 153);
+ this.lv_audioList.Size = new System.Drawing.Size(689, 140);
this.lv_audioList.TabIndex = 65;
this.lv_audioList.UseCompatibleStateImageBehavior = false;
this.lv_audioList.View = System.Windows.Forms.View.Details;
diff --git a/win/C#/Controls/PictureSettings.cs b/win/C#/Controls/PictureSettings.cs
index 8352f52af..e31b6824d 100644
--- a/win/C#/Controls/PictureSettings.cs
+++ b/win/C#/Controls/PictureSettings.cs
@@ -58,8 +58,12 @@ namespace Handbrake.Controls
}
else
{
- text_width.Value = _SourceTitle.Resolution.Width;
- text_height.Value = _SourceTitle.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;
+ if (text_width.Value == 0 && text_height.Value ==0)// Only update the values if the fields don't already have values.
+ {
+ text_width.Value = _SourceTitle.Resolution.Width;
+ text_height.Value = _SourceTitle.Resolution.Height - (int) crop_top.Value - (int) crop_bottom.Value;
+ }
+
labelDisplaySize.Text = calculateAnamorphicSizes().Width + "x" + calculateAnamorphicSizes().Height;
}
@@ -130,7 +134,7 @@ namespace Handbrake.Controls
if (preventChangingCustom)
break;
- preventChangingDisplayWidth = true;
+ preventChangingDisplayWidth = true;
updownDisplayWidth.Value = text_width.Value * updownParWidth.Value / updownParHeight.Value;
preventChangingDisplayWidth = false;
@@ -235,7 +239,7 @@ namespace Handbrake.Controls
preventChangingCustom = false;
}
- if (preventChangingDisplayWidth == false && check_KeepAR.CheckState == CheckState.Checked)
+ if (preventChangingDisplayWidth == false && check_KeepAR.CheckState == CheckState.Checked)
{
// - Changes HEIGHT to keep DAR
// - Changes PIXEL WIDTH to new DISPLAY WIDTH
@@ -246,7 +250,7 @@ namespace Handbrake.Controls
int modulus = 16;
int.TryParse(drp_modulus.SelectedItem.ToString(), out modulus);
- int rawCalculatedHeight = (int) ((int)updownDisplayWidth.Value/cachedDar);
+ int rawCalculatedHeight = (int)((int)updownDisplayWidth.Value / cachedDar);
int modulusHeight = rawCalculatedHeight - (rawCalculatedHeight % modulus);
// Update value
@@ -254,9 +258,9 @@ namespace Handbrake.Controls
text_height.Value = (decimal)modulusHeight;
updownParWidth.Value = updownDisplayWidth.Value;
updownParHeight.Value = text_width.Value;
- preventChangingHeight = false;
+ preventChangingHeight = false;
}
-
+
}
// Anamorphic Controls
diff --git a/win/C#/Controls/Subtitles.Designer.cs b/win/C#/Controls/Subtitles.Designer.cs
index 451db23f8..6be93128b 100644
--- a/win/C#/Controls/Subtitles.Designer.cs
+++ b/win/C#/Controls/Subtitles.Designer.cs
@@ -149,7 +149,7 @@
this.btn_addSubTrack.BackColor = System.Drawing.Color.Transparent;
this.btn_addSubTrack.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_addSubTrack.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_addSubTrack.Location = new System.Drawing.Point(15, 39);
+ this.btn_addSubTrack.Location = new System.Drawing.Point(16, 38);
this.btn_addSubTrack.Name = "btn_addSubTrack";
this.btn_addSubTrack.Size = new System.Drawing.Size(78, 23);
this.btn_addSubTrack.TabIndex = 68;
@@ -162,7 +162,7 @@
this.btn_RemoveSubTrack.BackColor = System.Drawing.Color.Transparent;
this.btn_RemoveSubTrack.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_RemoveSubTrack.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_RemoveSubTrack.Location = new System.Drawing.Point(229, 39);
+ this.btn_RemoveSubTrack.Location = new System.Drawing.Point(230, 38);
this.btn_RemoveSubTrack.Name = "btn_RemoveSubTrack";
this.btn_RemoveSubTrack.Size = new System.Drawing.Size(73, 23);
this.btn_RemoveSubTrack.TabIndex = 69;
@@ -475,7 +475,7 @@
this.btn_srtAdd.BackColor = System.Drawing.Color.Transparent;
this.btn_srtAdd.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_srtAdd.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_srtAdd.Location = new System.Drawing.Point(99, 39);
+ this.btn_srtAdd.Location = new System.Drawing.Point(100, 38);
this.btn_srtAdd.Name = "btn_srtAdd";
this.btn_srtAdd.Size = new System.Drawing.Size(124, 23);
this.btn_srtAdd.TabIndex = 73;
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs
index 87e36209f..63d7c0035 100644
--- a/win/C#/frmMain.Designer.cs
+++ b/win/C#/frmMain.Designer.cs
@@ -167,13 +167,15 @@ namespace Handbrake
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.openPreset = new System.Windows.Forms.OpenFileDialog();
this.File_ChapterImport = new System.Windows.Forms.OpenFileDialog();
+ this.ChaptersMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.mnu_resetChapters = new System.Windows.Forms.ToolStripMenuItem();
this.PictureSettings = new Handbrake.Controls.PictureSettings();
this.Filters = new Handbrake.Controls.Filters();
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();
+ this.pmnu_import = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
notifyIconMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();
@@ -1128,10 +1130,12 @@ namespace Handbrake
this.pmnu_expandAll,
this.pmnu_collapse,
this.sep1,
+ this.pmnu_import,
+ this.toolStripSeparator2,
this.pmnu_saveChanges,
this.pmnu_delete});
this.presets_menu.Name = "presets_menu";
- this.presets_menu.Size = new System.Drawing.Size(155, 98);
+ this.presets_menu.Size = new System.Drawing.Size(155, 148);
this.presets_menu.Text = ";";
this.presets_menu.Opening += new System.ComponentModel.CancelEventHandler(this.presets_menu_Opening);
//
@@ -1562,6 +1566,21 @@ namespace Handbrake
//
this.File_ChapterImport.Filter = "CSV Files|*.csv";
//
+ // 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);
+ //
// PictureSettings
//
this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
@@ -1609,20 +1628,17 @@ namespace Handbrake
this.x264Panel.TabIndex = 0;
this.x264Panel.x264Query = "";
//
- // ChaptersMenu
+ // pmnu_import
//
- 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 = ";";
+ this.pmnu_import.Name = "pmnu_import";
+ this.pmnu_import.Size = new System.Drawing.Size(154, 22);
+ this.pmnu_import.Text = "Import";
+ this.pmnu_import.Click += new System.EventHandler(this.pmnu_import_Click);
//
- // mnu_resetChapters
+ // toolStripSeparator2
//
- 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);
+ this.toolStripSeparator2.Name = "toolStripSeparator2";
+ this.toolStripSeparator2.Size = new System.Drawing.Size(151, 6);
//
// frmMain
//
@@ -1822,5 +1838,7 @@ namespace Handbrake
private OpenFileDialog File_ChapterImport;
private ContextMenuStrip ChaptersMenu;
private ToolStripMenuItem mnu_resetChapters;
+ private ToolStripMenuItem pmnu_import;
+ private ToolStripSeparator toolStripSeparator2;
}
} \ No newline at end of file
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index c0008185d..224c077c5 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -371,33 +371,7 @@ namespace Handbrake
}
private void mnu_importMacPreset_Click(object sender, EventArgs e)
{
- Import imp = new Import();
- if (openPreset.ShowDialog() == DialogResult.OK)
- {
- QueryParser parsed = imp.importMacPreset(openPreset.FileName);
- if (presetHandler.checkIfUserPresetExists(parsed.PresetName + " (Imported)"))
- {
- DialogResult result = MessageBox.Show("This preset appears to already exist. Would you like to overwrite it?", "Overwrite preset?",
- MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
- if (result == DialogResult.Yes)
- {
- PresetLoader.presetLoader(this, parsed, parsed.PresetName, parsed.UsesPictureSettings);
- presetHandler.updatePreset(parsed.PresetName + " (Imported)", queryGen.generateCLIQuery(this, 0, null),
- parsed.UsesPictureSettings);
- }
- }
- else
- {
- PresetLoader.presetLoader(this, parsed, parsed.PresetName, parsed.UsesPictureSettings);
- presetHandler.addPreset(parsed.PresetName, queryGen.generateCLIQuery(this, 0, null), parsed.UsesPictureSettings);
-
- if (presetHandler.addPreset(parsed.PresetName + " (Imported)", queryGen.generateCLIQuery(this, 0, null), parsed.UsesPictureSettings))
- {
- TreeNode preset_treeview = new TreeNode(parsed.PresetName + " (Imported)") { ForeColor = Color.Black };
- treeView_presets.Nodes.Add(preset_treeview);
- }
- }
- }
+ importPreset();
}
private void btn_new_preset_Click(object sender, EventArgs e)
{
@@ -473,6 +447,10 @@ namespace Handbrake
{
treeView_presets.CollapseAll();
}
+ private void pmnu_import_Click(object sender, EventArgs e)
+ {
+ importPreset();
+ }
private void pmnu_saveChanges_Click(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show("Do you wish to include picture settings when updating the preset: " + treeView_presets.SelectedNode.Text, "Update Preset", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
@@ -626,6 +604,36 @@ namespace Handbrake
}
}
}
+ private void importPreset()
+ {
+ Import imp = new Import();
+ if (openPreset.ShowDialog() == DialogResult.OK)
+ {
+ QueryParser parsed = imp.importMacPreset(openPreset.FileName);
+ if (presetHandler.checkIfUserPresetExists(parsed.PresetName + " (Imported)"))
+ {
+ DialogResult result = MessageBox.Show("This preset appears to already exist. Would you like to overwrite it?", "Overwrite preset?",
+ MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
+ if (result == DialogResult.Yes)
+ {
+ PresetLoader.presetLoader(this, parsed, parsed.PresetName, parsed.UsesPictureSettings);
+ presetHandler.updatePreset(parsed.PresetName + " (Imported)", queryGen.generateCLIQuery(this, 0, null),
+ parsed.UsesPictureSettings);
+ }
+ }
+ else
+ {
+ PresetLoader.presetLoader(this, parsed, parsed.PresetName, parsed.UsesPictureSettings);
+ presetHandler.addPreset(parsed.PresetName, queryGen.generateCLIQuery(this, 0, null), parsed.UsesPictureSettings);
+
+ if (presetHandler.addPreset(parsed.PresetName + " (Imported)", queryGen.generateCLIQuery(this, 0, null), parsed.UsesPictureSettings))
+ {
+ TreeNode preset_treeview = new TreeNode(parsed.PresetName + " (Imported)") { ForeColor = Color.Black };
+ treeView_presets.Nodes.Add(preset_treeview);
+ }
+ }
+ }
+ }
#endregion
#region ToolStrip