]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Fri, 22 May 2009 13:33:39 +0000 (13:33 +0000)
committersr55 <sr55.hb@outlook.com>
Fri, 22 May 2009 13:33:39 +0000 (13:33 +0000)
- Offer option to disable balloon popups on the tray icon.
- Misc code cleanup

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2437 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Properties/AssemblyInfo.cs
win/C#/Properties/Settings.Designer.cs
win/C#/Properties/Settings.settings
win/C#/app.config
win/C#/frmMain.cs
win/C#/frmOptions.Designer.cs
win/C#/frmOptions.cs

index f88d1cc1a2756d890bea7de86707d916b2767f39..59fcc36dfd4567e132247cd4ae125bf72a5529d4 100644 (file)
@@ -17,7 +17,7 @@ using System.Resources;
 [assembly: AssemblyConfiguration("")]\r
 [assembly: AssemblyCompany("HandBrake")]\r
 [assembly: AssemblyProduct("HandBrake")]\r
-[assembly: AssemblyCopyright("Copyright ©  2008")]\r
+[assembly: AssemblyCopyright("Copyright ©  2009")]\r
 [assembly: AssemblyTrademark("")]\r
 [assembly: AssemblyCulture("")]\r
 \r
@@ -36,6 +36,6 @@ using System.Resources;
 //      Build Number\r
 //      Revision\r
 //\r
-[assembly: AssemblyVersion("0.9.3.0")]\r
-[assembly: AssemblyFileVersion("0.9.3.0")]\r
+[assembly: AssemblyVersion("0.9.3.5")]\r
+[assembly: AssemblyFileVersion("0.9.3.5")]\r
 [assembly: NeutralResourcesLanguageAttribute("")]\r
index 3df9d6ba3854a193a08666065af6dff43e1f9b57..f4cb2bd337b60a87bc719b765dccfb795c8c5d02 100644 (file)
@@ -370,5 +370,17 @@ namespace Handbrake.Properties {
                 this["enocdeStatusInGui"] = value;\r
             }\r
         }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("")]\r
+        public string trayIconAlerts {\r
+            get {\r
+                return ((string)(this["trayIconAlerts"]));\r
+            }\r
+            set {\r
+                this["trayIconAlerts"] = value;\r
+            }\r
+        }\r
     }\r
 }\r
index f4f00c1fb4f8370b7dd0f456350664a8bd0abf64..6a94bff039df22822840e8a5e5e78bf2e99b7416 100644 (file)
@@ -89,5 +89,8 @@
     <Setting Name="enocdeStatusInGui" Type="System.String" Scope="User">\r
       <Value Profile="(Default)" />\r
     </Setting>\r
+    <Setting Name="trayIconAlerts" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)" />\r
+    </Setting>\r
   </Settings>\r
 </SettingsFile>
\ No newline at end of file
index ef6471be5ad253619c9a7440822ec522d76e775e..d4c74e98ab6a2910c73ffa75e38e876e4387a812 100644 (file)
@@ -94,6 +94,9 @@
             <setting name="enocdeStatusInGui" serializeAs="String">\r
                 <value />\r
             </setting>\r
+            <setting name="trayIconAlerts" serializeAs="String">\r
+                <value />\r
+            </setting>\r
         </Handbrake.Properties.Settings>\r
     </userSettings>\r
 <startup><supportedRuntime version="v2.0.50727"/></startup></configuration>\r
