summaryrefslogtreecommitdiffstats
path: root/win/C#/frmMain.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r--win/C#/frmMain.cs14
1 files changed, 10 insertions, 4 deletions
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