From 0c4a88000b2a9456c2079a256c00b0baf43699a7 Mon Sep 17 00:00:00 2001 From: sr55 Date: Wed, 17 Jun 2009 15:38:29 +0000 Subject: [PATCH] WinGui: - 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://svn.handbrake.fr/HandBrake/trunk@2551 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/Controls/Subtitles.cs | 3 - win/C#/Functions/AppcastReader.cs | 54 ++++------- win/C#/Functions/Main.cs | 3 + win/C#/Properties/Settings.Designer.cs | 35 ++++--- win/C#/Properties/Settings.settings | 9 +- win/C#/app.config | 9 +- win/C#/frmMain.cs | 14 ++- win/C#/frmOptions.Designer.cs | 126 +++++++++++++++---------- win/C#/frmOptions.cs | 21 ++--- win/C#/frmUpdater.cs | 2 +- 10 files changed, 145 insertions(+), 131 deletions(-) diff --git a/win/C#/Controls/Subtitles.cs b/win/C#/Controls/Subtitles.cs index 56edcc852..b5dfeef95 100644 --- a/win/C#/Controls/Subtitles.cs +++ b/win/C#/Controls/Subtitles.cs @@ -33,9 +33,6 @@ namespace Handbrake.Controls } } - - - // Controls private void btn_addSubTrack_Click(object sender, EventArgs e) { diff --git a/win/C#/Functions/AppcastReader.cs b/win/C#/Functions/AppcastReader.cs index b52c22d77..e86259ff7 100644 --- a/win/C#/Functions/AppcastReader.cs +++ b/win/C#/Functions/AppcastReader.cs @@ -4,6 +4,7 @@ Homepage: . It may be used under the terms of the GNU General Public License. */ +using System; using System.Xml; using System.Text.RegularExpressions; @@ -15,7 +16,7 @@ namespace Handbrake.Functions XmlNode nodeRss; XmlNode nodeChannel; XmlNode nodeItem; - private string hb_description; + private Uri hb_description; private string hb_version; private string hb_build; private string hb_file; @@ -26,49 +27,26 @@ namespace Handbrake.Functions /// public void getInfo() { - int unstable_build = 0; - string unstable_description = "", unstable_version = ""; - string unstable_file = ""; + // Get the correct Appcast and set input. + if (Properties.Settings.Default.hb_build.ToString().EndsWith("1")) + readRss(new XmlTextReader(Properties.Settings.Default.appcast_unstable)); + else + readRss(new XmlTextReader(Properties.Settings.Default.appcast)); - // Check the stable appcast and get the stable build number - readRss(new XmlTextReader(Properties.Settings.Default.appcast)); string input = nodeItem.InnerXml; + + // Regular Expressions Match ver = Regex.Match(input, @"sparkle:version=""([0-9]*)\"""); - int stable_build = int.Parse(ver.ToString().Replace("sparkle:version=", "").Replace("\"", "")); - ver = Regex.Match(input, @"sparkle:shortVersionString=""([0-9].[0-9].[0-9]*)\"""); - string stable_version = ver.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", ""); - string stable_description = nodeItem["description"].InnerText; - string stable_file = nodeItem["windows"].InnerText; + Match verShort = Regex.Match(input, @"sparkle:shortVersionString=""([0-9].[0-9].[0-9]*)\"""); - // If this is a snapshot release, or the user wants to check for snapshot releases - if (Properties.Settings.Default.checkSnapshot == "Checked" || Properties.Settings.Default.hb_build.ToString().EndsWith("1")) + if (nodeItem != null) { - // Get the stable build - readRss(new XmlTextReader(Properties.Settings.Default.appcast_unstable)); - input = nodeItem.InnerXml; - ver = Regex.Match(input, @"sparkle:version=""([0-9]*)\"""); - unstable_build = int.Parse(ver.ToString().Replace("sparkle:version=", "").Replace("\"", "")); - ver = Regex.Match(input, @"sparkle:shortVersionString=""([0-9a-zA-Z.]*)\"""); - unstable_version = ver.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", ""); - unstable_description = nodeItem["description"].InnerText; - unstable_file = nodeItem["windows"].InnerText; + hb_build = ver.ToString().Replace("sparkle:version=", "").Replace("\"", ""); + hb_version = verShort.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", ""); + hb_file = nodeItem["windows"].InnerText; + hb_description = new Uri(nodeItem["sparkle:releaseNotesLink"].InnerText); } - // Set the global version information - if (stable_build >= unstable_build) - { - hb_description = stable_description; - hb_version = stable_version; - hb_build = stable_build.ToString(); - hb_file = stable_file; - } - else - { - hb_description = unstable_description; - hb_version = unstable_version; - hb_build = unstable_build.ToString(); - hb_file = unstable_file; - } } /// @@ -103,7 +81,7 @@ namespace Handbrake.Functions /// Get Information about an update to HandBrake /// /// - public string versionInfo() + public System.Uri descriptionUrl() { return hb_description; } diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs index 9d936cd25..f6c85b1cf 100644 --- a/win/C#/Functions/Main.cs +++ b/win/C#/Functions/Main.cs @@ -208,6 +208,9 @@ namespace Handbrake.Functions if (latest == skip) return false; + Properties.Settings.Default.lastUpdateCheckDate = DateTime.Now; + Properties.Settings.Default.Save(); + Boolean update = (latest > current); return update; } diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs index d03a34de7..f1eec40c5 100644 --- a/win/C#/Properties/Settings.Designer.cs +++ b/win/C#/Properties/Settings.Designer.cs @@ -215,18 +215,6 @@ namespace Handbrake.Properties { } } - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string checkSnapshot { - get { - return ((string)(this["checkSnapshot"])); - } - set { - this["checkSnapshot"] = value; - } - } - [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("{source}-{title}")] @@ -382,5 +370,28 @@ namespace Handbrake.Properties { this["trayIconAlerts"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.DateTime lastUpdateCheckDate { + get { + return ((global::System.DateTime)(this["lastUpdateCheckDate"])); + } + set { + this["lastUpdateCheckDate"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("5")] + public int daysBetweenUpdateCheck { + get { + return ((int)(this["daysBetweenUpdateCheck"])); + } + set { + this["daysBetweenUpdateCheck"] = value; + } + } } } diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings index d8d2a1c6f..5102e49b1 100644 --- a/win/C#/Properties/Settings.settings +++ b/win/C#/Properties/Settings.settings @@ -50,9 +50,6 @@ - - - {source}-{title} @@ -92,5 +89,11 @@ + + + + + 5 + \ No newline at end of file diff --git a/win/C#/app.config b/win/C#/app.config index 344c8dd04..54978e84b 100644 --- a/win/C#/app.config +++ b/win/C#/app.config @@ -55,9 +55,6 @@ - - - {source}-{title} @@ -97,6 +94,12 @@ + + + + + 5 + diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 91e509aff..8329cc7c5 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -62,11 +62,17 @@ namespace Handbrake // Check for new versions, if update checking is enabled if (Properties.Settings.Default.updateStatus == "Checked") { - lblStatus.Text = "Checking for updates ..."; - Application.DoEvents(); + DateTime now = DateTime.Now; + DateTime lastCheck = Properties.Settings.Default.lastUpdateCheckDate; + TimeSpan elapsed = now.Subtract(lastCheck); + if (elapsed.TotalDays > Properties.Settings.Default.daysBetweenUpdateCheck) + { + lblStatus.Text = "Checking for updates ..."; + Application.DoEvents(); - Thread updateCheckThread = new Thread(startupUpdateCheck); - updateCheckThread.Start(); + Thread updateCheckThread = new Thread(startupUpdateCheck); + updateCheckThread.Start(); + } } // Setup the GUI components diff --git a/win/C#/frmOptions.Designer.cs b/win/C#/frmOptions.Designer.cs index 24b9bf11a..dfe1350b6 100644 --- a/win/C#/frmOptions.Designer.cs +++ b/win/C#/frmOptions.Designer.cs @@ -73,6 +73,8 @@ namespace Handbrake this.drp_processors = new System.Windows.Forms.ComboBox(); this.Label4 = new System.Windows.Forms.Label(); this.tab_advanced = new System.Windows.Forms.TabPage(); + this.numeric_updateCheckDays = new System.Windows.Forms.NumericUpDown(); + this.check_trayStatusAlerts = new System.Windows.Forms.CheckBox(); this.check_inGuiStatus = new System.Windows.Forms.CheckBox(); this.check_disablePresetNotification = new System.Windows.Forms.CheckBox(); this.check_dvdnav = new System.Windows.Forms.CheckBox(); @@ -81,9 +83,7 @@ namespace Handbrake this.drop_x264step = new System.Windows.Forms.ComboBox(); this.label28 = new System.Windows.Forms.Label(); this.check_queryEditorTab = new System.Windows.Forms.CheckBox(); - this.lbl_appcastUnstable = new System.Windows.Forms.Label(); this.check_mainMinimize = new System.Windows.Forms.CheckBox(); - this.check_snapshot = new System.Windows.Forms.CheckBox(); this.btn_drive_detect = new System.Windows.Forms.CheckBox(); this.label6 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); @@ -119,12 +119,14 @@ namespace Handbrake this.label26 = new System.Windows.Forms.Label(); this.label27 = new System.Windows.Forms.Label(); this.openFile_vlc = new System.Windows.Forms.OpenFileDialog(); - this.check_trayStatusAlerts = new System.Windows.Forms.CheckBox(); + this.label15 = new System.Windows.Forms.Label(); + this.label31 = new System.Windows.Forms.Label(); this.tab_options.SuspendLayout(); this.tab_general.SuspendLayout(); this.tab_picture.SuspendLayout(); this.tab_cli.SuspendLayout(); this.tab_advanced.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numeric_updateCheckDays)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); this.SuspendLayout(); // @@ -600,6 +602,9 @@ namespace Handbrake // // tab_advanced // + this.tab_advanced.Controls.Add(this.label31); + this.tab_advanced.Controls.Add(this.label15); + this.tab_advanced.Controls.Add(this.numeric_updateCheckDays); this.tab_advanced.Controls.Add(this.check_trayStatusAlerts); this.tab_advanced.Controls.Add(this.check_inGuiStatus); this.tab_advanced.Controls.Add(this.check_disablePresetNotification); @@ -609,9 +614,7 @@ namespace Handbrake this.tab_advanced.Controls.Add(this.drop_x264step); this.tab_advanced.Controls.Add(this.label28); this.tab_advanced.Controls.Add(this.check_queryEditorTab); - this.tab_advanced.Controls.Add(this.lbl_appcastUnstable); this.tab_advanced.Controls.Add(this.check_mainMinimize); - this.tab_advanced.Controls.Add(this.check_snapshot); this.tab_advanced.Controls.Add(this.btn_drive_detect); this.tab_advanced.Controls.Add(this.label6); this.tab_advanced.Location = new System.Drawing.Point(4, 22); @@ -622,6 +625,45 @@ namespace Handbrake this.tab_advanced.Text = "Advanced / Other"; this.tab_advanced.UseVisualStyleBackColor = true; // + // numeric_updateCheckDays + // + this.numeric_updateCheckDays.Location = new System.Drawing.Point(323, 166); + this.numeric_updateCheckDays.Maximum = new decimal(new int[] { + 31, + 0, + 0, + 0}); + this.numeric_updateCheckDays.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numeric_updateCheckDays.Name = "numeric_updateCheckDays"; + this.numeric_updateCheckDays.Size = new System.Drawing.Size(50, 21); + this.numeric_updateCheckDays.TabIndex = 94; + this.numeric_updateCheckDays.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numeric_updateCheckDays.ValueChanged += new System.EventHandler(this.numeric_updateCheckDays_ValueChanged); + // + // check_trayStatusAlerts + // + this.check_trayStatusAlerts.AutoSize = true; + this.check_trayStatusAlerts.BackColor = System.Drawing.Color.Transparent; + this.check_trayStatusAlerts.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.check_trayStatusAlerts.Location = new System.Drawing.Point(97, 64); + this.check_trayStatusAlerts.Name = "check_trayStatusAlerts"; + this.check_trayStatusAlerts.Size = new System.Drawing.Size(352, 17); + this.check_trayStatusAlerts.TabIndex = 93; + this.check_trayStatusAlerts.Text = "Display status messages from tray icon (balloon popups)"; + this.ToolTip.SetToolTip(this.check_trayStatusAlerts, "Minimize the window to the system tray rather than the task bar.\r\nThe system tray" + + " icon has encode status notifications.\r\nNote: requires restart to take effect!\r\n" + + ""); + this.check_trayStatusAlerts.UseVisualStyleBackColor = false; + this.check_trayStatusAlerts.CheckedChanged += new System.EventHandler(this.check_trayStatusAlerts_CheckedChanged); + // // check_inGuiStatus // this.check_inGuiStatus.AutoSize = true; @@ -656,7 +698,7 @@ namespace Handbrake this.check_dvdnav.AutoSize = true; this.check_dvdnav.BackColor = System.Drawing.Color.Transparent; this.check_dvdnav.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.check_dvdnav.Location = new System.Drawing.Point(76, 257); + this.check_dvdnav.Location = new System.Drawing.Point(76, 247); this.check_dvdnav.Name = "check_dvdnav"; this.check_dvdnav.Size = new System.Drawing.Size(297, 17); this.check_dvdnav.TabIndex = 90; @@ -668,7 +710,7 @@ namespace Handbrake // this.label32.AutoSize = true; this.label32.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label32.Location = new System.Drawing.Point(38, 257); + this.label32.Location = new System.Drawing.Point(38, 247); this.label32.Name = "label32"; this.label32.Size = new System.Drawing.Size(32, 13); this.label32.TabIndex = 89; @@ -677,7 +719,7 @@ namespace Handbrake // label30 // this.label30.AutoSize = true; - this.label30.Location = new System.Drawing.Point(73, 215); + this.label30.Location = new System.Drawing.Point(73, 205); this.label30.Name = "label30"; this.label30.Size = new System.Drawing.Size(230, 13); this.label30.TabIndex = 87; @@ -693,9 +735,9 @@ namespace Handbrake "0.50", "0.25", "0.20"}); - this.drop_x264step.Location = new System.Drawing.Point(312, 212); + this.drop_x264step.Location = new System.Drawing.Point(323, 202); this.drop_x264step.Name = "drop_x264step"; - this.drop_x264step.Size = new System.Drawing.Size(111, 21); + this.drop_x264step.Size = new System.Drawing.Size(85, 21); this.drop_x264step.TabIndex = 86; this.ToolTip.SetToolTip(this.drop_x264step, "The number of processor\'s / processor cores. Unless your having problems, leave o" + "n Automatic."); @@ -705,7 +747,7 @@ namespace Handbrake // this.label28.AutoSize = true; this.label28.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label28.Location = new System.Drawing.Point(27, 215); + this.label28.Location = new System.Drawing.Point(27, 205); this.label28.Name = "label28"; this.label28.Size = new System.Drawing.Size(43, 13); this.label28.TabIndex = 85; @@ -726,16 +768,6 @@ namespace Handbrake this.check_queryEditorTab.UseVisualStyleBackColor = false; this.check_queryEditorTab.CheckedChanged += new System.EventHandler(this.check_queryEditorTab_CheckedChanged); // - // lbl_appcastUnstable - // - this.lbl_appcastUnstable.AutoSize = true; - this.lbl_appcastUnstable.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbl_appcastUnstable.Location = new System.Drawing.Point(6, 178); - this.lbl_appcastUnstable.Name = "lbl_appcastUnstable"; - this.lbl_appcastUnstable.Size = new System.Drawing.Size(64, 13); - this.lbl_appcastUnstable.TabIndex = 83; - this.lbl_appcastUnstable.Text = "Updates:"; - // // check_mainMinimize // this.check_mainMinimize.AutoSize = true; @@ -752,21 +784,6 @@ namespace Handbrake this.check_mainMinimize.UseVisualStyleBackColor = false; this.check_mainMinimize.CheckedChanged += new System.EventHandler(this.check_mainMinimize_CheckedChanged); // - // check_snapshot - // - this.check_snapshot.AutoSize = true; - this.check_snapshot.BackColor = System.Drawing.Color.Transparent; - this.check_snapshot.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.check_snapshot.Location = new System.Drawing.Point(76, 177); - this.check_snapshot.Name = "check_snapshot"; - this.check_snapshot.Size = new System.Drawing.Size(273, 17); - this.check_snapshot.TabIndex = 80; - this.check_snapshot.Text = "Check for unstable development snapshots"; - this.ToolTip.SetToolTip(this.check_snapshot, "Enables the built in update checker to check for the latest development snapshot " + - "builds.\r\nWarning: These are considered unstable builds and are not supported!"); - this.check_snapshot.UseVisualStyleBackColor = false; - this.check_snapshot.CheckedChanged += new System.EventHandler(this.check_snapshot_CheckedChanged); - // // btn_drive_detect // this.btn_drive_detect.AutoSize = true; @@ -1146,21 +1163,24 @@ namespace Handbrake this.openFile_vlc.DefaultExt = "exe"; this.openFile_vlc.Filter = "exe|*.exe"; // - // check_trayStatusAlerts + // label15 // - this.check_trayStatusAlerts.AutoSize = true; - this.check_trayStatusAlerts.BackColor = System.Drawing.Color.Transparent; - this.check_trayStatusAlerts.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.check_trayStatusAlerts.Location = new System.Drawing.Point(97, 64); - this.check_trayStatusAlerts.Name = "check_trayStatusAlerts"; - this.check_trayStatusAlerts.Size = new System.Drawing.Size(352, 17); - this.check_trayStatusAlerts.TabIndex = 93; - this.check_trayStatusAlerts.Text = "Display status messages from tray icon (balloon popups)"; - this.ToolTip.SetToolTip(this.check_trayStatusAlerts, "Minimize the window to the system tray rather than the task bar.\r\nThe system tray" + - " icon has encode status notifications.\r\nNote: requires restart to take effect!\r\n" + - ""); - this.check_trayStatusAlerts.UseVisualStyleBackColor = false; - this.check_trayStatusAlerts.CheckedChanged += new System.EventHandler(this.check_trayStatusAlerts_CheckedChanged); + this.label15.AutoSize = true; + this.label15.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label15.Location = new System.Drawing.Point(6, 168); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(64, 13); + this.label15.TabIndex = 95; + this.label15.Text = "Updates:"; + // + // label31 + // + this.label31.AutoSize = true; + this.label31.Location = new System.Drawing.Point(73, 168); + this.label31.Name = "label31"; + this.label31.Size = new System.Drawing.Size(241, 13); + this.label31.TabIndex = 96; + this.label31.Text = "Number of days between update checks:"; // // frmOptions // @@ -1186,6 +1206,7 @@ namespace Handbrake this.tab_cli.PerformLayout(); this.tab_advanced.ResumeLayout(false); this.tab_advanced.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numeric_updateCheckDays)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -1222,7 +1243,6 @@ namespace Handbrake internal System.Windows.Forms.CheckBox check_cli_minimized; private System.Windows.Forms.Label label12; internal System.Windows.Forms.ToolTip ToolTip; - internal System.Windows.Forms.CheckBox check_snapshot; private System.Windows.Forms.TabPage tab_picture; internal System.Windows.Forms.Label label5; private System.Windows.Forms.TextBox txt_autoNameFormat; @@ -1264,7 +1284,6 @@ namespace Handbrake private System.Windows.Forms.Label label27; internal System.Windows.Forms.ComboBox comboBox2; private System.Windows.Forms.OpenFileDialog openFile_vlc; - private System.Windows.Forms.Label lbl_appcastUnstable; internal System.Windows.Forms.CheckBox check_mainMinimize; internal System.Windows.Forms.CheckBox check_queryEditorTab; private System.Windows.Forms.Label label30; @@ -1278,5 +1297,8 @@ namespace Handbrake internal System.Windows.Forms.CheckBox check_disablePresetNotification; internal System.Windows.Forms.CheckBox check_inGuiStatus; internal System.Windows.Forms.CheckBox check_trayStatusAlerts; + private System.Windows.Forms.NumericUpDown numeric_updateCheckDays; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label31; } } \ No newline at end of file diff --git a/win/C#/frmOptions.cs b/win/C#/frmOptions.cs index 93842b5d2..978ffbcfe 100644 --- a/win/C#/frmOptions.cs +++ b/win/C#/frmOptions.cs @@ -113,17 +113,9 @@ namespace Handbrake // Experimental In-GUI encode status indicator. if (Properties.Settings.Default.enocdeStatusInGui == "Checked") check_inGuiStatus.CheckState = CheckState.Checked; - - // Enable snapshot updating - if (Properties.Settings.Default.checkSnapshot == "Checked") - check_snapshot.CheckState = CheckState.Checked; - - // Unstable Snapshot checking should only be visible for stable builds. - if (Properties.Settings.Default.hb_build.ToString().EndsWith("1")) - { - lbl_appcastUnstable.Visible = false; - check_snapshot.Visible = false; - } + + // Days between update checks + numeric_updateCheckDays.Value = Properties.Settings.Default.daysBetweenUpdateCheck; // x264 step drop_x264step.SelectedItem = Properties.Settings.Default.x264cqstep; @@ -268,11 +260,11 @@ namespace Handbrake private void check_inGuiStatus_CheckedChanged(object sender, EventArgs e) { Properties.Settings.Default.enocdeStatusInGui = check_inGuiStatus.CheckState.ToString(); - } + } - private void check_snapshot_CheckedChanged(object sender, EventArgs e) + private void numeric_updateCheckDays_ValueChanged(object sender, EventArgs e) { - Properties.Settings.Default.checkSnapshot = check_snapshot.CheckState.ToString(); + Properties.Settings.Default.daysBetweenUpdateCheck = (int)numeric_updateCheckDays.Value; } private void x264step_SelectedIndexChanged(object sender, EventArgs e) @@ -291,6 +283,5 @@ namespace Handbrake Properties.Settings.Default.Save(); // Small hack for Vista. Seems to work fine on XP without this this.Close(); } - } } \ No newline at end of file diff --git a/win/C#/frmUpdater.cs b/win/C#/frmUpdater.cs index b07f97b0a..463ab5676 100644 --- a/win/C#/frmUpdater.cs +++ b/win/C#/frmUpdater.cs @@ -24,7 +24,7 @@ namespace Handbrake private void getRss() { - wBrowser.DocumentText = "" + appcast.versionInfo() + ""; + wBrowser.Url = appcast.descriptionUrl(); } private void setVersions() -- 2.40.0