summaryrefslogtreecommitdiffstats
path: root/win/C#/Presets
diff options
context:
space:
mode:
authorsr55 <[email protected]>2008-12-30 22:47:48 +0000
committersr55 <[email protected]>2008-12-30 22:47:48 +0000
commit382ca3aad89ad78b1c074ee0c272939dd80dc888 (patch)
tree6706fde00864b7f61b166b9700f7df4b11911a77 /win/C#/Presets
parenteef37cf07dc0a9c28b938688469ca0bbdbe35720 (diff)
WinGui:
- Set Default now set's the currently selected preset to default, not the current settings. - Add Preset can now optionally add a flag to allow saving of picture size information (just like the macgui) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2052 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Presets')
-rw-r--r--win/C#/Presets/PresetsHandler.cs9
-rw-r--r--win/C#/Presets/preset.cs10
2 files changed, 15 insertions, 4 deletions
diff --git a/win/C#/Presets/PresetsHandler.cs b/win/C#/Presets/PresetsHandler.cs
index 172125a9f..fbd36fbdb 100644
--- a/win/C#/Presets/PresetsHandler.cs
+++ b/win/C#/Presets/PresetsHandler.cs
@@ -20,13 +20,14 @@ namespace Handbrake.Presets
/// </summary>
/// <param name="presetName">String, The name of the new preset</param>
/// <param name="query">String, the CLI query for the new preset</param>
- public Boolean addPreset(string presetName, string query)
+ public Boolean addPreset(string presetName, string query, Boolean pictureSettings)
{
if (checkIfPresetExists(presetName) == false)
{
Preset newPreset = new Preset();
newPreset.Name = presetName;
newPreset.Query = query;
+ newPreset.PictureSettings = pictureSettings;
user_presets.Add(newPreset);
updateUserPresetsFile();
return true;
@@ -107,20 +108,20 @@ namespace Handbrake.Presets
/// </summary>
/// <param name="name">String, The preset's name</param>
/// <returns>String, the CLI query for the given preset name</returns>
- public string getCliForPreset(string name)
+ public Preset getPreset(string name)
{
// Built In Presets
foreach (Preset item in presets)
{
if (item.Name == name)
- return item.Query;
+ return item;
}
// User Presets
foreach (Preset item in user_presets)
{
if (item.Name == name)
- return item.Query;
+ return item;
}
return null;
diff --git a/win/C#/Presets/preset.cs b/win/C#/Presets/preset.cs
index 58d3be966..ee983427a 100644
--- a/win/C#/Presets/preset.cs
+++ b/win/C#/Presets/preset.cs
@@ -15,6 +15,7 @@ namespace Handbrake.Presets
private string category = null;
private string name;
private string query;
+ private Boolean pictureSettings;
/// <summary>
/// Get or Set the preset's level. This indicated if it is a root or child node
@@ -52,5 +53,14 @@ namespace Handbrake.Presets
set { this.query = value; }
}
+ /// <summary>
+ /// Get or set the usage of Picture Settings in presets.
+ /// </summary>
+ public Boolean PictureSettings
+ {
+ get { return pictureSettings; }
+ set { this.pictureSettings = value; }
+ }
+
}
} \ No newline at end of file