diff options
author | sr55 <[email protected]> | 2008-06-12 17:00:20 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2008-06-12 17:00:20 +0000 |
commit | 5996a02806deff78ab32db080023b2115a8f15ca (patch) | |
tree | 8e36b75f960d2d01a2af069e4144a3d3fa7d3e6f | |
parent | f0720378ae3b63adba2ac11d912853d6bfe298e6 (diff) |
WinGui:
- Fixed #78 and #79
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1508 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | win/C#/Functions/QueryParser.cs | 4 | ||||
-rw-r--r-- | win/C#/HandBrakeCS.csproj | 1 | ||||
-rw-r--r-- | win/C#/Properties/AssemblyInfo.cs | 4 | ||||
-rw-r--r-- | win/C#/Properties/Settings.Designer.cs | 4 | ||||
-rw-r--r-- | win/C#/Properties/Settings.settings | 4 | ||||
-rw-r--r-- | win/C#/app.config | 4 | ||||
-rw-r--r-- | win/C#/frmAddPreset.cs | 49 | ||||
-rw-r--r-- | win/C#/frmMain.Designer.cs | 6 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 1 |
9 files changed, 45 insertions, 32 deletions
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs index a0550b06e..87c1def3e 100644 --- a/win/C#/Functions/QueryParser.cs +++ b/win/C#/Functions/QueryParser.cs @@ -850,7 +850,7 @@ namespace Handbrake.Functions Match forcedSubtitles = Regex.Match(input, @"-F");
//H264 Tab
- Match x264 = Regex.Match(input, @"-x ([,a-zA-Z0-9=:-]*)");
+ Match x264 = Regex.Match(input, @"-x ([.,/a-zA-Z0-9=:-]*)");
//Program Options
Match verbose = Regex.Match(input, @"-v");
@@ -962,7 +962,7 @@ namespace Handbrake.Functions thisQuery.q_denoise = "None";
if (denoise.Success != false)
{
- switch (denoise.ToString().Replace("--denoise=", ""))
+ switch (denoise.ToString().Replace("--denoise=", "").Replace("\"", ""))
{
case "weak":
thisQuery.q_denoise = "Weak";
diff --git a/win/C#/HandBrakeCS.csproj b/win/C#/HandBrakeCS.csproj index 49f2ae677..a8b3107d9 100644 --- a/win/C#/HandBrakeCS.csproj +++ b/win/C#/HandBrakeCS.csproj @@ -153,6 +153,7 @@ <DependentUpon>frmUpdater.cs</DependentUpon>
</Compile>
<Compile Include="Functions\Common.cs" />
+ <Compile Include="Functions\Presets.cs" />
<Compile Include="Functions\RssReader.cs" />
<Compile Include="Functions\CLI.cs" />
<Compile Include="Functions\QueryParser.cs" />
diff --git a/win/C#/Properties/AssemblyInfo.cs b/win/C#/Properties/AssemblyInfo.cs index d64a9efa0..f7ea463b2 100644 --- a/win/C#/Properties/AssemblyInfo.cs +++ b/win/C#/Properties/AssemblyInfo.cs @@ -36,6 +36,6 @@ using System.Resources; // Build Number
// Revision
//
-[assembly: AssemblyVersion("0.9.2.0")]
-[assembly: AssemblyFileVersion("0.9.2.0")]
+[assembly: AssemblyVersion("0.9.3.0")]
+[assembly: AssemblyFileVersion("0.9.3.0")]
[assembly: NeutralResourcesLanguageAttribute("")]
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs index 41899aafe..f4ab1fb8a 100644 --- a/win/C#/Properties/Settings.Designer.cs +++ b/win/C#/Properties/Settings.Designer.cs @@ -73,7 +73,7 @@ namespace Handbrake.Properties { [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("0.9.3")]
+ [global::System.Configuration.DefaultSettingValueAttribute("SVN1477")]
public string hb_version {
get {
return ((string)(this["hb_version"]));
@@ -121,7 +121,7 @@ namespace Handbrake.Properties { [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("2008043001")]
+ [global::System.Configuration.DefaultSettingValueAttribute("2008053100")]
public int hb_build {
get {
return ((int)(this["hb_build"]));
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings index e36176bfb..c216caee5 100644 --- a/win/C#/Properties/Settings.settings +++ b/win/C#/Properties/Settings.settings @@ -15,7 +15,7 @@ <Value Profile="(Default)">Checked</Value>
</Setting>
<Setting Name="hb_version" Type="System.String" Scope="User">
- <Value Profile="(Default)">0.9.3</Value>
+ <Value Profile="(Default)">SVN1477</Value>
</Setting>
<Setting Name="tooltipEnable" Type="System.String" Scope="User">
<Value Profile="(Default)">Checked</Value>
@@ -27,7 +27,7 @@ <Value Profile="(Default)">Checked</Value>
</Setting>
<Setting Name="hb_build" Type="System.Int32" Scope="User">
- <Value Profile="(Default)">2008043001</Value>
+ <Value Profile="(Default)">2008053100</Value>
</Setting>
<Setting Name="skipversion" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
diff --git a/win/C#/app.config b/win/C#/app.config index 83490f5ac..0b4648b4b 100644 --- a/win/C#/app.config +++ b/win/C#/app.config @@ -20,7 +20,7 @@ <value>Checked</value>
</setting>
<setting name="hb_version" serializeAs="String">
- <value>SVN1457</value>
+ <value>SVN1477</value>
</setting>
<setting name="tooltipEnable" serializeAs="String">
<value>Checked</value>
@@ -32,7 +32,7 @@ <value>Checked</value>
</setting>
<setting name="hb_build" serializeAs="String">
- <value>2008051201</value>
+ <value>2008053100</value>
</setting>
<setting name="skipversion" serializeAs="String">
<value>0</value>
diff --git a/win/C#/frmAddPreset.cs b/win/C#/frmAddPreset.cs index 2beabc53c..f6a51fc6a 100644 --- a/win/C#/frmAddPreset.cs +++ b/win/C#/frmAddPreset.cs @@ -12,6 +12,7 @@ using System.Drawing; using System.Text;
using System.Windows.Forms;
using System.IO;
+using System.Windows.Forms;
namespace Handbrake
{
@@ -34,28 +35,40 @@ namespace Handbrake {
Functions.Common hb_common_func = new Functions.Common();
- string userPresets = Application.StartupPath.ToString() + "\\user_presets.dat";
- try
+ Boolean already_exists = false;
+ foreach (TreeNode treenode in frmMainWindow.treeView_presets.Nodes)
{
- // Create a StreamWriter and open the file
- StreamWriter line = File.AppendText(userPresets);
-
- // Generate and write the preset string to the file
- String query = hb_common_func.GenerateTheQuery(frmMainWindow);
- String preset = "+ " + txt_preset_name.Text + ": " + query;
- line.WriteLine(preset);
-
- // close the stream
- line.Close();
- line.Dispose();
- MessageBox.Show("Your profile has been sucessfully added.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
+ if (treenode.ToString().Equals("TreeNode: --" + txt_preset_name.Text))
+ already_exists = true;
}
- catch (Exception exc)
+
+ if (already_exists == true)
+ MessageBox.Show("Sorry, a preset with this name already exists", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ else
{
- MessageBox.Show("Unable to write to the file. Please make sure the location has the correct permissions for file writing.\n" + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+ string userPresets = Application.StartupPath.ToString() + "\\user_presets.dat";
+ try
+ {
+ // Create a StreamWriter and open the file
+ StreamWriter line = File.AppendText(userPresets);
+
+ // Generate and write the preset string to the file
+ String query = hb_common_func.GenerateTheQuery(frmMainWindow);
+ String preset = "+ " + txt_preset_name.Text + ": " + query;
+ line.WriteLine(preset);
+
+ // close the stream
+ line.Close();
+ line.Dispose();
+ MessageBox.Show("Your profile has been sucessfully added.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
+ }
+ catch (Exception exc)
+ {
+ MessageBox.Show("Unable to write to the file. Please make sure the location has the correct permissions for file writing.\n" + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+ }
+ frmMainWindow.loadPresetPanel();
+ this.Close();
}
- frmMainWindow.loadPresetPanel();
- this.Close();
}
}
}
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index f11b56f87..2cb7f6a33 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -966,10 +966,10 @@ namespace Handbrake // ISO_Open
//
this.ISO_Open.DefaultExt = "ISO";
- this.ISO_Open.Filter = "All Supported Files|*.iso;*.mpg;*.m2t;*.vob;*.ts;*.mpeg;*.mpeg;*.avi;*.mp4;*.mkv;";
+ this.ISO_Open.Filter = "All Supported Files|*.iso;*.mpg;*.m2t;*.vob;*.ts;*.mpeg;*.mpeg;*.avi;*.mp4;*.mkv;" +
+ "";
this.ISO_Open.RestoreDirectory = true;
this.ISO_Open.SupportMultiDottedExtensions = true;
-
//
// FileToolStripMenuItem
//
@@ -3093,7 +3093,6 @@ namespace Handbrake private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripMenuItem mnu_open;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
- private System.Windows.Forms.TreeView treeView_presets;
internal System.Windows.Forms.CheckBox check_vfr;
internal System.Windows.Forms.CheckBox check_iPodAtom;
internal System.Windows.Forms.Label lbl_vfr;
@@ -3219,6 +3218,7 @@ namespace Handbrake internal System.Windows.Forms.TrackBar trackBar2;
internal System.Windows.Forms.Label label16;
internal System.Windows.Forms.Label lbl_drc1;
+ internal System.Windows.Forms.TreeView treeView_presets;
}
}
\ No newline at end of file diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 12b51041b..8db694d83 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -1488,7 +1488,6 @@ namespace Handbrake else
presetInput.ReadLine();
}
-
presetInput.Close();
}
|