index 7ed6d0f486d3c694863fdd40f5ba6225509a9c96..cc28130acbef52f72131daf390d15502ee34d036 100644 (file)
@@ -253,8 +253,7 @@ namespace Handbrake
         }\r
         private void mnu_encodeLog_Click(object sender, EventArgs e)\r
         {\r
-            String file;\r
-            file = lastAction == "scan" ? "last_scan_log.txt" : "last_encode_log.txt";\r
+            String file = lastAction == "scan" ? "last_scan_log.txt" : "last_encode_log.txt";\r
 \r
             frmActivityWindow dvdInfoWindow = new frmActivityWindow(file, encodeQueue, this);\r
             dvdInfoWindow.Show();\r
@@ -379,15 +378,9 @@ namespace Handbrake
             if (treeView_presets.SelectedNode != null)\r
             {\r
                 presetHandler.remove(treeView_presets.SelectedNode.Text);\r
-\r
-                // Remember each nodes expanded status so we can reload it\r
-                List<Boolean> nodeStatus = saveTreeViewState();\r
-\r
-                // Now reload the preset panel\r
+                List<Boolean> nodeStatus = saveTreeViewState();  // Remember each nodes expanded status so we can reload it\r
                 loadPresetPanel();\r
-\r
-                // Now reload the TreeView states\r
-                loadTreeViewStates(nodeStatus);\r
+                loadTreeViewStates(nodeStatus);   // Now reload the TreeView states\r
             }\r
             treeView_presets.Select();\r
         }\r
@@ -398,12 +391,9 @@ namespace Handbrake
 \r
             // Now enable the save menu if the selected preset is a user preset\r
             if (treeView_presets.SelectedNode != null)\r
-            {\r
                 if (presetHandler.checkIfUserPresetExists(treeView_presets.SelectedNode.Text))\r
-                {\r
                     pmnu_saveChanges.Enabled = true;\r
-                }\r
-            }\r
+\r
             treeView_presets.Select();\r
         }\r
 \r
@@ -429,14 +419,9 @@ namespace Handbrake
                 if (treeView_presets.SelectedNode != null)\r
                     presetHandler.remove(treeView_presets.SelectedNode.Text);\r
 \r
-                // Remember each nodes expanded status so we can reload it\r
-                List<Boolean> nodeStatus = saveTreeViewState();\r
-\r
-                // Now reload the preset panel\r
+                List<Boolean> nodeStatus = saveTreeViewState();  // Remember each nodes expanded status so we can reload it\r
                 loadPresetPanel();\r
-\r
-                // Now reload the TreeView states\r
-                loadTreeViewStates(nodeStatus);\r
+                loadTreeViewStates(nodeStatus); // Now reload the TreeView states\r
             }\r
             treeView_presets.Select();\r
         }\r
@@ -649,7 +634,6 @@ namespace Handbrake
                 if (rtf_query.Text != "")\r
                     query = rtf_query.Text;\r
 \r
