summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-05-08 20:37:46 +0000
committersr55 <[email protected]>2010-05-08 20:37:46 +0000
commit2c09783d0f93b6c1a94b778daf113b4d5b5ab8de (patch)
tree57f68352ec2ed045c5fccf2ec6745b73a03eecc9
parent49000950c59a1ced681c0f481da8e8c024b3f5ab (diff)
WinGui:
- Attempt to upgrade program settings on upgrade. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3289 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/C#/Program.cs9
-rw-r--r--win/C#/Properties/Settings.Designer.cs12
-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#/Program.cs b/win/C#/Program.cs
index ea82e3e34..8600fe569 100644
--- a/win/C#/Program.cs
+++ b/win/C#/Program.cs
@@ -8,6 +8,9 @@ namespace Handbrake
using System;
using System.IO;
using System.Windows.Forms;
+
+ using Handbrake.Properties;
+
using Presets;
/// <summary>
@@ -21,6 +24,12 @@ namespace Handbrake
[STAThread]
public static void Main()
{
+ if (Settings.Default.UpdateRequired)
+ {
+ Settings.Default.Upgrade();
+ Settings.Default.UpdateRequired = false;
+ }
+
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
const string failedInstall = "HandBrake is not installed properly. Please reinstall HandBrake. \n\n";
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs
index 018b95e3a..ef0389f9e 100644
--- a/win/C#/Properties/Settings.Designer.cs
+++ b/win/C#/Properties/Settings.Designer.cs
@@ -536,5 +536,17 @@ namespace Handbrake.Properties {
this["hb_min_cli"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool UpdateRequired {
+ get {
+ return ((bool)(this["UpdateRequired"]));
+ }
+ set {
+ this["UpdateRequired"] = value;
+ }
+ }
}
}
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings
index cc7649fe7..fe32569a6 100644
--- a/win/C#/Properties/Settings.settings
+++ b/win/C#/Properties/Settings.settings
@@ -131,5 +131,8 @@
<Setting Name="hb_min_cli" Type="System.Int32" Scope="User">
<Value Profile="(Default)">3264</Value>
</Setting>
+ <Setting Name="UpdateRequired" Type="System.Boolean" Scope="User">
+ <Value Profile="(Default)">True</Value>
+ </Setting>
</Settings>
</SettingsFile> \ No newline at end of file
diff --git a/win/C#/app.config b/win/C#/app.config
index 6a9c862c3..525247e52 100644
--- a/win/C#/app.config
+++ b/win/C#/app.config
@@ -137,6 +137,9 @@
<setting name="hb_min_cli" serializeAs="String">
<value>3264</value>
</setting>
+ <setting name="UpdateRequired" serializeAs="String">
+ <value>True</value>
+ </setting>
</Handbrake.Properties.Settings>
</userSettings>
<startup />