diff options
author | sr55 <[email protected]> | 2009-06-29 20:05:04 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-06-29 20:05:04 +0000 |
commit | fafb7a774fba159de59fd54e5bf10b53a2382f7d (patch) | |
tree | 7e6ec763fb01a49e12f204dbfe3ca011557d3979 /win | |
parent | 36d3b711916f38c606a4ed5db77608a07d5efbbe (diff) |
WinGui:
- Added Global Event Handlers to parts of some of the user controls.
- Added register and deregister event handler functions for widget changes. (This allows the preset label to be changed to custom when a user changes a widget). This isn't finalised.
- Misc UI tweaks
- Few bug fixes:
* Preset update notification appearing behind splashscreen
* Tweaks to the preset loader to make it work a bit better.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2640 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r-- | win/C#/Controls/AudioPanel.cs | 13 | ||||
-rw-r--r-- | win/C#/Controls/Filters.cs | 21 | ||||
-rw-r--r-- | win/C#/Controls/PictureSettings.cs | 15 | ||||
-rw-r--r-- | win/C#/Functions/PresetLoader.cs | 25 | ||||
-rw-r--r-- | win/C#/Functions/QueryParser.cs | 2 | ||||
-rw-r--r-- | win/C#/frmActivityWindow.Designer.cs | 22 | ||||
-rw-r--r-- | win/C#/frmMain.Designer.cs | 90 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 74 |
8 files changed, 192 insertions, 70 deletions
diff --git a/win/C#/Controls/AudioPanel.cs b/win/C#/Controls/AudioPanel.cs index 57a258322..272f88ce8 100644 --- a/win/C#/Controls/AudioPanel.cs +++ b/win/C#/Controls/AudioPanel.cs @@ -11,6 +11,7 @@ namespace Handbrake.Controls {
public partial class AudioPanel : UserControl
{
+ public event EventHandler AudioListChanged;
public AudioPanel()
{
InitializeComponent();
@@ -131,6 +132,10 @@ namespace Handbrake.Controls newTrack.SubItems.Add(lbl_drc.Text);
lv_audioList.Items.Add(newTrack);
+ // The Audio List has changed to raise the event.
+ if (this.AudioListChanged != null)
+ this.AudioListChanged(this, new EventArgs());
+
// Select the newly added track and select the control
lv_audioList.Items[lv_audioList.Items.Count - 1].Selected = true;
lv_audioList.Select();
@@ -184,6 +189,10 @@ namespace Handbrake.Controls // Remove the Item and reselect the control if the following conditions are met.
if (lv_audioList.SelectedItems.Count != 0)
{
+ // The Audio List is about to change so raise the event.
+ if (this.AudioListChanged != null)
+ this.AudioListChanged(this, new EventArgs());
+
// Record the current selected index.
int currentPosition = lv_audioList.SelectedIndices[0];
@@ -252,10 +261,14 @@ namespace Handbrake.Controls public void addTrackForPreset(ListViewItem item)
{
lv_audioList.Items.Add(item);
+ if (this.AudioListChanged != null)
+ this.AudioListChanged(this, new EventArgs());
}
public void clearAudioList()
{
lv_audioList.Items.Clear();
+ if (this.AudioListChanged != null)
+ this.AudioListChanged(this, new EventArgs());
}
public int getNewID()
{
diff --git a/win/C#/Controls/Filters.cs b/win/C#/Controls/Filters.cs index 22d2c5771..bfbc5e5ad 100644 --- a/win/C#/Controls/Filters.cs +++ b/win/C#/Controls/Filters.cs @@ -5,6 +5,8 @@ namespace Handbrake.Controls {
public partial class Filters : UserControl
{
+ public event EventHandler FilterSettingsChanged;
+
public Filters()
{
InitializeComponent();
@@ -18,26 +20,45 @@ namespace Handbrake.Controls private void drop_detelecine_SelectedIndexChanged(object sender, EventArgs e)
{
text_customDT.Visible = drop_detelecine.Text == "Custom";
+ // A Filter has changed so raise a FilterSettingsChanged event.
+ if (this.FilterSettingsChanged != null)
+ this.FilterSettingsChanged(this, new EventArgs());
}
private void drop_decomb_SelectedIndexChanged(object sender, EventArgs e)
{
text_customDC.Visible = drop_decomb.Text == "Custom";
if (drop_decomb.SelectedIndex != 0 && drop_deinterlace.SelectedIndex != 0)
drop_deinterlace.SelectedIndex = 0;
+
+ // A Filter has changed so raise a FilterSettingsChanged event.
+ if (this.FilterSettingsChanged != null)
+ this.FilterSettingsChanged(this, new EventArgs());
}
private void drop_deinterlace_SelectedIndexChanged(object sender, EventArgs e)
{
text_customDI.Visible = drop_deinterlace.Text == "Custom";
if (drop_decomb.SelectedIndex != 0 && drop_deinterlace.SelectedIndex != 0)
drop_decomb.SelectedIndex = 0;
+
+ // A Filter has changed so raise a FilterSettingsChanged event.
+ if (this.FilterSettingsChanged != null)
+ this.FilterSettingsChanged(this, new EventArgs());
}
private void drop_denoise_SelectedIndexChanged(object sender, EventArgs e)
{
text_customDN.Visible = drop_denoise.Text == "Custom";
+
+ // A Filter has changed so raise a FilterSettingsChanged event.
+ if (this.FilterSettingsChanged != null)
+ this.FilterSettingsChanged(this, new EventArgs());
}
private void slider_deblock_Scroll(object sender, EventArgs e)
{
lbl_deblockVal.Text = slider_deblock.Value == 4 ? "Off" : slider_deblock.Value.ToString();
+
+ // A Filter has changed so raise a FilterSettingsChanged event.
+ if (this.FilterSettingsChanged != null)
+ this.FilterSettingsChanged(this, new EventArgs());
}
// Returns the CLI query for the query generator.
diff --git a/win/C#/Controls/PictureSettings.cs b/win/C#/Controls/PictureSettings.cs index c35c2fa51..e490c2e63 100644 --- a/win/C#/Controls/PictureSettings.cs +++ b/win/C#/Controls/PictureSettings.cs @@ -1,5 +1,4 @@ using System;
-using System.Drawing;
using System.Globalization;
using System.Windows.Forms;
using Handbrake.Parsing;
@@ -24,6 +23,8 @@ namespace Handbrake.Controls private Boolean looseAnamorphicHeightGuard;
private Boolean heightModJumpGaurd;
+ public event EventHandler PictureSettingsChanged;
+
// Window Setup
public PictureSettings()
{
@@ -112,7 +113,9 @@ namespace Handbrake.Controls customAnamorphic(text_width);
break;
}
-
+ // A Picture Setting has changed so raise a PictureSettingsChanged event.
+ if (this.PictureSettingsChanged != null)
+ this.PictureSettingsChanged(this, new EventArgs());
}
private void text_height_ValueChanged(object sender, EventArgs e)
{
@@ -160,6 +163,10 @@ namespace Handbrake.Controls heightChangeGuard = false;
looseAnamorphicHeightGuard = false;
heightModJumpGaurd = false;
+
+ // A Picture Setting has changed so raise a PictureSettingsChanged event.
+ if (this.PictureSettingsChanged != null)
+ this.PictureSettingsChanged(this, new EventArgs());
}
private void check_KeepAR_CheckedChanged(object sender, EventArgs e)
{
@@ -254,6 +261,10 @@ namespace Handbrake.Controls break;
}
+
+ // A Picture Setting has changed so raise a PictureSettingsChanged event.
+ if (this.PictureSettingsChanged != null)
+ this.PictureSettingsChanged(this, new EventArgs());
}
// Custom Anamorphic Controls
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs index 82d96e660..043436c02 100644 --- a/win/C#/Functions/PresetLoader.cs +++ b/win/C#/Functions/PresetLoader.cs @@ -67,14 +67,12 @@ namespace Handbrake.Functions #endregion
#region Picture
- mainWindow.PictureSettings.check_autoCrop.Checked = true;
- if (presetQuery.CropBottom == "0" && presetQuery.CropTop == "0")
- if (presetQuery.CropLeft == "0" && presetQuery.CropRight == "0")
- mainWindow.PictureSettings.check_customCrop.Checked = true;
-
+
if (pictureSettings) // only Load picture settings if the perset requires it
{
- if (presetQuery.CropTop != null)
+ mainWindow.PictureSettings.check_autoCrop.Checked = true;
+
+ if (presetQuery.CropValues != null)
{
int top, bottom, left, right;
int.TryParse(presetQuery.CropTop, out top);
@@ -98,9 +96,20 @@ namespace Handbrake.Functions if (presetQuery.Width != 0)
mainWindow.PictureSettings.text_width.Value = presetQuery.Width;
else if (presetQuery.MaxWidth == 0)
- mainWindow.PictureSettings.text_width.Value = 0;
+ {
+ if (mainWindow.selectedTitle != null)
+ if (mainWindow.selectedTitle.Resolution.Width != 0)
+ {
+ mainWindow.PictureSettings.text_width.Value = mainWindow.selectedTitle.Resolution.Width;
+ if (presetQuery.Height == 0 && presetQuery.MaxHeight == 0)
+ mainWindow.PictureSettings.check_KeepAR.Checked = true;
+ }
+ else
+ mainWindow.PictureSettings.text_width.Value = 0;
+ }
- mainWindow.PictureSettings.text_height.Value = presetQuery.Height != 0 ? presetQuery.Height : 0;
+ if (presetQuery.Height != 0)
+ mainWindow.PictureSettings.text_height.Value = presetQuery.Height;
// Max Width/Height override Width/Height
if (presetQuery.MaxWidth != 0)
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs index 5c1576cd4..0b7c2a395 100644 --- a/win/C#/Functions/QueryParser.cs +++ b/win/C#/Functions/QueryParser.cs @@ -222,7 +222,7 @@ namespace Handbrake.Functions thisQuery.CropBottom = actCropValues[1];
thisQuery.CropLeft = actCropValues[2];
thisQuery.CropRight = actCropValues[3];
- }
+ }
if (strictAnamorphic.Success)
thisQuery.AnamorphicMode = 1;
diff --git a/win/C#/frmActivityWindow.Designer.cs b/win/C#/frmActivityWindow.Designer.cs index 11e5c0d3c..9ad5e1630 100644 --- a/win/C#/frmActivityWindow.Designer.cs +++ b/win/C#/frmActivityWindow.Designer.cs @@ -39,6 +39,7 @@ namespace Handbrake this.rtf_actLog = new System.Windows.Forms.RichTextBox();
this.rightClickMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.mnu_copy_log = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnu_openLogFolder = new System.Windows.Forms.ToolStripMenuItem();
this.ToolTip = new System.Windows.Forms.ToolTip(this.components);
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
@@ -49,7 +50,6 @@ namespace Handbrake this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.lbl_slb = new System.Windows.Forms.ToolStripStatusLabel();
this.txt_log = new System.Windows.Forms.ToolStripStatusLabel();
- this.mnu_openLogFolder = new System.Windows.Forms.ToolStripMenuItem();
this.rightClickMenu.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.statusStrip1.SuspendLayout();
@@ -74,7 +74,7 @@ namespace Handbrake this.mnu_copy_log,
this.mnu_openLogFolder});
this.rightClickMenu.Name = "rightClickMenu";
- this.rightClickMenu.Size = new System.Drawing.Size(247, 70);
+ this.rightClickMenu.Size = new System.Drawing.Size(247, 48);
//
// mnu_copy_log
//
@@ -84,6 +84,14 @@ namespace Handbrake this.mnu_copy_log.Text = "Copy";
this.mnu_copy_log.Click += new System.EventHandler(this.mnu_copy_log_Click);
//
+ // mnu_openLogFolder
+ //
+ this.mnu_openLogFolder.Image = global::Handbrake.Properties.Resources.folder;
+ this.mnu_openLogFolder.Name = "mnu_openLogFolder";
+ this.mnu_openLogFolder.Size = new System.Drawing.Size(246, 22);
+ this.mnu_openLogFolder.Text = "Open Individual Log File Directory";
+ this.mnu_openLogFolder.Click += new System.EventHandler(this.mnu_openLogFolder_Click);
+ //
// ToolTip
//
this.ToolTip.Active = false;
@@ -96,7 +104,7 @@ namespace Handbrake this.btn_copy});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
- this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
+ this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
this.toolStrip1.Size = new System.Drawing.Size(471, 25);
this.toolStrip1.TabIndex = 96;
this.toolStrip1.Text = "toolStrip1";
@@ -174,14 +182,6 @@ namespace Handbrake this.txt_log.Size = new System.Drawing.Size(74, 17);
this.txt_log.Text = "{selected log}";
//
- // mnu_openLogFolder
- //
- this.mnu_openLogFolder.Image = global::Handbrake.Properties.Resources.folder;
- this.mnu_openLogFolder.Name = "mnu_openLogFolder";
- this.mnu_openLogFolder.Size = new System.Drawing.Size(246, 22);
- this.mnu_openLogFolder.Text = "Open Individual Log File Directory";
- this.mnu_openLogFolder.Click += new System.EventHandler(this.mnu_openLogFolder_Click);
- //
// frmActivityWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index 6d7edb293..83751198e 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -103,7 +103,6 @@ namespace Handbrake this.Label47 = new System.Windows.Forms.Label();
this.Label3 = new System.Windows.Forms.Label();
this.tab_audio = new System.Windows.Forms.TabPage();
- this.AudioSettings = new Handbrake.Controls.AudioPanel();
this.AudioMenuRowHeightHack = new System.Windows.Forms.ImageList(this.components);
this.tab_video = new System.Windows.Forms.TabPage();
this.radio_cq = new System.Windows.Forms.RadioButton();
@@ -115,17 +114,13 @@ namespace Handbrake this.SliderValue = new System.Windows.Forms.Label();
this.Label46 = new System.Windows.Forms.Label();
this.tab_picture = new System.Windows.Forms.TabPage();
- this.PictureSettings = new Handbrake.Controls.PictureSettings();
this.Check_ChapterMarkers = new System.Windows.Forms.CheckBox();
this.tabs_panel = new System.Windows.Forms.TabControl();
this.tab_filters = new System.Windows.Forms.TabPage();
- this.Filters = new Handbrake.Controls.Filters();
this.tab_subtitles = new System.Windows.Forms.TabPage();
- this.Subtitles = new Handbrake.Controls.Subtitles();
this.tab_chapters = new System.Windows.Forms.TabPage();
this.label31 = new System.Windows.Forms.Label();
this.tab_advanced = new System.Windows.Forms.TabPage();
- this.x264Panel = new Handbrake.Controls.x264Panel();
this.tab_query = new System.Windows.Forms.TabPage();
this.btn_clear = new System.Windows.Forms.Button();
this.label34 = new System.Windows.Forms.Label();
@@ -163,6 +158,11 @@ namespace Handbrake this.lbl_source = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.groupBox_output = new System.Windows.Forms.Label();
+ 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();
notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
notifyIconMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();
@@ -824,14 +824,6 @@ namespace Handbrake this.tab_audio.Text = "Audio";
this.tab_audio.UseVisualStyleBackColor = true;
//
- // AudioSettings
- //
- this.AudioSettings.BackColor = System.Drawing.Color.Transparent;
- this.AudioSettings.Location = new System.Drawing.Point(0, 0);
- this.AudioSettings.Name = "AudioSettings";
- this.AudioSettings.Size = new System.Drawing.Size(715, 310);
- this.AudioSettings.TabIndex = 0;
- //
// AudioMenuRowHeightHack
//
this.AudioMenuRowHeightHack.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
@@ -968,14 +960,6 @@ namespace Handbrake this.tab_picture.Text = "Picture Settings";
this.tab_picture.UseVisualStyleBackColor = true;
//
- // PictureSettings
- //
- this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
- this.PictureSettings.Location = new System.Drawing.Point(0, 0);
- this.PictureSettings.Name = "PictureSettings";
- this.PictureSettings.Size = new System.Drawing.Size(713, 310);
- this.PictureSettings.TabIndex = 0;
- //
// Check_ChapterMarkers
//
this.Check_ChapterMarkers.AutoSize = true;
@@ -1017,14 +1001,6 @@ namespace Handbrake this.tab_filters.Text = "Video Filters";
this.tab_filters.UseVisualStyleBackColor = true;
//
- // Filters
- //
- this.Filters.BackColor = System.Drawing.Color.Transparent;
- this.Filters.Location = new System.Drawing.Point(0, 0);
- this.Filters.Name = "Filters";
- this.Filters.Size = new System.Drawing.Size(713, 310);
- this.Filters.TabIndex = 0;
- //
// tab_subtitles
//
this.tab_subtitles.Controls.Add(this.Subtitles);
@@ -1036,14 +1012,6 @@ namespace Handbrake this.tab_subtitles.Text = "Subtitles";
this.tab_subtitles.UseVisualStyleBackColor = true;
//
- // Subtitles
- //
- this.Subtitles.BackColor = System.Drawing.Color.Transparent;
- this.Subtitles.Location = new System.Drawing.Point(0, 0);
- this.Subtitles.Name = "Subtitles";
- this.Subtitles.Size = new System.Drawing.Size(722, 310);
- this.Subtitles.TabIndex = 0;
- //
// tab_chapters
//
this.tab_chapters.BackColor = System.Drawing.Color.Transparent;
@@ -1081,14 +1049,6 @@ namespace Handbrake this.tab_advanced.Text = "Advanced";
this.tab_advanced.UseVisualStyleBackColor = true;
//
- // x264Panel
- //
- this.x264Panel.Location = new System.Drawing.Point(0, 0);
- this.x264Panel.Name = "x264Panel";
- this.x264Panel.Size = new System.Drawing.Size(720, 306);
- this.x264Panel.TabIndex = 0;
- this.x264Panel.x264Query = "";
- //
// tab_query
//
this.tab_query.Controls.Add(this.btn_clear);
@@ -1474,6 +1434,46 @@ namespace Handbrake this.groupBox_output.TabIndex = 47;
this.groupBox_output.Text = "Output Settings: (Preset: None)";
//
+ // PictureSettings
+ //
+ this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
+ this.PictureSettings.Location = new System.Drawing.Point(0, 0);
+ this.PictureSettings.Name = "PictureSettings";
+ this.PictureSettings.Size = new System.Drawing.Size(713, 310);
+ this.PictureSettings.TabIndex = 0;
+ //
+ // Filters
+ //
+ this.Filters.BackColor = System.Drawing.Color.Transparent;
+ this.Filters.Location = new System.Drawing.Point(0, 0);
+ this.Filters.Name = "Filters";
+ this.Filters.Size = new System.Drawing.Size(713, 310);
+ this.Filters.TabIndex = 0;
+ //
+ // AudioSettings
+ //
+ this.AudioSettings.BackColor = System.Drawing.Color.Transparent;
+ this.AudioSettings.Location = new System.Drawing.Point(0, 0);
+ this.AudioSettings.Name = "AudioSettings";
+ this.AudioSettings.Size = new System.Drawing.Size(715, 310);
+ this.AudioSettings.TabIndex = 0;
+ //
+ // Subtitles
+ //
+ this.Subtitles.BackColor = System.Drawing.Color.Transparent;
+ this.Subtitles.Location = new System.Drawing.Point(0, 0);
+ this.Subtitles.Name = "Subtitles";
+ this.Subtitles.Size = new System.Drawing.Size(722, 310);
+ this.Subtitles.TabIndex = 0;
+ //
+ // x264Panel
+ //
+ this.x264Panel.Location = new System.Drawing.Point(0, 0);
+ this.x264Panel.Name = "x264Panel";
+ this.x264Panel.Size = new System.Drawing.Size(720, 306);
+ this.x264Panel.TabIndex = 0;
+ this.x264Panel.x264Query = "";
+ //
// frmMain
//
this.AllowDrop = true;
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index a8418e002..04d13723d 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -27,7 +27,7 @@ namespace Handbrake QueryGenerator queryGen = new QueryGenerator();
// Globals: Mainly used for tracking. *********************************
- private Title selectedTitle;
+ public Title selectedTitle;
private DVD thisDVD;
private frmQueue queueWindow;
private frmPreview qtpreview;
@@ -177,6 +177,9 @@ namespace Handbrake // Encoding Events for setting up the GUI
private void events()
{
+ // Handle Widget changes when preset is selected.
+ registerPresetEventHandler();
+
// Handle Window Resize
if (Properties.Settings.Default.MainWindowMinimize)
this.Resize += new EventHandler(frmMain_Resize);
@@ -191,6 +194,68 @@ namespace Handbrake this.DragDrop += new DragEventHandler(frmMain_DragDrop);
}
+ // Change the preset label to custom when a user changes a setting. Don't want to give the impression that users can change settings and still be using a preset
+ public void registerPresetEventHandler()
+ {
+ // Output Settings
+ drop_format.SelectedIndexChanged += new EventHandler(changePresetLabel);
+ check_largeFile.CheckedChanged += new EventHandler(changePresetLabel);
+ check_iPodAtom.CheckedChanged += new EventHandler(changePresetLabel);
+ check_optimiseMP4.CheckedChanged += new EventHandler(changePresetLabel);
+
+ // Picture Settings
+ PictureSettings.PictureSettingsChanged += new EventHandler(changePresetLabel);
+
+ // Filter Settings
+ Filters.FilterSettingsChanged += new EventHandler(changePresetLabel);
+
+ // Video Tab
+ drp_videoEncoder.SelectedIndexChanged += new EventHandler(changePresetLabel);
+ check_2PassEncode.CheckedChanged += new EventHandler(changePresetLabel);
+ check_turbo.CheckedChanged += new EventHandler(changePresetLabel);
+ text_filesize.TextChanged += new EventHandler(changePresetLabel);
+ text_bitrate.TextChanged += new EventHandler(changePresetLabel);
+ slider_videoQuality.ValueChanged += new EventHandler(changePresetLabel);
+
+ // Audio Panel
+ AudioSettings.AudioListChanged += new EventHandler(changePresetLabel);
+
+ // Advanced Tab
+ x264Panel.rtf_x264Query.TextChanged += new EventHandler(changePresetLabel);
+ }
+ public void unRegisterPresetEventHandler()
+ {
+ // Output Settings
+ drop_format.SelectedIndexChanged -= new EventHandler(changePresetLabel);
+ check_largeFile.CheckedChanged -= new EventHandler(changePresetLabel);
+ check_iPodAtom.CheckedChanged -= new EventHandler(changePresetLabel);
+ check_optimiseMP4.CheckedChanged -= new EventHandler(changePresetLabel);
+
+ // Picture Settings
+ PictureSettings.PictureSettingsChanged -= new EventHandler(changePresetLabel);
+
+ // Filter Settings
+ Filters.FilterSettingsChanged -= new EventHandler(changePresetLabel);
+
+ // Video Tab
+ drp_videoEncoder.SelectedIndexChanged -= new EventHandler(changePresetLabel);
+ check_2PassEncode.CheckedChanged -= new EventHandler(changePresetLabel);
+ check_turbo.CheckedChanged -= new EventHandler(changePresetLabel);
+ text_filesize.TextChanged -= new EventHandler(changePresetLabel);
+ text_bitrate.TextChanged -= new EventHandler(changePresetLabel);
+ slider_videoQuality.ValueChanged -= new EventHandler(changePresetLabel);
+
+ // Audio Panel
+ AudioSettings.AudioListChanged -= new EventHandler(changePresetLabel);
+
+ // Advanced Tab
+ x264Panel.rtf_x264Query.TextChanged -= new EventHandler(changePresetLabel);
+ }
+ private void changePresetLabel(object sender, EventArgs e)
+ {
+ groupBox_output.Text = "Output Settings (Preset: Custom)";
+ }
+
private static void frmMain_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop, false))
@@ -717,6 +782,7 @@ namespace Handbrake }
else
lbl_source.Text = "Click 'Source' to continue";
+
}
private void mnu_dvd_drive_Click(object sender, EventArgs e)
{
@@ -749,6 +815,7 @@ namespace Handbrake }
private void drp_dvdtitle_SelectedIndexChanged(object sender, EventArgs e)
{
+ unRegisterPresetEventHandler();
// Reset some values on the form
PictureSettings.lbl_Aspect.Text = "Select a Title";
//lbl_RecomendedCrop.Text = "Select a Title";
@@ -827,6 +894,8 @@ namespace Handbrake // Hack to force the redraw of the scrollbars which don't resize properly when the control is disabled.
data_chpt.Columns[0].Width = 166;
data_chpt.Columns[0].Width = 165;
+
+ registerPresetEventHandler();
}
private void drop_chapterStart_SelectedIndexChanged(object sender, EventArgs e)
{
@@ -1505,7 +1574,7 @@ namespace Handbrake {
if (presetHandler.checkIfPresetsAreOutOfDate())
if (!Properties.Settings.Default.presetNotification)
- MessageBox.Show(this,
+ MessageBox.Show(splash,
"HandBrake has determined your built-in presets are out of date... These presets will now be updated.",
"Preset Update", MessageBoxButtons.OK, MessageBoxIcon.Information);
@@ -1568,7 +1637,6 @@ namespace Handbrake }
#endregion
-
// This is the END of the road ****************************************
}
}
\ No newline at end of file |