-\r
                 if (encodeQueue.checkDestinationPath(text_destination.Text))\r
                 {\r
                     DialogResult result = MessageBox.Show("There is already a queue item for this destination path. \n\n If you continue, the encode will be overwritten. Do you wish to continue?",\r
@@ -707,7 +691,8 @@ namespace Handbrake
                 if (!encodeQueue.isEncoding)\r
                 {\r
                     notifyIcon.BalloonTipText = lbl_encode.Text != "" ? lbl_encode.Text : "Not Encoding";\r
-                    notifyIcon.ShowBalloonTip(500);\r
+                    if (Properties.Settings.Default.trayIconAlerts == "Checked")\r
+                        notifyIcon.ShowBalloonTip(500);\r
                 }\r
                 this.Hide();\r
             }\r
@@ -1067,7 +1052,28 @@ namespace Handbrake
                 setExtension(".mkv");\r
 \r
             audioPanel.setAudioByContainer(drop_format.Text);\r
-            setVideoByContainer(drop_format.Text);\r
+\r
+            string oldval;\r
+            if ((drop_format.Text.Contains("MP4")) || (drop_format.Text.Contains("M4V")))\r
+            {\r
+                oldval = drp_videoEncoder.Text;\r
+                drp_videoEncoder.Items.Clear();\r
+                drp_videoEncoder.Items.Add("MPEG-4 (FFmpeg)");\r
+                drp_videoEncoder.Items.Add("H.264 (x264)");\r
+                if (oldval == "VP3 (Theora)")\r
+                    drp_videoEncoder.SelectedIndex = 1;\r
+                else\r
+                    drp_videoEncoder.Text = oldval;\r
+            }\r
+            else if (drop_format.Text.Contains("MKV"))\r
+            {\r
+                oldval = drp_videoEncoder.Text;\r
+                drp_videoEncoder.Items.Clear();\r
+                drp_videoEncoder.Items.Add("MPEG-4 (FFmpeg)");\r
+                drp_videoEncoder.Items.Add("H.264 (x264)");\r
+                drp_videoEncoder.Items.Add("VP3 (Theora)");\r
+                drp_videoEncoder.Text = oldval;\r
+            }\r
         }\r
         private void setExtension(string newExtension)\r
         {\r
@@ -1153,7 +1159,7 @@ namespace Handbrake
         /// </summary>\r
         public void setContainerOpts()\r
         {\r
-            if ((text_destination.Text.Contains(".mp4")) || (text_destination.Text.Contains(".m4v")))\r
+            if ((drop_format.Text.Contains("MP4")) || (drop_format.Text.Contains("M4V")))\r
             {\r
                 check_largeFile.Enabled = true;\r
                 check_optimiseMP4.Enabled = true;\r
@@ -1272,10 +1278,7 @@ namespace Handbrake
                 text_height.BackColor = Color.White;\r
 \r
             maxHeight = 0;  // Reset max height so that it's not using the MaxHeight -Y. Quick hack to allow -Y for preset usage.\r
-            if (maxWidth != 0)\r
-                lbl_max.Text = "Max Width";\r
-            else\r
-                lbl_max.Text = "";\r
+            lbl_max.Text = maxWidth != 0 ? "Max Width" : "";\r
 \r
             int height;\r
             Boolean parsed = int.TryParse(text_height.Text, out height);\r
@@ -1360,7 +1363,6 @@ namespace Handbrake
         }\r
 \r
         //Subtitles Tab\r
-\r
         private void drp_subtitle_SelectedIndexChanged(object sender, EventArgs e)\r
         {\r
             if (drp_subtitle.Text.Contains("None"))\r
@@ -1377,7 +1379,7 @@ namespace Handbrake
         {\r
             if (Check_ChapterMarkers.Checked)\r
             {\r
-                text_destination.Text = text_destination.Text.Replace(".m4v", ".mp4");\r
+                drop_format.SelectedIndex = 1;\r
                 data_chpt.Rows.Clear();\r
                 data_chpt.Enabled = true;\r
                 DataGridView chapterGridView = Main.chapterNaming(data_chpt, drop_chapterFinish.Text);\r
@@ -1386,7 +1388,7 @@ namespace Handbrake
             }\r
             else\r
             {\r
-                text_destination.Text = text_destination.Text.Replace(".m4v", ".mp4");\r
+                drop_format.SelectedIndex = 0;\r
                 data_chpt.Rows.Clear();\r
                 data_chpt.Enabled = false;\r
             }\r
@@ -1700,36 +1702,6 @@ namespace Handbrake
         }\r
         #endregion\r
 \r
-        #region Audio Panel Code Helpers\r
-        \r
-        private void setVideoByContainer(String path)\r
-        {\r
-            string oldval;\r
-\r
-            if ((path.Contains("MP4")) || (path.Contains("M4V")))\r
-            {\r
-                oldval = drp_videoEncoder.Text;\r
-                drp_videoEncoder.Items.Clear();\r
-                drp_videoEncoder.Items.Add("MPEG-4 (FFmpeg)");\r
-                drp_videoEncoder.Items.Add("H.264 (x264)");\r
-                if (oldval == "VP3 (Theora)")\r
-                    drp_videoEncoder.SelectedIndex = 1;\r
-                else\r
-                    drp_videoEncoder.Text = oldval;\r
-\r
-            }\r
-            else if (path.Contains("MKV"))\r
-            {\r
-                oldval = drp_videoEncoder.Text;\r
-                drp_videoEncoder.Items.Clear();\r
-                drp_videoEncoder.Items.Add("MPEG-4 (FFmpeg)");\r
-                drp_videoEncoder.Items.Add("H.264 (x264)");\r
-                drp_videoEncoder.Items.Add("VP3 (Theora)");\r
-                drp_videoEncoder.Text = oldval;\r
-            }\r
-        }\r
-        #endregion\r
-\r
         #region Public Methods\r
         /// <summary>\r
         /// Access the preset Handler and setup the preset panel.\r
@@ -1803,8 +1775,6 @@ namespace Handbrake
         }\r
         #endregion\r
 \r
-\r
-\r
         // This is the END of the road ****************************************\r
     }\r
 }
