OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 17 Jun 2009 15:38:29 +0000 (15:38 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 17 Jun 2009 15:38:29 +0000 (15:38 +0000)
- Updated the appcast checker to handle the modified appcast format.
- New option to set the number of days between update checks on startup. Default 5

git-svn-id: svn://localhost/HandBrake/trunk@2551 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Controls/Subtitles.cs
win/C#/Functions/AppcastReader.cs
win/C#/Functions/Main.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
win/C#/frmUpdater.cs

index 56edcc8..b5dfeef 100644 (file)
@@ -33,9 +33,6 @@ namespace Handbrake.Controls
                 }\r
         }\r
 \r
-\r
-\r
-\r
         // Controls\r
         private void btn_addSubTrack_Click(object sender, EventArgs e)\r
         {\r
index b52c22d..e86259f 100644 (file)
@@ -4,6 +4,7 @@
           Homepage: <http://handbrake.fr>.\r
           It may be used under the terms of the GNU General Public License. */\r
 \r
+using System;\r
 using System.Xml;\r
 using System.Text.RegularExpressions;\r
 \r
@@ -15,7 +16,7 @@ namespace Handbrake.Functions
         XmlNode nodeRss;\r
         XmlNode nodeChannel;\r
         XmlNode nodeItem;\r
-        private string hb_description;\r
+        private Uri hb_description;\r
         private string hb_version;\r
         private string hb_build;\r
         private string hb_file;\r
@@ -26,49 +27,26 @@ namespace Handbrake.Functions
         /// </summary>\r
         public void getInfo()\r
         {\r
-            int unstable_build = 0;\r
-            string unstable_description = "", unstable_version = "";\r
-            string unstable_file = "";\r
+            // Get the correct Appcast and set input.\r
+            if (Properties.Settings.Default.hb_build.ToString().EndsWith("1"))\r
+                readRss(new XmlTextReader(Properties.Settings.Default.appcast_unstable));\r
+            else \r
+                readRss(new XmlTextReader(Properties.Settings.Default.appcast));\r
 \r
-            // Check the stable appcast and get the stable build number\r
-            readRss(new XmlTextReader(Properties.Settings.Default.appcast));\r
             string input = nodeItem.InnerXml;\r
+\r
+            // Regular Expressions\r
             Match ver = Regex.Match(input, @"sparkle:version=""([0-9]*)\""");\r
-            int stable_build = int.Parse(ver.ToString().Replace("sparkle:version=", "").Replace("\"", ""));\r
-            ver = Regex.Match(input, @"sparkle:shortVersionString=""([0-9].[0-9].[0-9]*)\""");\r
-            string stable_version = ver.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");\r
-            string stable_description = nodeItem["description"].InnerText;\r
-            string stable_file = nodeItem["windows"].InnerText;\r
+            Match verShort = Regex.Match(input, @"sparkle:shortVersionString=""([0-9].[0-9].[0-9]*)\""");\r
 \r
-            // If this is a snapshot release, or the user wants to check for snapshot releases\r
-            if (Properties.Settings.Default.checkSnapshot == "Checked" || Properties.Settings.Default.hb_build.ToString().EndsWith("1"))\r
+            if (nodeItem != null)\r
             {\r
-                // Get the stable build\r
-                readRss(new XmlTextReader(Properties.Settings.Default.appcast_unstable));\r
-                input = nodeItem.InnerXml;\r
-                ver = Regex.Match(input, @"sparkle:version=""([0-9]*)\""");\r
-                unstable_build = int.Parse(ver.ToString().Replace("sparkle:version=", "").Replace("\"", ""));\r
-                ver = Regex.Match(input, @"sparkle:shortVersionString=""([0-9a-zA-Z.]*)\""");\r
-                unstable_version = ver.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");\r
-                unstable_description = nodeItem["description"].InnerText;\r
-                unstable_file = nodeItem["windows"].InnerText;\r
+                hb_build = ver.ToString().Replace("sparkle:version=", "").Replace("\"", "");\r
+                hb_version = verShort.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");\r
+                hb_file = nodeItem["windows"].InnerText;\r
+                hb_description = new Uri(nodeItem["sparkle:releaseNotesLink"].InnerText);\r
             }\r
 \r
-            // Set the global version information\r
-            if (stable_build >= unstable_build)\r
-            {\r
-                hb_description = stable_description;\r
-                hb_version = stable_version;\r
-                hb_build = stable_build.ToString();\r
-                hb_file = stable_file;\r
-            }\r
-            else\r
-            {\r
-                hb_description = unstable_description;\r
-                hb_version = unstable_version;\r
-                hb_build = unstable_build.ToString();\r
-                hb_file = unstable_file;\r
-            }\r
         }\r
 \r
         /// <summary>\r
@@ -103,7 +81,7 @@ namespace Handbrake.Functions
         /// Get Information about an update to HandBrake\r
         /// </summary>\r
         /// <returns></returns>\r
-        public string versionInfo()\r
+        public System.Uri descriptionUrl()\r
         {\r
             return hb_description;\r
         }\r
index 9d936cd..f6c85b1 100644 (file)
@@ -208,6 +208,9 @@ namespace Handbrake.Functions
                 if (latest == skip)\r
                     return false;\r
 \r
+                Properties.Settings.Default.lastUpdateCheckDate = DateTime.Now;\r
+                Properties.Settings.Default.Save();\r
+\r
                 Boolean update = (latest > current);\r
                 return update;\r
             }\r
index d03a34d..f1eec40 100644 (file)
@@ -217,18 +217,6 @@ namespace Handbrake.Properties {
         \r
         [global::System.Configuration.UserScopedSettingAttribute()]\r
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-        [global::System.Configuration.DefaultSettingValueAttribute("")]\r
-        public string checkSnapshot {\r
-            get {\r
-                return ((string)(this["checkSnapshot"]));\r
-            }\r
-            set {\r
-                this["checkSnapshot"] = value;\r
-            }\r
-        }\r
-        \r
-        [global::System.Configuration.UserScopedSettingAttribute()]\r
-        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
         [global::System.Configuration.DefaultSettingValueAttribute("{source}-{title}")]\r
         public string autoNameFormat {\r
             get {\r
@@ -382,5 +370,28 @@ namespace Handbrake.Properties {
                 this["trayIconAlerts"] = value;\r
             }\r
         }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        public global::System.DateTime lastUpdateCheckDate {\r
+            get {\r
+                return ((global::System.DateTime)(this["lastUpdateCheckDate"]));\r
+            }\r
+            set {\r
+                this["lastUpdateCheckDate"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("5")]\r
+        public int daysBetweenUpdateCheck {\r
+            get {\r
+                return ((int)(this["daysBetweenUpdateCheck"]));\r
+            }\r
+            set {\r
+                this["daysBetweenUpdateCheck"] = value;\r
+            }\r
+        }\r
     }\r
 }\r
index d8d2a1c..5102e49 100644 (file)
@@ -50,9 +50,6 @@
     <Setting Name="cli_minimized" Type="System.String" Scope="User">\r
       <Value Profile="(Default)" />\r
     </Setting>\r
-    <Setting Name="checkSnapshot" Type="System.String" Scope="User">\r
-      <Value Profile="(Default)" />\r
-    </Setting>\r
     <Setting Name="autoNameFormat" Type="System.String" Scope="User">\r
       <Value Profile="(Default)">{source}-{title}</Value>\r
     </Setting>\r
     <Setting Name="trayIconAlerts" Type="System.String" Scope="User">\r
       <Value Profile="(Default)" />\r
     </Setting>\r
+    <Setting Name="lastUpdateCheckDate" Type="System.DateTime" Scope="User">\r
+      <Value Profile="(Default)" />\r
+    </Setting>\r
+    <Setting Name="daysBetweenUpdateCheck" Type="System.Int32" Scope="User">\r
+      <Value Profile="(Default)">5</Value>\r
+    </Setting>\r
   </Settings>\r
 </SettingsFile>
\ No newline at end of file
index 344c8dd..54978e8 100644 (file)
@@ -55,9 +55,6 @@
             <setting name="cli_minimized" serializeAs="String">\r
                 <value />\r
             </setting>\r
-            <setting name="checkSnapshot" serializeAs="String">\r
-                <value />\r
-            </setting>\r
             <setting name="autoNameFormat" serializeAs="String">\r
                 <value>{source}-{title}</value>\r
             </setting>\r
             <setting name="trayIconAlerts" serializeAs="String">\r
                 <value />\r
             </setting>\r
+            <setting name="lastUpdateCheckDate" serializeAs="String">\r
+                <value />\r
+            </setting>\r
+            <setting name="daysBetweenUpdateCheck" serializeAs="String">\r
+                <value>5</value>\r
+            </setting>\r
         </Handbrake.Properties.Settings>\r
     </userSettings>\r
 <startup><supportedRuntime version="v2.0.50727"/></startup></configuration>\r
index 91e509a..8329cc7 100644 (file)
@@ -62,11 +62,17 @@ namespace Handbrake
             // Check for new versions, if update checking is enabled\r
             if (Properties.Settings.Default.updateStatus == "Checked")\r
             {\r
-                lblStatus.Text = "Checking for updates ...";\r
-                Application.DoEvents();\r
+                DateTime now = DateTime.Now;\r
+                DateTime lastCheck = Properties.Settings.Default.lastUpdateCheckDate;\r
+                TimeSpan elapsed = now.Subtract(lastCheck);\r
+                if (elapsed.TotalDays > Properties.Settings.Default.daysBetweenUpdateCheck)\r
+                {\r
+                    lblStatus.Text = "Checking for updates ...";\r
+                    Application.DoEvents();\r
 \r
-                Thread updateCheckThread = new Thread(startupUpdateCheck);\r
-                updateCheckThread.Start();\r
+                    Thread updateCheckThread = new Thread(startupUpdateCheck);\r
+                    updateCheckThread.Start();\r
+                }\r
             }\r
 \r
             // Setup the GUI components\r
index 24b9bf1..dfe1350 100644 (file)
@@ -73,6 +73,8 @@ 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.numeric_updateCheckDays = new System.Windows.Forms.NumericUpDown();\r
+            this.check_trayStatusAlerts = new System.Windows.Forms.CheckBox();\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
@@ -81,9 +83,7 @@ namespace Handbrake
             this.drop_x264step = new System.Windows.Forms.ComboBox();\r
             this.label28 = new System.Windows.Forms.Label();\r
             this.check_queryEditorTab = new System.Windows.Forms.CheckBox();\r
-            this.lbl_appcastUnstable = new System.Windows.Forms.Label();\r
             this.check_mainMinimize = new System.Windows.Forms.CheckBox();\r
-            this.check_snapshot = new System.Windows.Forms.CheckBox();\r
             this.btn_drive_detect = new System.Windows.Forms.CheckBox();\r
             this.label6 = new System.Windows.Forms.Label();\r
             this.label8 = new System.Windows.Forms.Label();\r
@@ -119,12 +119,14 @@ 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_trayStatusAlerts = new System.Windows.Forms.CheckBox();\r
+            this.label15 = new System.Windows.Forms.Label();\r
+            this.label31 = new System.Windows.Forms.Label();\r
             this.tab_options.SuspendLayout();\r
             this.tab_general.SuspendLayout();\r
             this.tab_picture.SuspendLayout();\r
             this.tab_cli.SuspendLayout();\r
             this.tab_advanced.SuspendLayout();\r
+            ((System.ComponentModel.ISupportInitialize)(this.numeric_updateCheckDays)).BeginInit();\r
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();\r
             this.SuspendLayout();\r
             // \r
@@ -600,6 +602,9 @@ namespace Handbrake
             // \r
             // tab_advanced\r
             // \r
+            this.tab_advanced.Controls.Add(this.label31);\r
+            this.tab_advanced.Controls.Add(this.label15);\r
+            this.tab_advanced.Controls.Add(this.numeric_updateCheckDays);\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
@@ -609,9 +614,7 @@ namespace Handbrake
             this.tab_advanced.Controls.Add(this.drop_x264step);\r
             this.tab_advanced.Controls.Add(this.label28);\r
             this.tab_advanced.Controls.Add(this.check_queryEditorTab);\r
-            this.tab_advanced.Controls.Add(this.lbl_appcastUnstable);\r
             this.tab_advanced.Controls.Add(this.check_mainMinimize);\r
-            this.tab_advanced.Controls.Add(this.check_snapshot);\r
             this.tab_advanced.Controls.Add(this.btn_drive_detect);\r
             this.tab_advanced.Controls.Add(this.label6);\r
             this.tab_advanced.Location = new System.Drawing.Point(4, 22);\r
@@ -622,6 +625,45 @@ namespace Handbrake
             this.tab_advanced.Text = "Advanced / Other";\r
             this.tab_advanced.UseVisualStyleBackColor = true;\r
             // \r
+            // numeric_updateCheckDays\r
+            // \r
+            this.numeric_updateCheckDays.Location = new System.Drawing.Point(323, 166);\r
+            this.numeric_updateCheckDays.Maximum = new decimal(new int[] {\r
+            31,\r
+            0,\r
+            0,\r
+            0});\r
+            this.numeric_updateCheckDays.Minimum = new decimal(new int[] {\r
+            1,\r
+            0,\r
+            0,\r
+            0});\r
+            this.numeric_updateCheckDays.Name = "numeric_updateCheckDays";\r
+            this.numeric_updateCheckDays.Size = new System.Drawing.Size(50, 21);\r
+            this.numeric_updateCheckDays.TabIndex = 94;\r
+            this.numeric_updateCheckDays.Value = new decimal(new int[] {\r
+            1,\r
+            0,\r
+            0,\r
+            0});\r
+            this.numeric_updateCheckDays.ValueChanged += new System.EventHandler(this.numeric_updateCheckDays_ValueChanged);\r
+            // \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
             // check_inGuiStatus\r
             // \r
             this.check_inGuiStatus.AutoSize = true;\r
@@ -656,7 +698,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, 257);\r
+            this.check_dvdnav.Location = new System.Drawing.Point(76, 247);\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
@@ -668,7 +710,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, 257);\r
+            this.label32.Location = new System.Drawing.Point(38, 247);\r
             this.label32.Name = "label32";\r
             this.label32.Size = new System.Drawing.Size(32, 13);\r
             this.label32.TabIndex = 89;\r
@@ -677,7 +719,7 @@ namespace Handbrake
             // label30\r
             // \r
             this.label30.AutoSize = true;\r
-            this.label30.Location = new System.Drawing.Point(73, 215);\r
+            this.label30.Location = new System.Drawing.Point(73, 205);\r
             this.label30.Name = "label30";\r
             this.label30.Size = new System.Drawing.Size(230, 13);\r
             this.label30.TabIndex = 87;\r
@@ -693,9 +735,9 @@ namespace Handbrake
             "0.50",\r
             "0.25",\r
             "0.20"});\r
-            this.drop_x264step.Location = new System.Drawing.Point(312, 212);\r
+            this.drop_x264step.Location = new System.Drawing.Point(323, 202);\r
             this.drop_x264step.Name = "drop_x264step";\r
-            this.drop_x264step.Size = new System.Drawing.Size(111, 21);\r
+            this.drop_x264step.Size = new System.Drawing.Size(85, 21);\r
             this.drop_x264step.TabIndex = 86;\r
             this.ToolTip.SetToolTip(this.drop_x264step, "The number of processor\'s / processor cores. Unless your having problems, leave o" +\r
                     "n Automatic.");\r
@@ -705,7 +747,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, 215);\r
+            this.label28.Location = new System.Drawing.Point(27, 205);\r
             this.label28.Name = "label28";\r
             this.label28.Size = new System.Drawing.Size(43, 13);\r
             this.label28.TabIndex = 85;\r
@@ -726,16 +768,6 @@ namespace Handbrake
             this.check_queryEditorTab.UseVisualStyleBackColor = false;\r
             this.check_queryEditorTab.CheckedChanged += new System.EventHandler(this.check_queryEditorTab_CheckedChanged);\r
             // \r
-            // lbl_appcastUnstable\r
-            // \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, 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
-            this.lbl_appcastUnstable.Text = "Updates:";\r
-            // \r
             // check_mainMinimize\r
             // \r
             this.check_mainMinimize.AutoSize = true;\r
@@ -752,21 +784,6 @@ namespace Handbrake
             this.check_mainMinimize.UseVisualStyleBackColor = false;\r
             this.check_mainMinimize.CheckedChanged += new System.EventHandler(this.check_mainMinimize_CheckedChanged);\r
             // \r
-            // check_snapshot\r
-            // \r
-            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, 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
-            this.check_snapshot.Text = "Check for unstable development snapshots";\r
-            this.ToolTip.SetToolTip(this.check_snapshot, "Enables the built in update checker to check for the latest development snapshot " +\r
-                    "builds.\r\nWarning: These are considered unstable builds and are not supported!");\r
-            this.check_snapshot.UseVisualStyleBackColor = false;\r
-            this.check_snapshot.CheckedChanged += new System.EventHandler(this.check_snapshot_CheckedChanged);\r
-            // \r
             // btn_drive_detect\r
             // \r
             this.btn_drive_detect.AutoSize = true;\r
@@ -1146,21 +1163,24 @@ namespace Handbrake
             this.openFile_vlc.DefaultExt = "exe";\r
             this.openFile_vlc.Filter = "exe|*.exe";\r
             // \r
-            // check_trayStatusAlerts\r
+            // label15\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
+            this.label15.AutoSize = true;\r
+            this.label15.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label15.Location = new System.Drawing.Point(6, 168);\r
+            this.label15.Name = "label15";\r
+            this.label15.Size = new System.Drawing.Size(64, 13);\r
+            this.label15.TabIndex = 95;\r
+            this.label15.Text = "Updates:";\r
+            // \r
+            // label31\r
+            // \r
+            this.label31.AutoSize = true;\r
+            this.label31.Location = new System.Drawing.Point(73, 168);\r
+            this.label31.Name = "label31";\r
+            this.label31.Size = new System.Drawing.Size(241, 13);\r
+            this.label31.TabIndex = 96;\r
+            this.label31.Text = "Number of days between update checks:";\r
             // \r
             // frmOptions\r
             // \r
@@ -1186,6 +1206,7 @@ namespace Handbrake
             this.tab_cli.PerformLayout();\r
             this.tab_advanced.ResumeLayout(false);\r
             this.tab_advanced.PerformLayout();\r
+            ((System.ComponentModel.ISupportInitialize)(this.numeric_updateCheckDays)).EndInit();\r
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();\r
             this.ResumeLayout(false);\r
             this.PerformLayout();\r
@@ -1222,7 +1243,6 @@ namespace Handbrake
         internal System.Windows.Forms.CheckBox check_cli_minimized;\r
         private System.Windows.Forms.Label label12;\r
         internal System.Windows.Forms.ToolTip ToolTip;\r
-        internal System.Windows.Forms.CheckBox check_snapshot;\r
         private System.Windows.Forms.TabPage tab_picture;\r
         internal System.Windows.Forms.Label label5;\r
         private System.Windows.Forms.TextBox txt_autoNameFormat;\r
@@ -1264,7 +1284,6 @@ namespace Handbrake
         private System.Windows.Forms.Label label27;\r
         internal System.Windows.Forms.ComboBox comboBox2;\r
         private System.Windows.Forms.OpenFileDialog openFile_vlc;\r
-        private System.Windows.Forms.Label lbl_appcastUnstable;\r
         internal System.Windows.Forms.CheckBox check_mainMinimize;\r
         internal System.Windows.Forms.CheckBox check_queryEditorTab;\r
         private System.Windows.Forms.Label label30;\r
@@ -1278,5 +1297,8 @@ namespace Handbrake
         internal System.Windows.Forms.CheckBox check_disablePresetNotification;\r
         internal System.Windows.Forms.CheckBox check_inGuiStatus;\r
         internal System.Windows.Forms.CheckBox check_trayStatusAlerts;\r
+        private System.Windows.Forms.NumericUpDown numeric_updateCheckDays;\r
+        private System.Windows.Forms.Label label15;\r
+        private System.Windows.Forms.Label label31;\r
     }\r
 }
