diff options
Diffstat (limited to 'win/C#')
-rw-r--r-- | win/C#/Functions/Main.cs | 18 | ||||
-rw-r--r-- | win/C#/Properties/Settings.Designer.cs | 16 | ||||
-rw-r--r-- | win/C#/Properties/Settings.settings | 3 | ||||
-rw-r--r-- | win/C#/app.config | 3 | ||||
-rw-r--r-- | win/C#/frmAbout.Designer.cs | 16 | ||||
-rw-r--r-- | win/C#/frmAbout.cs | 8 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 3 |
7 files changed, 17 insertions, 50 deletions
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs index 4d82fb13b..ebc3f3836 100644 --- a/win/C#/Functions/Main.cs +++ b/win/C#/Functions/Main.cs @@ -10,6 +10,7 @@ namespace Handbrake.Functions using System.Diagnostics;
using System.IO;
using System.Net;
+ using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
@@ -345,18 +346,21 @@ namespace Handbrake.Functions public static void CheckForValidCliVersion()
{
// Make sure we have a recent version for svn builds
- string version = Properties.Settings.Default.hb_version;
- if (version.Contains("svn"))
+ string cli_version = Properties.Settings.Default.hb_version;
+ Version gui_version = Assembly.GetExecutingAssembly().GetName().Version;
+
+ if (cli_version.Contains("svn") || gui_version.Revision > 0)
{
- version = version.Replace("svn", string.Empty).Trim();
- int build;
- int.TryParse(version, out build);
- if (build < Properties.Settings.Default.hb_min_cli)
+ int gui_build, cli_build;
+ int.TryParse(gui_version.Revision.ToString(), out gui_build);
+ int.TryParse(Properties.Settings.Default.hb_version.Replace("svn", string.Empty), out cli_build);
+
+ if (gui_build > cli_build)
{
MessageBox.Show(
"It appears you are trying to use a CLI executable that is too old for this version of the HandBrake GUI.\n" +
"Please update the HandBrakeCLI.exe to a newer build.\n\n" +
- "HandBrake build Detected: " + Properties.Settings.Default.hb_version,
+ "HandBrake build Detected: " + cli_build,
"Error",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs index b2f489294..1f49b4ecf 100644 --- a/win/C#/Properties/Settings.Designer.cs +++ b/win/C#/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:4.0.30319.1
+// Runtime Version:2.0.50727.4927
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -12,7 +12,7 @@ namespace Handbrake.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -503,18 +503,6 @@ namespace Handbrake.Properties { [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("3378")]
- public int hb_min_cli {
- get {
- return ((int)(this["hb_min_cli"]));
- }
- set {
- this["hb_min_cli"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool UpdateRequired {
get {
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings index c7e001d5e..2d8437ab2 100644 --- a/win/C#/Properties/Settings.settings +++ b/win/C#/Properties/Settings.settings @@ -122,9 +122,6 @@ <Setting Name="AutoNameRemoveUnderscore" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
- <Setting Name="hb_min_cli" Type="System.Int32" Scope="User">
- <Value Profile="(Default)">3378</Value>
- </Setting>
<Setting Name="UpdateRequired" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
diff --git a/win/C#/app.config b/win/C#/app.config index a51c09d8c..bf67ae2dc 100644 --- a/win/C#/app.config +++ b/win/C#/app.config @@ -128,9 +128,6 @@ <setting name="AutoNameRemoveUnderscore" serializeAs="String">
<value>False</value>
</setting>
- <setting name="hb_min_cli" serializeAs="String">
- <value>3378</value>
- </setting>
<setting name="UpdateRequired" serializeAs="String">
<value>True</value>
</setting>
diff --git a/win/C#/frmAbout.Designer.cs b/win/C#/frmAbout.Designer.cs index aab6dea6b..dac2e4d12 100644 --- a/win/C#/frmAbout.Designer.cs +++ b/win/C#/frmAbout.Designer.cs @@ -37,7 +37,6 @@ namespace Handbrake System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmAbout));
this.Label3 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
- this.lbl_HBBuild = new System.Windows.Forms.Label();
this.PictureBox1 = new System.Windows.Forms.PictureBox();
this.btn_close = new System.Windows.Forms.Button();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
@@ -61,7 +60,7 @@ namespace Handbrake // label1
//
this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(125, 64);
+ this.label1.Location = new System.Drawing.Point(125, 47);
this.label1.Margin = new System.Windows.Forms.Padding(3);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(224, 13);
@@ -69,17 +68,6 @@ namespace Handbrake this.label1.Text = "Copyright 2003-2010 HandBrake Developers";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
- // lbl_HBBuild
- //
- this.lbl_HBBuild.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lbl_HBBuild.Location = new System.Drawing.Point(125, 35);
- this.lbl_HBBuild.Margin = new System.Windows.Forms.Padding(3, 1, 3, 3);
- this.lbl_HBBuild.Name = "lbl_HBBuild";
- this.lbl_HBBuild.Size = new System.Drawing.Size(224, 13);
- this.lbl_HBBuild.TabIndex = 32;
- this.lbl_HBBuild.Text = "{CLI Version}";
- this.lbl_HBBuild.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// PictureBox1
//
this.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
@@ -147,7 +135,6 @@ namespace Handbrake this.Controls.Add(this.btn_close);
this.Controls.Add(this.label1);
this.Controls.Add(this.PictureBox1);
- this.Controls.Add(this.lbl_HBBuild);
this.Controls.Add(this.Label3);
this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
@@ -169,7 +156,6 @@ namespace Handbrake internal System.Windows.Forms.Label Label3;
internal System.Windows.Forms.Label label1;
- internal System.Windows.Forms.Label lbl_HBBuild;
internal System.Windows.Forms.PictureBox PictureBox1;
private System.Windows.Forms.Button btn_close;
private System.Windows.Forms.RichTextBox richTextBox1;
diff --git a/win/C#/frmAbout.cs b/win/C#/frmAbout.cs index 9db62f871..70fc92250 100644 --- a/win/C#/frmAbout.cs +++ b/win/C#/frmAbout.cs @@ -6,7 +6,6 @@ namespace Handbrake
{
using System;
- using System.Reflection;
using System.Windows.Forms;
/// <summary>
@@ -20,12 +19,9 @@ namespace Handbrake public frmAbout()
{
InitializeComponent();
- lbl_HBBuild.Text = "CLI Build: " + Properties.Settings.Default.hb_version + " (" + Properties.Settings.Default.hb_build +
- ") - " + Properties.Settings.Default.hb_platform;
- Version gui = Assembly.GetExecutingAssembly().GetName().Version;
- Version appServices = HandBrake.ApplicationServices.Init.AssemblyVersion();
- lbl_GUIBuild.Text = gui.ToString(4) + " (Services: " + appServices.ToString(4) + ")";
+ string nightly = Properties.Settings.Default.hb_version.Contains("svn") ? " (SVN / Nightly Build)" : string.Empty;
+ lbl_GUIBuild.Text = Properties.Settings.Default.hb_version + " (" + Properties.Settings.Default.hb_build + ") " + nightly;
}
/// <summary>
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index ef6efdf03..732a50c8b 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -100,8 +100,7 @@ namespace Handbrake if (Settings.Default.hb_version.Contains("svn"))
{
- Version v = Assembly.GetExecutingAssembly().GetName().Version;
- this.Text += " " + v.ToString(4);
+ this.Text += " " + Settings.Default.hb_version;
}
// Check for new versions, if update checking is enabled
|