\ No newline at end of file
index c05ba9faf36b5f401e307a584f8186b11c399743..24b9bf11a4ba00173dd25517497ec5b5d0f00509 100644 (file)
@@ -73,6 +73,7 @@ namespace Handbrake
             this.drp_processors = new System.Windows.Forms.ComboBox();\r
             this.Label4 = new System.Windows.Forms.Label();\r
             this.tab_advanced = new System.Windows.Forms.TabPage();\r
+            this.check_inGuiStatus = new System.Windows.Forms.CheckBox();\r
             this.check_disablePresetNotification = new System.Windows.Forms.CheckBox();\r
             this.check_dvdnav = new System.Windows.Forms.CheckBox();\r
             this.label32 = new System.Windows.Forms.Label();\r
@@ -118,7 +119,7 @@ namespace Handbrake
             this.label26 = new System.Windows.Forms.Label();\r
             this.label27 = new System.Windows.Forms.Label();\r
             this.openFile_vlc = new System.Windows.Forms.OpenFileDialog();\r
-            this.check_inGuiStatus = new System.Windows.Forms.CheckBox();\r
+            this.check_trayStatusAlerts = new System.Windows.Forms.CheckBox();\r
             this.tab_options.SuspendLayout();\r
             this.tab_general.SuspendLayout();\r
             this.tab_picture.SuspendLayout();\r
@@ -191,7 +192,7 @@ namespace Handbrake
             this.tab_general.Controls.Add(this.drp_completeOption);\r
             this.tab_general.Location = new System.Drawing.Point(4, 22);\r
             this.tab_general.Name = "tab_general";\r
-            this.tab_general.Size = new System.Drawing.Size(482, 283);\r
+            this.tab_general.Size = new System.Drawing.Size(482, 295);\r
             this.tab_general.TabIndex = 3;\r
             this.tab_general.Text = "General";\r
             this.tab_general.UseVisualStyleBackColor = true;\r
@@ -353,7 +354,7 @@ namespace Handbrake
             this.tab_picture.Controls.Add(this.label29);\r
             this.tab_picture.Location = new System.Drawing.Point(4, 22);\r
             this.tab_picture.Name = "tab_picture";\r
-            this.tab_picture.Size = new System.Drawing.Size(482, 283);\r
+            this.tab_picture.Size = new System.Drawing.Size(482, 295);\r
             this.tab_picture.TabIndex = 5;\r
             this.tab_picture.Text = "Picture";\r
             this.tab_picture.UseVisualStyleBackColor = true;\r
@@ -409,7 +410,7 @@ namespace Handbrake
             this.tab_cli.Controls.Add(this.Label4);\r
             this.tab_cli.Location = new System.Drawing.Point(4, 22);\r
             this.tab_cli.Name = "tab_cli";\r
-            this.tab_cli.Size = new System.Drawing.Size(482, 283);\r
+            this.tab_cli.Size = new System.Drawing.Size(482, 295);\r
             this.tab_cli.TabIndex = 2;\r
             this.tab_cli.Text = "CLI";\r
             this.tab_cli.UseVisualStyleBackColor = true;\r
@@ -599,6 +600,7 @@ namespace Handbrake
             // \r
             // tab_advanced\r
             // \r
+            this.tab_advanced.Controls.Add(this.check_trayStatusAlerts);\r
             this.tab_advanced.Controls.Add(this.check_inGuiStatus);\r
             this.tab_advanced.Controls.Add(this.check_disablePresetNotification);\r
             this.tab_advanced.Controls.Add(this.check_dvdnav);\r
