]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Mon, 29 Jun 2009 20:05:04 +0000 (20:05 +0000)
committersr55 <sr55.hb@outlook.com>
Mon, 29 Jun 2009 20:05:04 +0000 (20:05 +0000)
- 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

win/C#/Controls/AudioPanel.cs
win/C#/Controls/Filters.cs
win/C#/Controls/PictureSettings.cs
win/C#/Functions/PresetLoader.cs
win/C#/Functions/QueryParser.cs
win/C#/frmActivityWindow.Designer.cs
win/C#/frmMain.Designer.cs
win/C#/frmMain.cs

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