summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-09-13 21:21:57 +0000
committersr55 <[email protected]>2009-09-13 21:21:57 +0000
commit72e3892f2e47a90ce08ce07ff7f35097795d1125 (patch)
tree90aaf15d64d65991dc3bc2e89bb231c5bc88bff1
parent9d0ec3bed586f45f710882df0942e36d0f48aafe (diff)
WinGui:
- Fix: Don't check version data if the CLI file hasn't actually changed since the last launch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2818 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/C#/Functions/Main.cs10
-rw-r--r--win/C#/Properties/Settings.Designer.cs11
-rw-r--r--win/C#/Properties/Settings.settings3
-rw-r--r--win/C#/app.config3
4 files changed, 27 insertions, 0 deletions
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs
index 022a025ba..dd618cb52 100644
--- a/win/C#/Functions/Main.cs
+++ b/win/C#/Functions/Main.cs
@@ -197,6 +197,15 @@ namespace Handbrake.Functions
// 0 = SVN Build / Version
// 1 = Build Date
+
+ DateTime lastModified = File.GetLastWriteTime("HandBrakeCLI.exe");
+
+
+ if (Properties.Settings.Default.cliLastModified == lastModified && Properties.Settings.Default.hb_build != 0)
+ return;
+
+ Properties.Settings.Default.cliLastModified = lastModified;
+
Process cliProcess = new Process();
ProcessStartInfo handBrakeCLI = new ProcessStartInfo("HandBrakeCLI.exe", " -u")
{
@@ -237,6 +246,7 @@ namespace Handbrake.Functions
cli.Kill();
}
}
+ Properties.Settings.Default.Save();
}
catch (Exception e)
{
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs
index be86c49b4..e3309843e 100644
--- a/win/C#/Properties/Settings.Designer.cs
+++ b/win/C#/Properties/Settings.Designer.cs
@@ -465,5 +465,16 @@ namespace Handbrake.Properties {
this["growlEncode"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public global::System.DateTime cliLastModified {
+ get {
+ return ((global::System.DateTime)(this["cliLastModified"]));
+ }
+ set {
+ this["cliLastModified"] = value;
+ }
+ }
}
}
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings
index b52c8c706..7d6568600 100644
--- a/win/C#/Properties/Settings.settings
+++ b/win/C#/Properties/Settings.settings
@@ -113,5 +113,8 @@
<Setting Name="growlEncode" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
+ <Setting Name="cliLastModified" Type="System.DateTime" Scope="User">
+ <Value Profile="(Default)" />
+ </Setting>
</Settings>
</SettingsFile> \ No newline at end of file
diff --git a/win/C#/app.config b/win/C#/app.config
index d213f5063..bf7dfd93e 100644
--- a/win/C#/app.config
+++ b/win/C#/app.config
@@ -118,6 +118,9 @@
<setting name="growlEncode" serializeAs="String">
<value>False</value>
</setting>
+ <setting name="cliLastModified" serializeAs="String">
+ <value />
+ </setting>
</Handbrake.Properties.Settings>
</userSettings>
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>