@@ -620,12 +622,26 @@ namespace Handbrake
             this.tab_advanced.Text = "Advanced / Other";\r
             this.tab_advanced.UseVisualStyleBackColor = true;\r
             // \r
+            // check_inGuiStatus\r
+            // \r
+            this.check_inGuiStatus.AutoSize = true;\r
+            this.check_inGuiStatus.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_inGuiStatus.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_inGuiStatus.Location = new System.Drawing.Point(76, 133);\r
+            this.check_inGuiStatus.Name = "check_inGuiStatus";\r
+            this.check_inGuiStatus.Size = new System.Drawing.Size(281, 17);\r
+            this.check_inGuiStatus.TabIndex = 92;\r
+            this.check_inGuiStatus.Text = "Enable in-GUI Encode status. (Experimental)";\r
+            this.ToolTip.SetToolTip(this.check_inGuiStatus, "Displays the CLI status in the GUI windows instead of the CLI window.");\r
+            this.check_inGuiStatus.UseVisualStyleBackColor = false;\r
+            this.check_inGuiStatus.CheckedChanged += new System.EventHandler(this.check_inGuiStatus_CheckedChanged);\r
+            // \r
             // check_disablePresetNotification\r
             // \r
             this.check_disablePresetNotification.AutoSize = true;\r
             this.check_disablePresetNotification.BackColor = System.Drawing.Color.Transparent;\r
             this.check_disablePresetNotification.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.check_disablePresetNotification.Location = new System.Drawing.Point(76, 87);\r
+            this.check_disablePresetNotification.Location = new System.Drawing.Point(76, 110);\r
             this.check_disablePresetNotification.Name = "check_disablePresetNotification";\r
             this.check_disablePresetNotification.Size = new System.Drawing.Size(261, 17);\r
             this.check_disablePresetNotification.TabIndex = 91;\r
@@ -640,7 +656,7 @@ namespace Handbrake
             this.check_dvdnav.AutoSize = true;\r
             this.check_dvdnav.BackColor = System.Drawing.Color.Transparent;\r
             this.check_dvdnav.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.check_dvdnav.Location = new System.Drawing.Point(76, 232);\r
+            this.check_dvdnav.Location = new System.Drawing.Point(76, 257);\r
             this.check_dvdnav.Name = "check_dvdnav";\r
             this.check_dvdnav.Size = new System.Drawing.Size(297, 17);\r
             this.check_dvdnav.TabIndex = 90;\r
@@ -652,7 +668,7 @@ namespace Handbrake
             // \r
             this.label32.AutoSize = true;\r
             this.label32.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label32.Location = new System.Drawing.Point(38, 232);\r
+            this.label32.Location = new System.Drawing.Point(38, 257);\r
             this.label32.Name = "label32";\r
             this.label32.Size = new System.Drawing.Size(32, 13);\r
             this.label32.TabIndex = 89;\r
@@ -661,7 +677,7 @@ namespace Handbrake
             // label30\r
             // \r
             this.label30.AutoSize = true;\r
-            this.label30.Location = new System.Drawing.Point(73, 190);\r
+            this.label30.Location = new System.Drawing.Point(73, 215);\r
             this.label30.Name = "label30";\r
             this.label30.Size = new System.Drawing.Size(230, 13);\r
             this.label30.TabIndex = 87;\r
@@ -677,7 +693,7 @@ namespace Handbrake
             "0.50",\r
             "0.25",\r
             "0.20"});\r
-            this.drop_x264step.Location = new System.Drawing.Point(312, 187);\r
+            this.drop_x264step.Location = new System.Drawing.Point(312, 212);\r
             this.drop_x264step.Name = "drop_x264step";\r
             this.drop_x264step.Size = new System.Drawing.Size(111, 21);\r
             this.drop_x264step.TabIndex = 86;\r
@@ -689,7 +705,7 @@ namespace Handbrake
             // \r
             this.label28.AutoSize = true;\r
             this.label28.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label28.Location = new System.Drawing.Point(27, 190);\r
+            this.label28.Location = new System.Drawing.Point(27, 215);\r
             this.label28.Name = "label28";\r
             this.label28.Size = new System.Drawing.Size(43, 13);\r
             this.label28.TabIndex = 85;\r
