summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/C#/Functions/Common.cs18
-rw-r--r--win/C#/Functions/Presets.cs2
-rw-r--r--win/C#/Functions/QueryParser.cs16
-rw-r--r--win/C#/Properties/Settings.Designer.cs2
-rw-r--r--win/C#/Properties/Settings.settings2
-rw-r--r--win/C#/app.config2
-rw-r--r--win/C#/frmMain.Designer.cs83
-rw-r--r--win/C#/frmMain.cs15
-rw-r--r--win/C#/frmMain.resx6
9 files changed, 101 insertions, 45 deletions
diff --git a/win/C#/Functions/Common.cs b/win/C#/Functions/Common.cs
index 96c56a856..7b3e36fc9 100644
--- a/win/C#/Functions/Common.cs
+++ b/win/C#/Functions/Common.cs
@@ -135,11 +135,17 @@ namespace Handbrake.Functions
else
mainWindow.check_detelecine.CheckState = CheckState.Unchecked;
-
- if (presetQuery.DeBlock == true)
- mainWindow.check_deblock.CheckState = CheckState.Checked;
+ if (presetQuery.DeBlock != 0)
+ {
+ mainWindow.slider_deblock.Value = presetQuery.DeBlock;
+ mainWindow.lbl_deblockVal.Text = presetQuery.DeBlock.ToString();
+ }
else
- mainWindow.check_deblock.CheckState = CheckState.Unchecked;
+ {
+ mainWindow.slider_deblock.Value = 0;
+ mainWindow.lbl_deblockVal.Text = "0";
+ }
+
if (presetQuery.Anamorphic == true)
@@ -573,8 +579,8 @@ namespace Handbrake.Functions
else if (mainWindow.drp_anamorphic.SelectedIndex == 2)
query += " -P ";
- if (mainWindow.check_deblock.Checked)
- query += " --deblock";
+ if (mainWindow.slider_deblock.Value != 0)
+ query += " --deblock=" + mainWindow.slider_deblock.Value;
if (mainWindow.check_detelecine.Checked)
query += " --detelecine";
diff --git a/win/C#/Functions/Presets.cs b/win/C#/Functions/Presets.cs
index 0e176b12a..9c23aef1d 100644
--- a/win/C#/Functions/Presets.cs
+++ b/win/C#/Functions/Presets.cs
@@ -207,13 +207,11 @@ namespace Handbrake.Functions
// 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 Error Information: \n\n" + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
}
-
}
// Check if a preset already exists in either the built in or user presets
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs
index 80fe989f8..347e3f988 100644
--- a/win/C#/Functions/QueryParser.cs
+++ b/win/C#/Functions/QueryParser.cs
@@ -231,11 +231,11 @@ namespace Handbrake.Functions
}
}
- private Boolean q_deBlock;
+ private int q_deBlock;
/// <summary>
/// Returns a boolean to indicate wither DeBlock is on or off.
/// </summary>
- public Boolean DeBlock
+ public int DeBlock
{
get
{
@@ -814,7 +814,7 @@ namespace Handbrake.Functions
Match height = Regex.Match(input, @"-l ([0-9]*)");
Match deinterlace = Regex.Match(input, @"--deinterlace=\""([a-zA-Z]*)\""");
Match denoise = Regex.Match(input, @"--denoise=\""([a-zA-Z]*)\""");
- Match deblock = Regex.Match(input, @"--deblock");
+ Match deblock = Regex.Match(input, @"--deblock=([0-9]*)");
Match detelecine = Regex.Match(input, @"--detelecine");
Match anamorphic = Regex.Match(input, @" -p ");
Match chapterMarkers = Regex.Match(input, @" -m");
@@ -953,8 +953,16 @@ namespace Handbrake.Functions
thisQuery.q_cropRight = actCropValues[3];
}
+ // Deblock Slider
+ string deblockValue = "";
+ thisQuery.q_deBlock = 0;
+ if (deblock.Success != false)
+ deblockValue = deblock.ToString().Replace("--deblock=", "");
+
+ if (deblockValue != "")
+ int.TryParse(deblockValue, out thisQuery.q_deBlock);
+
thisQuery.q_detelecine = detelecine.Success;
- thisQuery.q_deBlock = deblock.Success;
thisQuery.q_decomb = decomb.Success;
thisQuery.q_deinterlace = "None";
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs
index 0ce64f345..f1ce04bcd 100644
--- a/win/C#/Properties/Settings.Designer.cs
+++ b/win/C#/Properties/Settings.Designer.cs
@@ -109,7 +109,7 @@ namespace Handbrake.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("Checked")]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
public string defaultUserSettings {
get {
return ((string)(this["defaultUserSettings"]));
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings
index c7e206e1a..60694165d 100644
--- a/win/C#/Properties/Settings.settings
+++ b/win/C#/Properties/Settings.settings
@@ -24,7 +24,7 @@
<Value Profile="(Default)">Do Nothing</Value>
</Setting>
<Setting Name="defaultUserSettings" Type="System.String" Scope="User">
- <Value Profile="(Default)">Checked</Value>
+ <Value Profile="(Default)" />
</Setting>
<Setting Name="hb_build" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
diff --git a/win/C#/app.config b/win/C#/app.config
index e36dca948..ce66d92db 100644
--- a/win/C#/app.config
+++ b/win/C#/app.config
@@ -29,7 +29,7 @@
<value>Do Nothing</value>
</setting>
<setting name="defaultUserSettings" serializeAs="String">
- <value>Checked</value>
+ <value />
</setting>
<setting name="hb_build" serializeAs="String">
<value>0</value>
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs
index 768db1111..6867232f2 100644
--- a/win/C#/frmMain.Designer.cs
+++ b/win/C#/frmMain.Designer.cs
@@ -38,7 +38,7 @@ namespace Handbrake
System.Windows.Forms.Label Label38;
System.Windows.Forms.ContextMenuStrip notifyIconMenu;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.btn_restore = new System.Windows.Forms.ToolStripMenuItem();
this.DVD_Save = new System.Windows.Forms.SaveFileDialog();
this.File_Save = new System.Windows.Forms.SaveFileDialog();
@@ -165,6 +165,8 @@ namespace Handbrake
this.Label46 = new System.Windows.Forms.Label();
this.Label40 = new System.Windows.Forms.Label();
this.TabPage1 = new System.Windows.Forms.TabPage();
+ this.lbl_deblockVal = new System.Windows.Forms.Label();
+ this.slider_deblock = new System.Windows.Forms.TrackBar();
this.check_customCrop = new System.Windows.Forms.RadioButton();
this.check_autoCrop = new System.Windows.Forms.RadioButton();
this.check_decomb = new System.Windows.Forms.CheckBox();
@@ -183,7 +185,6 @@ namespace Handbrake
this.label24 = new System.Windows.Forms.Label();
this.drp_deNoise = new System.Windows.Forms.ComboBox();
this.label11 = new System.Windows.Forms.Label();
- this.check_deblock = new System.Windows.Forms.CheckBox();
this.check_detelecine = new System.Windows.Forms.CheckBox();
this.label4 = new System.Windows.Forms.Label();
this.drp_deInterlace_option = new System.Windows.Forms.ComboBox();
@@ -258,6 +259,7 @@ namespace Handbrake
this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
this.StatusStrip = new System.Windows.Forms.StatusStrip();
this.lbl_encode = new System.Windows.Forms.ToolStripStatusLabel();
+ this.label8 = new System.Windows.Forms.Label();
Label38 = new System.Windows.Forms.Label();
notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
notifyIconMenu.SuspendLayout();
@@ -273,6 +275,7 @@ namespace Handbrake
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
this.TabPage3.SuspendLayout();
this.TabPage1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.slider_deblock)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.text_bottom)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.text_top)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.text_left)).BeginInit();
@@ -643,9 +646,9 @@ namespace Handbrake
//
// number
//
- dataGridViewCellStyle1.Format = "N0";
- dataGridViewCellStyle1.NullValue = null;
- this.number.DefaultCellStyle = dataGridViewCellStyle1;
+ dataGridViewCellStyle2.Format = "N0";
+ dataGridViewCellStyle2.NullValue = null;
+ this.number.DefaultCellStyle = dataGridViewCellStyle2;
this.number.HeaderText = "Chapter Number";
this.number.MaxInputLength = 3;
this.number.Name = "number";
@@ -1851,6 +1854,9 @@ namespace Handbrake
// TabPage1
//
this.TabPage1.BackColor = System.Drawing.Color.Transparent;
+ this.TabPage1.Controls.Add(this.label8);
+ this.TabPage1.Controls.Add(this.lbl_deblockVal);
+ this.TabPage1.Controls.Add(this.slider_deblock);
this.TabPage1.Controls.Add(this.check_customCrop);
this.TabPage1.Controls.Add(this.check_autoCrop);
this.TabPage1.Controls.Add(this.check_decomb);
@@ -1873,7 +1879,6 @@ namespace Handbrake
this.TabPage1.Controls.Add(this.label24);
this.TabPage1.Controls.Add(this.drp_deNoise);
this.TabPage1.Controls.Add(this.label11);
- this.TabPage1.Controls.Add(this.check_deblock);
this.TabPage1.Controls.Add(this.check_detelecine);
this.TabPage1.Controls.Add(this.label4);
this.TabPage1.Controls.Add(this.drp_deInterlace_option);
@@ -1889,6 +1894,26 @@ namespace Handbrake
this.TabPage1.TabIndex = 0;
this.TabPage1.Text = "Picture Settings";
//
+ // lbl_deblockVal
+ //
+ this.lbl_deblockVal.AutoSize = true;
+ this.lbl_deblockVal.BackColor = System.Drawing.Color.Transparent;
+ this.lbl_deblockVal.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_deblockVal.Location = new System.Drawing.Point(586, 213);
+ this.lbl_deblockVal.Name = "lbl_deblockVal";
+ this.lbl_deblockVal.Size = new System.Drawing.Size(14, 13);
+ this.lbl_deblockVal.TabIndex = 36;
+ this.lbl_deblockVal.Text = "0";
+ //
+ // slider_deblock
+ //
+ this.slider_deblock.Location = new System.Drawing.Point(406, 204);
+ this.slider_deblock.Maximum = 15;
+ this.slider_deblock.Name = "slider_deblock";
+ this.slider_deblock.Size = new System.Drawing.Size(174, 42);
+ this.slider_deblock.TabIndex = 35;
+ this.slider_deblock.Scroll += new System.EventHandler(this.slider_deblock_Scroll);
+ //
// check_customCrop
//
this.check_customCrop.AutoSize = true;
@@ -1918,7 +1943,7 @@ namespace Handbrake
this.check_decomb.AutoSize = true;
this.check_decomb.BackColor = System.Drawing.Color.Transparent;
this.check_decomb.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.check_decomb.Location = new System.Drawing.Point(314, 215);
+ this.check_decomb.Location = new System.Drawing.Point(314, 188);
this.check_decomb.Name = "check_decomb";
this.check_decomb.Size = new System.Drawing.Size(73, 17);
this.check_decomb.TabIndex = 32;
@@ -2065,7 +2090,7 @@ namespace Handbrake
this.check_vfr.AutoSize = true;
this.check_vfr.BackColor = System.Drawing.Color.Transparent;
this.check_vfr.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.check_vfr.Location = new System.Drawing.Point(413, 169);
+ this.check_vfr.Location = new System.Drawing.Point(413, 165);
this.check_vfr.Name = "check_vfr";
this.check_vfr.Size = new System.Drawing.Size(48, 17);
this.check_vfr.TabIndex = 24;
@@ -2078,7 +2103,7 @@ namespace Handbrake
this.label24.AutoSize = true;
this.label24.BackColor = System.Drawing.Color.Transparent;
this.label24.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label24.Location = new System.Drawing.Point(311, 146);
+ this.label24.Location = new System.Drawing.Point(311, 142);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(49, 13);
this.label24.TabIndex = 22;
@@ -2094,7 +2119,7 @@ namespace Handbrake
"Weak",
"Medium",
"Strong"});
- this.drp_deNoise.Location = new System.Drawing.Point(413, 266);
+ this.drp_deNoise.Location = new System.Drawing.Point(413, 277);
this.drp_deNoise.Name = "drp_deNoise";
this.drp_deNoise.Size = new System.Drawing.Size(161, 21);
this.drp_deNoise.TabIndex = 29;
@@ -2104,30 +2129,18 @@ namespace Handbrake
this.label11.AutoSize = true;
this.label11.BackColor = System.Drawing.Color.Transparent;
this.label11.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label11.Location = new System.Drawing.Point(311, 269);
+ this.label11.Location = new System.Drawing.Point(311, 280);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(58, 13);
this.label11.TabIndex = 28;
this.label11.Text = "Denoise:";
//
- // check_deblock
- //
- this.check_deblock.AutoSize = true;
- this.check_deblock.BackColor = System.Drawing.Color.Transparent;
- this.check_deblock.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.check_deblock.Location = new System.Drawing.Point(314, 192);
- this.check_deblock.Name = "check_deblock";
- this.check_deblock.Size = new System.Drawing.Size(72, 17);
- this.check_deblock.TabIndex = 25;
- this.check_deblock.Text = "Deblock";
- this.check_deblock.UseVisualStyleBackColor = false;
- //
// check_detelecine
//
this.check_detelecine.AutoSize = true;
this.check_detelecine.BackColor = System.Drawing.Color.Transparent;
this.check_detelecine.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.check_detelecine.Location = new System.Drawing.Point(314, 169);
+ this.check_detelecine.Location = new System.Drawing.Point(314, 165);
this.check_detelecine.Name = "check_detelecine";
this.check_detelecine.Size = new System.Drawing.Size(86, 17);
this.check_detelecine.TabIndex = 23;
@@ -2139,7 +2152,7 @@ namespace Handbrake
this.label4.AutoSize = true;
this.label4.BackColor = System.Drawing.Color.Transparent;
this.label4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label4.Location = new System.Drawing.Point(311, 241);
+ this.label4.Location = new System.Drawing.Point(311, 252);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(77, 13);
this.label4.TabIndex = 26;
@@ -2155,7 +2168,7 @@ namespace Handbrake
"Fast",
"Slow",
"Slower"});
- this.drp_deInterlace_option.Location = new System.Drawing.Point(413, 238);
+ this.drp_deInterlace_option.Location = new System.Drawing.Point(413, 249);
this.drp_deInterlace_option.Name = "drp_deInterlace_option";
this.drp_deInterlace_option.Size = new System.Drawing.Size(161, 21);
this.drp_deInterlace_option.TabIndex = 27;
@@ -3154,6 +3167,17 @@ namespace Handbrake
this.lbl_encode.Size = new System.Drawing.Size(31, 17);
this.lbl_encode.Text = "{0}";
//
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.BackColor = System.Drawing.Color.Transparent;
+ this.label8.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label8.Location = new System.Drawing.Point(311, 213);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(58, 13);
+ this.label8.TabIndex = 37;
+ this.label8.Text = "Deblock:";
+ //
// frmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -3192,6 +3216,7 @@ namespace Handbrake
this.TabPage3.PerformLayout();
this.TabPage1.ResumeLayout(false);
this.TabPage1.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.slider_deblock)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.text_bottom)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.text_top)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.text_left)).EndInit();
@@ -3280,9 +3305,7 @@ namespace Handbrake
internal System.Windows.Forms.Label Label20;
internal System.Windows.Forms.CheckBox check_grayscale;
internal System.Windows.Forms.Label label24;
- internal System.Windows.Forms.ComboBox drp_deNoise;
internal System.Windows.Forms.Label label11;
- internal System.Windows.Forms.CheckBox check_deblock;
internal System.Windows.Forms.CheckBox check_detelecine;
internal System.Windows.Forms.Label label4;
internal System.Windows.Forms.ComboBox drp_deInterlace_option;
@@ -3436,6 +3459,10 @@ namespace Handbrake
internal System.Windows.Forms.CheckBox check_decomb;
internal System.Windows.Forms.RadioButton check_customCrop;
internal System.Windows.Forms.RadioButton check_autoCrop;
+ internal System.Windows.Forms.Label lbl_deblockVal;
+ internal System.Windows.Forms.TrackBar slider_deblock;
+ internal System.Windows.Forms.ComboBox drp_deNoise;
+ internal System.Windows.Forms.Label label8;
}
} \ No newline at end of file
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 323d49f8e..5d8886746 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -161,8 +161,13 @@ namespace Handbrake
// Try to load the users default settings.
string userDefaults = Properties.Settings.Default.defaultUserSettings;
- Functions.QueryParser presetQuery = Functions.QueryParser.Parse(userDefaults);
- hb_common_func.presetLoader(this, presetQuery, "User Defaults ");
+ if (userDefaults == "")
+ loadNormalPreset();
+ else
+ {
+ Functions.QueryParser presetQuery = Functions.QueryParser.Parse(userDefaults);
+ hb_common_func.presetLoader(this, presetQuery, "User Defaults ");
+ }
}
private void queueRecovery()
{
@@ -816,6 +821,10 @@ namespace Handbrake
text_width.Enabled = true;
}
}
+ private void slider_deblock_Scroll(object sender, EventArgs e)
+ {
+ lbl_deblockVal.Text = slider_deblock.Value.ToString();
+ }
// Audio Tab
private void drp_track2Audio_SelectedIndexChanged(object sender, EventArgs e)
@@ -1887,6 +1896,8 @@ namespace Handbrake
#endregion
+
+
// This is the END of the road ------------------------------------------------------------------------------
}
} \ No newline at end of file
diff --git a/win/C#/frmMain.resx b/win/C#/frmMain.resx
index 1b5323eb3..d0c9f18a9 100644
--- a/win/C#/frmMain.resx
+++ b/win/C#/frmMain.resx
@@ -155,6 +155,12 @@ Make sure you have selected a "Title" from the "Source" box above otherwise
the list will not be populated with the correct amount of chapters.
Note: Do not change any of the chapter numbers!</value>
</data>
+ <metadata name="number.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
+ <metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
<metadata name="DVD_Open.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>223, 15</value>
</metadata>