summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-01-29 21:29:26 +0000
committersr55 <[email protected]>2011-01-29 21:29:26 +0000
commitc000c50bbcf57320a56a3d923ffba1b1c5849cb1 (patch)
tree7f3c57673e9943f9a52f608c03827ec0c974746d /win
parentf6581060764a2cfcca6ebd5a70344c8080722eec (diff)
WinGui:
- Refactor the preset service and move to the Application Services. * Left the old service in place for now, will hook the new service in later. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3772 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/C#/Controls/AudioPanel.cs1
-rw-r--r--win/C#/Controls/PictureSettings.cs1
-rw-r--r--win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj4
-rw-r--r--win/C#/HandBrake.ApplicationServices/Init.cs13
-rw-r--r--win/C#/HandBrake.ApplicationServices/Model/Preset.cs (renamed from win/C#/Presets/Preset.cs)14
-rw-r--r--win/C#/HandBrake.ApplicationServices/Services/Interfaces/IPresetService.cs85
-rw-r--r--win/C#/HandBrake.ApplicationServices/Services/PresetService.cs350
-rw-r--r--win/C#/HandBrake.ApplicationServices/Services/QueueManager.cs7
-rw-r--r--win/C#/HandBrake.ApplicationServices/Settings.StyleCop3
-rw-r--r--win/C#/HandBrakeCS.csproj1
-rw-r--r--win/C#/Presets/PlistPresetHandler.cs3
-rw-r--r--win/C#/Presets/PresetsHandler.cs2
-rw-r--r--win/C#/Program.cs2
-rw-r--r--win/C#/frmOptions.cs1
-rw-r--r--win/C#/frmOptions.resx12
15 files changed, 485 insertions, 14 deletions
diff --git a/win/C#/Controls/AudioPanel.cs b/win/C#/Controls/AudioPanel.cs
index 3f4808e6a..cb2433548 100644
--- a/win/C#/Controls/AudioPanel.cs
+++ b/win/C#/Controls/AudioPanel.cs
@@ -12,6 +12,7 @@ namespace Handbrake.Controls
using System.Windows.Forms;
using Functions;
+ using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Parsing;
using Presets;
diff --git a/win/C#/Controls/PictureSettings.cs b/win/C#/Controls/PictureSettings.cs
index b6f51f515..2425407ea 100644
--- a/win/C#/Controls/PictureSettings.cs
+++ b/win/C#/Controls/PictureSettings.cs
@@ -10,6 +10,7 @@ namespace Handbrake.Controls
using System.Globalization;
using System.Windows.Forms;
+ using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Parsing;
using Presets;
diff --git a/win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
index d45228ab2..764eb0ce2 100644
--- a/win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
+++ b/win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
@@ -65,6 +65,7 @@
<HintPath>..\libraries\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
@@ -110,6 +111,7 @@
<Compile Include="Model\Encoding\SubtitleTrack.cs" />
<Compile Include="Model\Encoding\VideoEncoder.cs" />
<Compile Include="Model\Encoding\VideoEncodeMode.cs" />
+ <Compile Include="Model\Preset.cs" />
<Compile Include="Model\QueueTask.cs" />
<Compile Include="Model\Encoding\SubtitleType.cs" />
<Compile Include="Parsing\AudioTrack.cs" />
@@ -129,7 +131,9 @@
<Compile Include="Services\Interfaces\IQueueManager.cs" />
<Compile Include="Services\Interfaces\IQueueProcessor.cs" />
<Compile Include="Services\Interfaces\IScan.cs" />
+ <Compile Include="Services\Interfaces\IPresetService.cs" />
<Compile Include="Services\LibScan.cs" />
+ <Compile Include="Services\PresetService.cs" />
<Compile Include="Services\QueueManager.cs" />
<Compile Include="Services\QueueProcessor.cs" />
<Compile Include="Services\ScanService.cs" />
diff --git a/win/C#/HandBrake.ApplicationServices/Init.cs b/win/C#/HandBrake.ApplicationServices/Init.cs
index bacf1323a..999b4555e 100644
--- a/win/C#/HandBrake.ApplicationServices/Init.cs
+++ b/win/C#/HandBrake.ApplicationServices/Init.cs
@@ -13,6 +13,11 @@ namespace HandBrake.ApplicationServices
/// </summary>
public class Init
{
+ /**
+ * I really dislike this, Need to replace this sooner rather than later.
+ **/
+
+
/// <summary>
/// Setup the Settings used by the applicaiton with this library
/// </summary>
@@ -52,12 +57,13 @@ namespace HandBrake.ApplicationServices
/// <param name="preventSleep">
/// Prevent the system from sleeping
/// </param>
- public static void SetupSettings(string versionString, int instanceId, string completionOption, bool disableDvdNav,
+ public static void SetupSettings(string versionString, string version, int instanceId, string completionOption, bool disableDvdNav,
bool growlEncode, bool growlQueue, string processPriority, string saveLogPath, bool saveLogToSpecifiedPath,
bool saveLogWithVideo, bool showCliForInGuiEncodeStatus, bool preventSleep)
{
InstanceId = instanceId;
HandBrakeGuiVersionString = versionString;
+ Version = version;
CompletionOption = completionOption;
DisableDvdNav = disableDvdNav;
GrowlEncode = growlEncode;
@@ -92,6 +98,11 @@ namespace HandBrake.ApplicationServices
public static string HandBrakeGuiVersionString;
/// <summary>
+ /// HandBrakes Version or Svn revision
+ /// </summary>
+ public static string Version;
+
+ /// <summary>
/// What to do when the encode completes.
/// </summary>
public static string CompletionOption;
diff --git a/win/C#/Presets/Preset.cs b/win/C#/HandBrake.ApplicationServices/Model/Preset.cs
index b6151a3b0..988e3da80 100644
--- a/win/C#/Presets/Preset.cs
+++ b/win/C#/HandBrake.ApplicationServices/Model/Preset.cs
@@ -3,10 +3,10 @@
Homepage: <http://handbrake.fr>.
It may be used under the terms of the GNU General Public License. */
-namespace Handbrake.Presets
+namespace HandBrake.ApplicationServices.Model
{
/// <summary>
- /// A Preset
+ /// A Preset for encoding with.
/// </summary>
public class Preset
{
@@ -31,6 +31,11 @@ namespace Handbrake.Presets
public bool CropSettings { get; set; }
/// <summary>
+ /// Gets or sets the Settings for this encode/preset. Can be used in place of Query property.
+ /// </summary>
+ public EncodeTask EncodeSettings { get; set; }
+
+ /// <summary>
/// Gets or sets The version number which associates this preset with a HB build
/// </summary>
public string Version { get; set; }
@@ -39,5 +44,10 @@ namespace Handbrake.Presets
/// Gets or sets the Description for the preset
/// </summary>
public string Description { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether this is a built in preset
+ /// </summary>
+ public bool IsBuildIn { get; set; }
}
} \ No newline at end of file
diff --git a/win/C#/HandBrake.ApplicationServices/Services/Interfaces/IPresetService.cs b/win/C#/HandBrake.ApplicationServices/Services/Interfaces/IPresetService.cs
new file mode 100644
index 000000000..b947a955e
--- /dev/null
+++ b/win/C#/HandBrake.ApplicationServices/Services/Interfaces/IPresetService.cs
@@ -0,0 +1,85 @@
+/* IPresetService.cs $
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
+
+namespace HandBrake.ApplicationServices.Services.Interfaces
+{
+ using System.ComponentModel;
+
+ using HandBrake.ApplicationServices.Model;
+
+ /// <summary>
+ /// The Preset Service Interface
+ /// </summary>
+ public interface IPresetService
+ {
+ /// <summary>
+ /// Gets or sets a Collection of presets.
+ /// </summary>
+ ICollectionView Presets { get; set; }
+
+ /// <summary>
+ /// Add a new preset to the system
+ /// </summary>
+ /// <param name="preset">
+ /// A Preset to add
+ /// </param>
+ /// <returns>
+ /// True if added,
+ /// False if name already exists
+ /// </returns>
+ bool Add(Preset preset);
+
+ /// <summary>
+ /// Remove a preset with a given name from either the built in or user preset list.
+ /// </summary>
+ /// <param name="preset">
+ /// The Preset to remove
+ /// </param>
+ void Remove(Preset preset);
+
+ /// <summary>
+ /// Get a Preset
+ /// </summary>
+ /// <param name="name">
+ /// The name of the preset to get
+ /// </param>
+ /// <returns>
+ /// A Preset or null object
+ /// </returns>
+ Preset GetPreset(string name);
+
+ /// <summary>
+ /// Clear Built-in Presets
+ /// </summary>
+ void ClearBuiltIn();
+
+ /// <summary>
+ /// Clear all presets
+ /// </summary>
+ void ClearAll();
+
+ /// <summary>
+ /// Reads the CLI's CLI output format and load's them into the preset List Preset
+ /// </summary>
+ /// <param name="cliPath">
+ /// The Path to the CLI, leave blank for current folder.
+ /// </param>
+ void UpdateBuiltInPresets(string cliPath);
+
+ /// <summary>
+ /// Check if the built in Presets stored are not out of date.
+ /// Update them if they are.
+ /// </summary>
+ /// <returns>true if out of date</returns>
+ bool CheckIfPresetsAreOutOfDate();
+
+ /// <summary>
+ /// Check if the preset "name" exists in either Presets or UserPresets lists.
+ /// </summary>
+ /// <param name="name">Name of the preset</param>
+ /// <returns>True if found</returns>
+ bool CheckIfPresetExists(string name);
+ }
+} \ No newline at end of file
diff --git a/win/C#/HandBrake.ApplicationServices/Services/PresetService.cs b/win/C#/HandBrake.ApplicationServices/Services/PresetService.cs
new file mode 100644
index 000000000..dbfb8782f
--- /dev/null
+++ b/win/C#/HandBrake.ApplicationServices/Services/PresetService.cs
@@ -0,0 +1,350 @@
+/* PresetService.cs $
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
+
+namespace HandBrake.ApplicationServices.Services
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Collections.ObjectModel;
+ using System.ComponentModel;
+ using System.Diagnostics;
+ using System.IO;
+ using System.Linq;
+ using System.Text.RegularExpressions;
+ using System.Windows.Data;
+ using System.Xml.Serialization;
+
+ using HandBrake.ApplicationServices.Model;
+ using HandBrake.ApplicationServices.Services.Interfaces;
+
+ /// <summary>
+ /// The preset service manages HandBrake's presets
+ /// </summary>
+ public class PresetService : IPresetService
+ {
+ /**
+ * TODO:
+ * - Wire this into the Forms and WPF UI's
+ * - Note: This is untested so far. It'll likely need fixes before it can be used.
+ **/
+
+ #region Private Variables
+
+ /// <summary>
+ /// XML Serializer
+ /// </summary>
+ private static readonly XmlSerializer Ser = new XmlSerializer(typeof(List<Preset>));
+
+ /// <summary>
+ /// The User Preset file
+ /// </summary>
+ private readonly string userPresetFile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\user_presets.xml";
+
+ /// <summary>
+ /// The Built In Presets File
+ /// </summary>
+ private readonly string builtInPresetFile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\presets.xml";
+
+ /// <summary>
+ /// A Collection of presets
+ /// </summary>
+ private ObservableCollection<Preset> presets = new ObservableCollection<Preset>();
+
+ #endregion
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="PresetService"/> class.
+ /// </summary>
+ public PresetService()
+ {
+ this.Presets = CollectionViewSource.GetDefaultView(this.presets);
+ this.LoadPresets();
+ }
+
+ /// <summary>
+ /// Gets or sets a Collection of presets.
+ /// </summary>
+ public ICollectionView Presets { get; set; }
+
+ #region Public Methods
+
+ /// <summary>
+ /// Add a new preset to the system
+ /// </summary>
+ /// <param name="preset">
+ /// A Preset to add
+ /// </param>
+ /// <returns>
+ /// True if added,
+ /// False if name already exists
+ /// </returns>
+ public bool Add(Preset preset)
+ {
+ if (this.CheckIfPresetExists(preset.Name) == false)
+ {
+ this.presets.Add(preset);
+
+ // Update the presets file
+ this.UpdatePresetFiles();
+ return true;
+ }
+
+ return false;
+ }
+
+ /// <summary>
+ /// Remove a preset with a given name from either the built in or user preset list.
+ /// </summary>
+ /// <param name="preset">
+ /// The Preset to remove
+ /// </param>
+ public void Remove(Preset preset)
+ {
+ this.presets.Remove(preset);
+
+ // Update the presets file
+ this.UpdatePresetFiles();
+ }
+
+ /// <summary>
+ /// Get a Preset
+ /// </summary>
+ /// <param name="name">
+ /// The name of the preset to get
+ /// </param>
+ /// <returns>
+ /// A Preset or null object
+ /// </returns>
+ public Preset GetPreset(string name)
+ {
+ return this.presets.FirstOrDefault(item => item.Name == name);
+ }
+
+ /// <summary>
+ /// Clear Built-in Presets
+ /// </summary>
+ public void ClearBuiltIn()
+ {
+ List<Preset> remove = this.presets.Where(p => p.IsBuildIn).ToList();
+ foreach (Preset preset in remove)
+ {
+ this.presets.Remove(preset);
+ }
+ }
+
+ /// <summary>
+ /// Clear all presets
+ /// </summary>
+ public void ClearAll()
+ {
+ this.presets.Clear();
+ }
+
+ /// <summary>
+ /// Reads the CLI's CLI output format and load's them into the preset List Preset
+ /// </summary>
+ /// <param name="cliPath">
+ /// The Path to the CLI, leave blank for current folder.
+ /// </param>
+ public void UpdateBuiltInPresets(string cliPath)
+ {
+ // Create a new tempory file and execute the CLI to get the built in Presets.
+ string handbrakeCLIPath = Path.Combine(cliPath, "HandBrakeCLI.exe");
+ string presetsPath = Path.Combine(Path.GetTempPath(), "temp_presets.dat");
+ string strCmdLine = String.Format(@"cmd /c """"{0}"" --preset-list >""{1}"" 2>&1""", handbrakeCLIPath, presetsPath);
+
+ ProcessStartInfo getPresets = new ProcessStartInfo("CMD.exe", strCmdLine) { WindowStyle = ProcessWindowStyle.Hidden };
+
+ Process hbproc = Process.Start(getPresets);
+ hbproc.WaitForExit();
+ hbproc.Dispose();
+ hbproc.Close();
+
+ // Clear the current built in Presets and now parse the tempory Presets file.
+ this.presets.Clear();
+
+ if (File.Exists(presetsPath))
+ {
+ StreamReader presetInput = new StreamReader(presetsPath);
+
+ string category = String.Empty;
+
+ while (!presetInput.EndOfStream)
+ {
+ string line = presetInput.ReadLine();
+
+ // Found the beginning of a preset block
+ if (line != null && line.Contains("<") && !line.Contains("<<"))
+ {
+ category = line.Replace("<", string.Empty).Trim();
+ }
+
+ // Found a preset
+ if (line != null && line.Contains("+"))
+ {
+ Regex r = new Regex("(: )"); // Split on hyphens.
+ string[] presetName = r.Split(line);
+
+ bool pic = false;
+ if (presetName[2].Contains("crop"))
+ {
+ pic = true;
+ }
+
+ Preset newPreset = new Preset
+ {
+ Category = category,
+ Name = presetName[0].Replace("+", string.Empty).Trim(),
+ Query = presetName[2],
+ Version = Init.Version,
+ CropSettings = pic,
+ Description = string.Empty // Maybe one day we will populate this.
+ };
+ this.presets.Add(newPreset);
+ }
+ }
+ presetInput.Close();
+ presetInput.Dispose();
+ }
+
+ // Finally, Create a new or update the current Presets.xml file
+ this.UpdatePresetFiles();
+ }
+
+ /// <summary>
+ /// Check if the built in Presets stored are not out of date.
+ /// Update them if they are.
+ /// </summary>
+ /// <returns>true if out of date</returns>
+ public bool CheckIfPresetsAreOutOfDate()
+ {
+ // Update built-in Presets if the built-in Presets belong to an older version.
+ if (this.presets.Count != 0)
+ {
+ if (this.presets[0].Version != Init.Version)
+ {
+ this.UpdateBuiltInPresets(string.Empty);
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /// <summary>
+ /// Check if the preset "name" exists in either Presets or UserPresets lists.
+ /// </summary>
+ /// <param name="name">Name of the preset</param>
+ /// <returns>True if found</returns>
+ public bool CheckIfPresetExists(string name)
+ {
+ return name == string.Empty || this.presets.Any(item => item.Name == name);
+ }
+
+ #endregion
+
+ #region Private Helpers
+
+ /// <summary>
+ /// Recover from a courrpted preset file
+ /// Add .old to the current filename, and delete the current file.
+ /// </summary>
+ /// <param name="file">
+ /// The broken presets file.
+ /// </param>
+ private static void RecoverFromCorruptedPresetFile(string file)
+ {
+ // Recover from Error.
+ if (File.Exists(file))
+ {
+ string disabledFile = file + ".old";
+ File.Move(file, disabledFile);
+ if (File.Exists(file))
+ {
+ File.Delete(file);
+ }
+ }
+ }
+
+ /// <summary>
+ /// Load in the Built-in and User presets into the collection
+ /// </summary>
+ private void LoadPresets()
+ {
+ // First clear the Presets arraylists
+ this.presets.Clear();
+
+ // Load in the users Presets from UserPresets.xml
+ try
+ {
+ if (File.Exists(this.builtInPresetFile))
+ {
+ StreamReader reader = new StreamReader(this.builtInPresetFile);
+ List<Preset> list = (List<Preset>)Ser.Deserialize(reader);
+ foreach (Preset preset in list)
+ {
+ this.presets.Add(preset);
+ }
+
+ reader.Close();
+ }
+ }
+ catch (Exception)
+ {
+ RecoverFromCorruptedPresetFile(this.builtInPresetFile);
+ this.UpdateBuiltInPresets(string.Empty);
+ }
+
+ // Load in the users Presets from UserPresets.xml
+ try
+ {
+ if (File.Exists(this.userPresetFile))
+ {
+ StreamReader reader = new StreamReader(this.userPresetFile);
+ List<Preset> list = (List<Preset>)Ser.Deserialize(reader);
+ foreach (Preset preset in list)
+ {
+ this.presets.Add(preset);
+ }
+
+ reader.Close();
+ }
+ }
+ catch (Exception)
+ {
+ RecoverFromCorruptedPresetFile(this.userPresetFile);
+ }
+ }
+
+ /// <summary>
+ /// Update the preset files
+ /// </summary>
+ private void UpdatePresetFiles()
+ {
+ try
+ {
+ using (FileStream strm = new FileStream(this.builtInPresetFile, FileMode.Create, FileAccess.Write))
+ {
+ Ser.Serialize(strm, this.presets.Where(p => p.IsBuildIn));
+ strm.Close();
+ strm.Dispose();
+ }
+
+ using (FileStream strm = new FileStream(this.userPresetFile, FileMode.Create, FileAccess.Write))
+ {
+ Ser.Serialize(strm, this.presets.Where(p => p.IsBuildIn == false));
+ strm.Close();
+ strm.Dispose();
+ }
+ }
+ catch (Exception exc)
+ {
+ throw new Exception("Unable to write to the file. Please make sure the location has the correct permissions for file writing.\n Error Information: \n\n", exc);
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/win/C#/HandBrake.ApplicationServices/Services/QueueManager.cs b/win/C#/HandBrake.ApplicationServices/Services/QueueManager.cs
index f244e0156..7f723b8b4 100644
--- a/win/C#/HandBrake.ApplicationServices/Services/QueueManager.cs
+++ b/win/C#/HandBrake.ApplicationServices/Services/QueueManager.cs
@@ -1,4 +1,9 @@
-namespace HandBrake.ApplicationServices.Services
+/* QueueManager.cs $
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
+
+namespace HandBrake.ApplicationServices.Services
{
using System;
using System.Collections.Generic;
diff --git a/win/C#/HandBrake.ApplicationServices/Settings.StyleCop b/win/C#/HandBrake.ApplicationServices/Settings.StyleCop
index e61afbf69..a691f204b 100644
--- a/win/C#/HandBrake.ApplicationServices/Settings.StyleCop
+++ b/win/C#/HandBrake.ApplicationServices/Settings.StyleCop
@@ -1,4 +1,7 @@
<StyleCopSettings Version="4.3">
+ <GlobalSettings>
+ <BooleanProperty Name="WriteCache">False</BooleanProperty>
+ </GlobalSettings>
<Analyzers>
<Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.DocumentationRules">
<Rules>
diff --git a/win/C#/HandBrakeCS.csproj b/win/C#/HandBrakeCS.csproj
index 0eb720f83..2f0ebe0ca 100644
--- a/win/C#/HandBrakeCS.csproj
+++ b/win/C#/HandBrakeCS.csproj
@@ -257,7 +257,6 @@
</Compile>
<Compile Include="Model\SourceType.cs" />
<Compile Include="Presets\PlistPresetHandler.cs" />
- <Compile Include="Presets\Preset.cs" />
<Compile Include="Presets\PresetsHandler.cs" />
<Compile Include="Functions\QueryParser.cs" />
<Compile Include="Program.cs" />
diff --git a/win/C#/Presets/PlistPresetHandler.cs b/win/C#/Presets/PlistPresetHandler.cs
index 12731f271..8be15633c 100644
--- a/win/C#/Presets/PlistPresetHandler.cs
+++ b/win/C#/Presets/PlistPresetHandler.cs
@@ -13,10 +13,9 @@ namespace Handbrake.Presets
using System.Xml;
using Functions;
+ using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
- using Model;
-
/// <summary>
/// Plist Preset Converter
/// </summary>
diff --git a/win/C#/Presets/PresetsHandler.cs b/win/C#/Presets/PresetsHandler.cs
index 456cdfd8a..40ddeb28a 100644
--- a/win/C#/Presets/PresetsHandler.cs
+++ b/win/C#/Presets/PresetsHandler.cs
@@ -15,6 +15,8 @@ namespace Handbrake.Presets
using System.Windows.Forms;
using System.Xml.Serialization;
+ using HandBrake.ApplicationServices.Model;
+
/// <summary>
/// The Preset Handler Class
/// </summary>
diff --git a/win/C#/Program.cs b/win/C#/Program.cs
index d80129322..34bf5098b 100644
--- a/win/C#/Program.cs
+++ b/win/C#/Program.cs
@@ -108,7 +108,7 @@ namespace Handbrake
private static void InitializeApplicationServices()
{
string versionId = String.Format("Windows GUI {1} {0}", Settings.Default.hb_build, Settings.Default.hb_version);
- Init.SetupSettings(versionId, InstanceId, Settings.Default.CompletionOption, Settings.Default.noDvdNav,
+ Init.SetupSettings(versionId, Settings.Default.hb_version, InstanceId, Settings.Default.CompletionOption, Settings.Default.noDvdNav,
Settings.Default.growlEncode, Settings.Default.growlQueue,
Settings.Default.processPriority, Settings.Default.saveLogPath, Settings.Default.saveLogToSpecifiedPath,
Settings.Default.saveLogWithVideo, Settings.Default.showCliForInGuiEncodeStatus, Settings.Default.preventSleep);
diff --git a/win/C#/frmOptions.cs b/win/C#/frmOptions.cs
index 89c5aaee1..4ad7b87f9 100644
--- a/win/C#/frmOptions.cs
+++ b/win/C#/frmOptions.cs
@@ -503,6 +503,7 @@ namespace Handbrake
"Windows GUI {1} {0}", Settings.Default.hb_build, Settings.Default.hb_version);
Init.SetupSettings(
versionId,
+ Settings.Default.hb_version,
Program.InstanceId,
Settings.Default.CompletionOption,
Settings.Default.noDvdNav,
diff --git a/win/C#/frmOptions.resx b/win/C#/frmOptions.resx
index 42c24c337..2bfb5c9f4 100644
--- a/win/C#/frmOptions.resx
+++ b/win/C#/frmOptions.resx
@@ -112,12 +112,12 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 18</value>
</metadata>
<data name="check_m4v.ToolTip" xml:space="preserve">
@@ -138,13 +138,13 @@ meaing you'll have playable files if you choose to end the encode early.
When disabled, Presseting "Stop" on the main winow will render the encode unplayable.</value>
</data>
- <metadata name="pathFinder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <metadata name="pathFinder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
- <metadata name="openFile_vlc.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <metadata name="openFile_vlc.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>224, 18</value>
</metadata>
- <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAYAMDAAAAEACACoDgAAZgAAACAgAAABAAgAqAgAAA4PAAAQEAAAAQAIAGgFAAC2FwAAMDAAAAEA