@@ -700,7 +716,7 @@ namespace Handbrake
             this.check_queryEditorTab.AutoSize = true;\r
             this.check_queryEditorTab.BackColor = System.Drawing.Color.Transparent;\r
             this.check_queryEditorTab.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.check_queryEditorTab.Location = new System.Drawing.Point(76, 64);\r
+            this.check_queryEditorTab.Location = new System.Drawing.Point(76, 87);\r
             this.check_queryEditorTab.Name = "check_queryEditorTab";\r
             this.check_queryEditorTab.Size = new System.Drawing.Size(175, 17);\r
             this.check_queryEditorTab.TabIndex = 84;\r
@@ -714,7 +730,7 @@ namespace Handbrake
             // \r
             this.lbl_appcastUnstable.AutoSize = true;\r
             this.lbl_appcastUnstable.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.lbl_appcastUnstable.Location = new System.Drawing.Point(6, 153);\r
+            this.lbl_appcastUnstable.Location = new System.Drawing.Point(6, 178);\r
             this.lbl_appcastUnstable.Name = "lbl_appcastUnstable";\r
             this.lbl_appcastUnstable.Size = new System.Drawing.Size(64, 13);\r
             this.lbl_appcastUnstable.TabIndex = 83;\r
@@ -741,7 +757,7 @@ namespace Handbrake
             this.check_snapshot.AutoSize = true;\r
             this.check_snapshot.BackColor = System.Drawing.Color.Transparent;\r
             this.check_snapshot.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.check_snapshot.Location = new System.Drawing.Point(76, 152);\r
+            this.check_snapshot.Location = new System.Drawing.Point(76, 177);\r
             this.check_snapshot.Name = "check_snapshot";\r
             this.check_snapshot.Size = new System.Drawing.Size(273, 17);\r
             this.check_snapshot.TabIndex = 80;\r
@@ -1130,19 +1146,21 @@ namespace Handbrake
             this.openFile_vlc.DefaultExt = "exe";\r
             this.openFile_vlc.Filter = "exe|*.exe";\r
             // \r
-            // check_inGuiStatus\r
-            // \r
-            this.check_inGuiStatus.AutoSize = true;\r
-            this.check_inGuiStatus.BackColor = System.Drawing.Color.Transparent;\r
-            this.check_inGuiStatus.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.check_inGuiStatus.Location = new System.Drawing.Point(76, 110);\r
-            this.check_inGuiStatus.Name = "check_inGuiStatus";\r
-            this.check_inGuiStatus.Size = new System.Drawing.Size(281, 17);\r
-            this.check_inGuiStatus.TabIndex = 92;\r
-            this.check_inGuiStatus.Text = "Enable in-GUI Encode status. (Experimental)";\r
-            this.ToolTip.SetToolTip(this.check_inGuiStatus, "Displays the CLI status in the GUI windows instead of the CLI window.");\r
-            this.check_inGuiStatus.UseVisualStyleBackColor = false;\r
-            this.check_inGuiStatus.CheckedChanged += new System.EventHandler(this.check_inGuiStatus_CheckedChanged);\r
+            // check_trayStatusAlerts\r
+            // \r
+            this.check_trayStatusAlerts.AutoSize = true;\r
+            this.check_trayStatusAlerts.BackColor = System.Drawing.Color.Transparent;\r
+            this.check_trayStatusAlerts.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_trayStatusAlerts.Location = new System.Drawing.Point(97, 64);\r
+            this.check_trayStatusAlerts.Name = "check_trayStatusAlerts";\r
+            this.check_trayStatusAlerts.Size = new System.Drawing.Size(352, 17);\r
+            this.check_trayStatusAlerts.TabIndex = 93;\r
+            this.check_trayStatusAlerts.Text = "Display status messages from tray icon (balloon popups)";\r
+            this.ToolTip.SetToolTip(this.check_trayStatusAlerts, "Minimize the window to the system tray rather than the task bar.\r\nThe system tray" +\r
+                    " icon has encode status notifications.\r\nNote: requires restart to take effect!\r\n" +\r
+                    "");\r
+            this.check_trayStatusAlerts.UseVisualStyleBackColor = false;\r
+            this.check_trayStatusAlerts.CheckedChanged += new System.EventHandler(this.check_trayStatusAlerts_CheckedChanged);\r
             // \r
             // frmOptions\r
             // \r