\ No newline at end of file
index 93842b5..978ffbc 100644 (file)
@@ -113,17 +113,9 @@ namespace Handbrake
             // Experimental In-GUI encode status indicator.\r
             if (Properties.Settings.Default.enocdeStatusInGui == "Checked")\r
                 check_inGuiStatus.CheckState = CheckState.Checked;\r
-           \r
-            // Enable snapshot updating\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
+            // Days between update checks\r
+            numeric_updateCheckDays.Value = Properties.Settings.Default.daysBetweenUpdateCheck;\r
 \r
             // x264 step\r
             drop_x264step.SelectedItem = Properties.Settings.Default.x264cqstep;\r
@@ -268,11 +260,11 @@ namespace Handbrake
         private void check_inGuiStatus_CheckedChanged(object sender, EventArgs e)\r
         {\r
             Properties.Settings.Default.enocdeStatusInGui = check_inGuiStatus.CheckState.ToString();\r
-        } \r
+        }\r
 \r
-        private void check_snapshot_CheckedChanged(object sender, EventArgs e)\r
+        private void numeric_updateCheckDays_ValueChanged(object sender, EventArgs e)\r
         {\r
-            Properties.Settings.Default.checkSnapshot = check_snapshot.CheckState.ToString();\r
+            Properties.Settings.Default.daysBetweenUpdateCheck = (int)numeric_updateCheckDays.Value;\r
         }\r
 \r
         private void x264step_SelectedIndexChanged(object sender, EventArgs e)\r
@@ -291,6 +283,5 @@ namespace Handbrake
             Properties.Settings.Default.Save(); // Small hack for Vista. Seems to work fine on XP without this\r
             this.Close();\r
         }\r
-\r
     }\r
 }
\ No newline at end of file
index b07f97b..463ab56 100644 (file)
@@ -24,7 +24,7 @@ namespace Handbrake
 \r
         private void getRss()\r
         {\r
-            wBrowser.DocumentText = "<font face=\"verdana\" size=\"1\">" + appcast.versionInfo() + "</font>";\r
+            wBrowser.Url = appcast.descriptionUrl();\r
         }\r
 \r
         private void setVersions()\r