@@ -1259,5 +1277,6 @@ namespace Handbrake
         internal System.Windows.Forms.CheckBox check_logsInSpecifiedLocation;\r
         internal System.Windows.Forms.CheckBox check_disablePresetNotification;\r
         internal System.Windows.Forms.CheckBox check_inGuiStatus;\r
+        internal System.Windows.Forms.CheckBox check_trayStatusAlerts;\r
     }\r
 }
\ No newline at end of file
index 0feae4cbb339024816f7c4500e304454e5d3b89f..93842b5d2b4e7fc802c0563c34534fdcde6c8873 100644 (file)
@@ -90,21 +90,18 @@ namespace Handbrake
             // Advanced\r
             // #############################\r
 \r
-            // Unstable Snapshot checking should only be visible for stable builds.\r
-            if (Properties.Settings.Default.hb_build.ToString().EndsWith("1"))\r
-            {\r
-                lbl_appcastUnstable.Visible = false;\r
-                check_snapshot.Visible = false;\r
-            }\r
-\r
-            // Enable snapshot updating\r
-            if (Properties.Settings.Default.checkSnapshot == "Checked")\r
-                check_snapshot.CheckState = CheckState.Checked;\r
-\r
             // Enable GUI DVD Drive detection code\r
             if (Properties.Settings.Default.drive_detection == "Checked")\r
                 btn_drive_detect.CheckState = CheckState.Checked;\r
 \r
+            // Minimise to Tray\r
+            if (Properties.Settings.Default.trayIconAlerts == "Checked")\r
+                check_trayStatusAlerts.CheckState = CheckState.Checked;\r
+\r
+            // Tray Balloon popups\r
+            if (Properties.Settings.Default.MainWindowMinimize == "Checked")\r
+                check_mainMinimize.CheckState = CheckState.Checked;\r
+\r
             // Enable / Disable Query editor tab\r
             if (Properties.Settings.Default.QueryEditorTab == "Checked")\r
                 check_queryEditorTab.CheckState = CheckState.Checked;\r
@@ -116,10 +113,17 @@ namespace Handbrake
             // Experimental In-GUI encode status indicator.\r
             if (Properties.Settings.Default.enocdeStatusInGui == "Checked")\r
                 check_inGuiStatus.CheckState = CheckState.Checked;\r
-\r
+           \r
             // Enable snapshot updating\r
-            if (Properties.Settings.Default.MainWindowMinimize == "Checked")\r
-                check_mainMinimize.CheckState = CheckState.Checked;\r
+            if (Properties.Settings.Default.checkSnapshot == "Checked")\r
+                check_snapshot.CheckState = CheckState.Checked;\r
+            \r
+            // Unstable Snapshot checking should only be visible for stable builds.\r
+            if (Properties.Settings.Default.hb_build.ToString().EndsWith("1"))\r
+            {\r
+                lbl_appcastUnstable.Visible = false;\r
+                check_snapshot.Visible = false;\r
+            }\r
 \r
             // x264 step\r
             drop_x264step.SelectedItem = Properties.Settings.Default.x264cqstep;\r
@@ -246,6 +250,11 @@ namespace Handbrake
             Properties.Settings.Default.MainWindowMinimize = check_mainMinimize.CheckState.ToString();\r
         }\r
 \r
+        private void check_trayStatusAlerts_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.trayIconAlerts = check_trayStatusAlerts.CheckState.ToString();\r
+        }\r
+\r
         private void check_queryEditorTab_CheckedChanged(object sender, EventArgs e)\r
         {\r
             Properties.Settings.Default.QueryEditorTab = check_queryEditorTab.CheckState.ToString();\r