diff options
-rw-r--r-- | win/C#/Functions/QueryParser.cs | 10 | ||||
-rw-r--r-- | win/C#/Properties/Settings.Designer.cs | 36 | ||||
-rw-r--r-- | win/C#/Properties/Settings.settings | 9 | ||||
-rw-r--r-- | win/C#/app.config | 9 | ||||
-rw-r--r-- | win/C#/frmMain.Designer.cs | 21 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 109 | ||||
-rw-r--r-- | win/C#/frmMain.resx | 8 | ||||
-rw-r--r-- | win/C#/frmOptions.Designer.cs | 165 | ||||
-rw-r--r-- | win/C#/frmOptions.cs | 42 | ||||
-rw-r--r-- | win/C#/frmOptions.resx | 2 |
10 files changed, 306 insertions, 105 deletions
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs index 00ae96655..110294803 100644 --- a/win/C#/Functions/QueryParser.cs +++ b/win/C#/Functions/QueryParser.cs @@ -589,7 +589,8 @@ namespace Handbrake.Functions Match optimizeMP4 = Regex.Match(input, @"-O");
//Audio Settings Tab
- Match subtitles = Regex.Match(input, @"-s ([0-9]*)");
+ Match subtitles = Regex.Match(input, @"-s ([0-9a-zA-Z]*)");
+ Match subScan = Regex.Match(input, @"-U");
Match audioBitrate = Regex.Match(input, @"-B ([0-9]*)");
Match audioSampleRate = Regex.Match(input, @"-R ([0-9.]*)");
Match audioChannelsMix = Regex.Match(input, @"-6 ([0-9a-z0-9]*)"); // 1 -6 dpl2 // Broken
@@ -849,7 +850,12 @@ namespace Handbrake.Functions if (subtitles.Success != false)
thisQuery.q_subtitles = subtitles.ToString().Replace("-s ", "");
else
- thisQuery.q_subtitles = "None";
+ {
+ if (subScan.Success)
+ thisQuery.q_subtitles = "Autoselect";
+ else
+ thisQuery.q_subtitles = "None";
+ }
thisQuery.q_forcedSubs = forcedSubtitles.Success;
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs index 755c75ba8..9fea5a39b 100644 --- a/win/C#/Properties/Settings.Designer.cs +++ b/win/C#/Properties/Settings.Designer.cs @@ -147,18 +147,6 @@ namespace Handbrake.Properties { [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
- public string hidePresets {
- get {
- return ((string)(this["hidePresets"]));
- }
- set {
- this["hidePresets"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
public string defaultUserSettings {
get {
return ((string)(this["defaultUserSettings"]));
@@ -203,5 +191,29 @@ namespace Handbrake.Properties { this["updatePresets"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string autoNaming {
+ get {
+ return ((string)(this["autoNaming"]));
+ }
+ set {
+ this["autoNaming"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string autoNamePath {
+ get {
+ return ((string)(this["autoNamePath"]));
+ }
+ set {
+ this["autoNamePath"] = value;
+ }
+ }
}
}
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings index ea64b0308..40cb829cb 100644 --- a/win/C#/Properties/Settings.settings +++ b/win/C#/Properties/Settings.settings @@ -32,9 +32,6 @@ <Setting Name="CompletionOption" Type="System.String" Scope="User">
<Value Profile="(Default)">Do Nothing</Value>
</Setting>
- <Setting Name="hidePresets" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
<Setting Name="defaultUserSettings" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
@@ -47,5 +44,11 @@ <Setting Name="updatePresets" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
+ <Setting Name="autoNaming" Type="System.String" Scope="User">
+ <Value Profile="(Default)" />
+ </Setting>
+ <Setting Name="autoNamePath" Type="System.String" Scope="User">
+ <Value Profile="(Default)" />
+ </Setting>
</Settings>
</SettingsFile>
\ No newline at end of file diff --git a/win/C#/app.config b/win/C#/app.config index 92f45da15..1b1b5194b 100644 --- a/win/C#/app.config +++ b/win/C#/app.config @@ -37,9 +37,6 @@ <setting name="CompletionOption" serializeAs="String">
<value>Do Nothing</value>
</setting>
- <setting name="hidePresets" serializeAs="String">
- <value />
- </setting>
<setting name="defaultUserSettings" serializeAs="String">
<value />
</setting>
@@ -52,6 +49,12 @@ <setting name="updatePresets" serializeAs="String">
<value />
</setting>
+ <setting name="autoNaming" serializeAs="String">
+ <value />
+ </setting>
+ <setting name="autoNamePath" serializeAs="String">
+ <value />
+ </setting>
</Handbrake.Properties.Settings>
</userSettings>
</configuration>
\ No newline at end of file diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index 35b335cb1..5e7d93ad0 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -385,7 +385,7 @@ namespace Handbrake this.CheckCRF.Size = new System.Drawing.Size(146, 17);
this.CheckCRF.TabIndex = 16;
this.CheckCRF.Text = "Constant Rate Factor";
- this.ToolTip.SetToolTip(this.CheckCRF, "Constant Rate Factor");
+ this.ToolTip.SetToolTip(this.CheckCRF, "Constant Rate Factor. (H264 Only)");
this.CheckCRF.UseVisualStyleBackColor = false;
//
// QueryEditorText
@@ -393,7 +393,7 @@ namespace Handbrake this.QueryEditorText.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.QueryEditorText.Location = new System.Drawing.Point(16, 88);
this.QueryEditorText.Name = "QueryEditorText";
- this.QueryEditorText.Size = new System.Drawing.Size(605, 93);
+ this.QueryEditorText.Size = new System.Drawing.Size(612, 153);
this.QueryEditorText.TabIndex = 3;
this.QueryEditorText.Text = "";
this.ToolTip.SetToolTip(this.QueryEditorText, "Manually add or edit a query generated by the GUI.");
@@ -403,7 +403,7 @@ namespace Handbrake this.rtf_h264advanced.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.rtf_h264advanced.Location = new System.Drawing.Point(16, 79);
this.rtf_h264advanced.Name = "rtf_h264advanced";
- this.rtf_h264advanced.Size = new System.Drawing.Size(605, 76);
+ this.rtf_h264advanced.Size = new System.Drawing.Size(605, 123);
this.rtf_h264advanced.TabIndex = 2;
this.rtf_h264advanced.Text = "";
this.ToolTip.SetToolTip(this.rtf_h264advanced, "H.264 advanced options can be added here. See link below for details.");
@@ -538,13 +538,14 @@ namespace Handbrake this.drp_subtitle.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.drp_subtitle.FormattingEnabled = true;
this.drp_subtitle.Items.AddRange(new object[] {
- "None"});
+ "None",
+ "Autoselect"});
this.drp_subtitle.Location = new System.Drawing.Point(113, 200);
this.drp_subtitle.Name = "drp_subtitle";
this.drp_subtitle.Size = new System.Drawing.Size(213, 21);
this.drp_subtitle.TabIndex = 12;
this.drp_subtitle.Text = "None";
- this.ToolTip.SetToolTip(this.drp_subtitle, "Select the subtitle language you require from this dropdown.");
+ this.ToolTip.SetToolTip(this.drp_subtitle, resources.GetString("drp_subtitle.ToolTip"));
this.drp_subtitle.SelectedIndexChanged += new System.EventHandler(this.drp_subtitle_SelectedIndexChanged);
//
// btn_setDefault
@@ -1120,7 +1121,7 @@ namespace Handbrake //
this.label23.AutoSize = true;
this.label23.BackColor = System.Drawing.Color.Transparent;
- this.label23.Location = new System.Drawing.Point(13, 186);
+ this.label23.Location = new System.Drawing.Point(13, 246);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(403, 13);
this.label23.TabIndex = 4;
@@ -1154,7 +1155,7 @@ namespace Handbrake this.btn_ClearQuery.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_ClearQuery.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_ClearQuery.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_ClearQuery.Location = new System.Drawing.Point(542, 59);
+ this.btn_ClearQuery.Location = new System.Drawing.Point(549, 59);
this.btn_ClearQuery.Name = "btn_ClearQuery";
this.btn_ClearQuery.Size = new System.Drawing.Size(79, 23);
this.btn_ClearQuery.TabIndex = 6;
@@ -1198,7 +1199,7 @@ namespace Handbrake //
this.Label43.AutoSize = true;
this.Label43.BackColor = System.Drawing.Color.Transparent;
- this.Label43.Location = new System.Drawing.Point(78, 187);
+ this.Label43.Location = new System.Drawing.Point(78, 236);
this.Label43.Name = "Label43";
this.Label43.Size = new System.Drawing.Size(158, 13);
this.Label43.TabIndex = 6;
@@ -1207,7 +1208,7 @@ namespace Handbrake // label_h264
//
this.label_h264.AutoSize = true;
- this.label_h264.Location = new System.Drawing.Point(13, 187);
+ this.label_h264.Location = new System.Drawing.Point(13, 236);
this.label_h264.Name = "label_h264";
this.label_h264.Size = new System.Drawing.Size(66, 13);
this.label_h264.TabIndex = 5;
@@ -1219,7 +1220,7 @@ namespace Handbrake //
this.Label95.AutoSize = true;
this.Label95.BackColor = System.Drawing.Color.Transparent;
- this.Label95.Location = new System.Drawing.Point(13, 168);
+ this.Label95.Location = new System.Drawing.Point(13, 217);
this.Label95.Name = "Label95";
this.Label95.Size = new System.Drawing.Size(387, 13);
this.Label95.TabIndex = 4;
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 99cb7ed08..23bffdba4 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -156,7 +156,7 @@ namespace Handbrake MessageBox.Show(exc.ToString());
}
-
+
}
private void splashTimer(object sender)
@@ -527,12 +527,16 @@ namespace Handbrake // Populate the Subtitles dropdown
drp_subtitle.Items.Clear();
drp_subtitle.Items.Add("None");
+ drp_subtitle.Items.Add("Autoselect");
drp_subtitle.Items.AddRange(selectedTitle.Subtitles.ToArray());
if (drp_subtitle.Items.Count > 0)
{
drp_subtitle.Text = drp_subtitle.Items[0].ToString();
}
}
+
+ // Run the Autonaming function
+ autoName();
}
private void drop_chapterStart_SelectedIndexChanged(object sender, EventArgs e)
@@ -556,7 +560,8 @@ namespace Handbrake drop_chapterStart.BackColor = Color.LightCoral;
}
}
-
+ // Run the Autonaming function
+ autoName();
}
@@ -581,6 +586,9 @@ namespace Handbrake drop_chapterFinish.BackColor = Color.LightCoral;
}
}
+
+ // Run the Autonaming function
+ autoName();
}
private void text_bitrate_TextChanged(object sender, EventArgs e)
@@ -1393,7 +1401,6 @@ namespace Handbrake string cropBottom = text_bottom.Text;
string cropLeft = text_left.Text;
string cropRight = text_right.Text;
- string subtitles = drp_subtitle.Text;
string cropOut = "";
string deInterlace_Option = drp_deInterlace_option.Text;
string deinterlace = "";
@@ -1425,17 +1432,6 @@ namespace Handbrake cropOut = " --crop " + cropTop + ":" + cropBottom + ":" + cropLeft + ":" + cropRight;
}
- if (subtitles == "None")
- subtitles = "";
- else if (subtitles == "")
- subtitles = "";
- else
- {
- string[] tempSub;
- tempSub = subtitles.Split(' ');
- subtitles = " -s " + tempSub[0];
- }
-
switch (deInterlace_Option)
{
case "None":
@@ -1479,7 +1475,7 @@ namespace Handbrake if (check_lAnamorphic.Checked)
lanamorphic = " -P ";
- string queryPictureSettings = cropOut + subtitles + deinterlace + deblock + detelecine + vfr + grayscale + pixelRatio + lanamorphic + ChapterMarkers;
+ string queryPictureSettings = cropOut + deinterlace + deblock + detelecine + vfr + grayscale + pixelRatio + lanamorphic + ChapterMarkers;
#endregion
// Video Settings Tab
@@ -1577,6 +1573,8 @@ namespace Handbrake string audioChannels = "";
string Mixdown = drp_audioMixDown.Text;
string SixChannelAudio = "";
+ string subtitles = drp_subtitle.Text;
+ string subScan = "";
string forced = "";
if (audioBitrate != "")
@@ -1651,10 +1649,26 @@ namespace Handbrake else
SixChannelAudio = "";
+ if (subtitles == "None")
+ subtitles = "";
+ else if (subtitles == "")
+ subtitles = "";
+ else if (subtitles == "Autoselect")
+ {
+ subScan = " -U ";
+ subtitles = "";
+ }
+ else
+ {
+ string[] tempSub;
+ tempSub = subtitles.Split(' ');
+ subtitles = " -s " + tempSub[0];
+ }
+
if (check_forced.Checked)
forced = "-F";
- string queryAudioSettings = audioBitrate + audioSampleRate + audioChannels + SixChannelAudio + forced;
+ string queryAudioSettings = audioBitrate + audioSampleRate + audioChannels + SixChannelAudio + subScan + subtitles + forced;
#endregion
// H264 Tab
@@ -1889,7 +1903,7 @@ namespace Handbrake }
else
{
- Boolean update = (latest > current);
+ Boolean update = (latest > current);
return update;
}
}
@@ -1905,11 +1919,70 @@ namespace Handbrake this.thisDVD = dvd;
}
+ public void autoName()
+ {
+ if (drp_dvdtitle.Text != "Automatic")
+ {
+ string source = text_source.Text;
+ string[] sourceName = source.Split('\\');
+ source = sourceName[sourceName.Length - 1].Replace(".iso", "").Replace(".mpg", "").Replace(".ts", "").Replace(".ps", "");
+
+ string title = drp_dvdtitle.Text;
+ string[] titlesplit = title.Split(' ');
+ title = titlesplit[0];
+
+ string cs = drop_chapterStart.Text;
+ string cf = drop_chapterFinish.Text;
+
+ if (title == "Automatic")
+ title = "";
+ if (cs == "Auto")
+ cs = "";
+ if (cf == "Auto")
+ cf = "";
+
+ string dash = "";
+ if (cf != "Auto")
+ dash = "-";
+
+ if (!text_destination.Text.Contains("\\"))
+ {
+ string filePath = "";
+ if (Properties.Settings.Default.autoNamePath != "")
+ filePath = Properties.Settings.Default.autoNamePath + "\\";
+ text_destination.Text = filePath + source + "_T" + title + "_C" + cs + dash + cf + ".mp4";
+ }
+ else
+ {
+ string dest = text_destination.Text;
+
+ string[] destName = dest.Split('\\');
+
+
+ string[] extension = dest.Split('.');
+ string ext = extension[extension.Length - 1];
+
+ destName[destName.Length - 1] = source + "_T" + title + "_C" + cs + dash + cf + "." + ext;
+
+ string fullDest = "";
+ foreach (string part in destName)
+ {
+ if (fullDest != "")
+ fullDest = fullDest + "\\" + part;
+ else
+ fullDest = fullDest + part;
+ }
+
+ text_destination.Text = fullDest;
+ }
+ }
+ }
+
#endregion
-
+
// This is the END of the road ------------------------------------------------------------------------------
diff --git a/win/C#/frmMain.resx b/win/C#/frmMain.resx index f8feed8cd..16186ca8d 100644 --- a/win/C#/frmMain.resx +++ b/win/C#/frmMain.resx @@ -129,6 +129,14 @@ <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>18, 15</value>
</metadata>
+ <data name="drp_subtitle.ToolTip" xml:space="preserve">
+ <value>Select the subtitle language you require from this dropdown.
+ - or -
+Autoselect: Scan for subtitles in an extra 1st pass, and choose
+the one that's only used 10 percent of the time or less.
+This should locate subtitles for short foreign language segments.
+Best used in conjunction with forced subtitles.</value>
+ </data>
<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>
diff --git a/win/C#/frmOptions.Designer.cs b/win/C#/frmOptions.Designer.cs index c26b4bb9a..2239ec9ce 100644 --- a/win/C#/frmOptions.Designer.cs +++ b/win/C#/frmOptions.Designer.cs @@ -33,7 +33,6 @@ namespace Handbrake this.Label4 = new System.Windows.Forms.Label();
this.check_verbose = new System.Windows.Forms.CheckBox();
this.drp_processors = new System.Windows.Forms.ComboBox();
- this.File_Save = new System.Windows.Forms.SaveFileDialog();
this.Label11 = new System.Windows.Forms.Label();
this.check_guiDebug = new System.Windows.Forms.CheckBox();
this.btn_close = new System.Windows.Forms.Button();
@@ -42,12 +41,14 @@ namespace Handbrake this.tab_options = new System.Windows.Forms.TabControl();
this.tab_general = new System.Windows.Forms.TabPage();
this.check_updatePresets = new System.Windows.Forms.CheckBox();
- this.check_showPreset = new System.Windows.Forms.CheckBox();
this.check_tooltip = new System.Windows.Forms.CheckBox();
this.check_updateCheck = new System.Windows.Forms.CheckBox();
this.check_userDefaultSettings = new System.Windows.Forms.CheckBox();
- this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
+ this.tabPage1 = new System.Windows.Forms.TabPage();
+ this.check_autoNaming = new System.Windows.Forms.CheckBox();
+ this.label9 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
this.tab_debug = new System.Windows.Forms.TabPage();
this.label6 = new System.Windows.Forms.Label();
this.tab_advanced = new System.Windows.Forms.TabPage();
@@ -55,8 +56,13 @@ namespace Handbrake this.label8 = new System.Windows.Forms.Label();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.label7 = new System.Windows.Forms.Label();
+ this.text_an_path = new System.Windows.Forms.TextBox();
+ this.pathFinder = new System.Windows.Forms.FolderBrowserDialog();
+ this.label10 = new System.Windows.Forms.Label();
+ this.btn_browse = new System.Windows.Forms.Button();
this.tab_options.SuspendLayout();
this.tab_general.SuspendLayout();
+ this.tabPage1.SuspendLayout();
this.tab_debug.SuspendLayout();
this.tab_advanced.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
@@ -123,11 +129,6 @@ namespace Handbrake this.drp_processors.TabIndex = 41;
this.drp_processors.SelectedIndexChanged += new System.EventHandler(this.drp_processors_SelectedIndexChanged);
//
- // File_Save
- //
- this.File_Save.DefaultExt = "hb";
- this.File_Save.Filter = "txt|*.txt";
- //
// Label11
//
this.Label11.AutoSize = true;
@@ -157,7 +158,7 @@ namespace Handbrake this.btn_close.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_close.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_close.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_close.Location = new System.Drawing.Point(288, 297);
+ this.btn_close.Location = new System.Drawing.Point(324, 305);
this.btn_close.Name = "btn_close";
this.btn_close.Size = new System.Drawing.Size(107, 22);
this.btn_close.TabIndex = 53;
@@ -178,7 +179,7 @@ namespace Handbrake "Lock System",
"Log Off",
"Quit HandBrake"});
- this.drp_completeOption.Location = new System.Drawing.Point(192, 170);
+ this.drp_completeOption.Location = new System.Drawing.Point(193, 39);
this.drp_completeOption.Name = "drp_completeOption";
this.drp_completeOption.Size = new System.Drawing.Size(111, 21);
this.drp_completeOption.TabIndex = 43;
@@ -188,7 +189,7 @@ namespace Handbrake //
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label5.Location = new System.Drawing.Point(13, 173);
+ this.label5.Location = new System.Drawing.Point(14, 42);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(173, 13);
this.label5.TabIndex = 42;
@@ -197,38 +198,36 @@ namespace Handbrake // tab_options
//
this.tab_options.Controls.Add(this.tab_general);
+ this.tab_options.Controls.Add(this.tabPage1);
this.tab_options.Controls.Add(this.tab_debug);
this.tab_options.Controls.Add(this.tab_advanced);
this.tab_options.Location = new System.Drawing.Point(12, 63);
this.tab_options.Name = "tab_options";
this.tab_options.SelectedIndex = 0;
- this.tab_options.Size = new System.Drawing.Size(382, 228);
+ this.tab_options.Size = new System.Drawing.Size(419, 236);
this.tab_options.TabIndex = 58;
//
// tab_general
//
this.tab_general.BackColor = System.Drawing.SystemColors.ControlLight;
this.tab_general.Controls.Add(this.check_updatePresets);
- this.tab_general.Controls.Add(this.drp_completeOption);
- this.tab_general.Controls.Add(this.label5);
- this.tab_general.Controls.Add(this.check_showPreset);
this.tab_general.Controls.Add(this.check_tooltip);
this.tab_general.Controls.Add(this.check_updateCheck);
this.tab_general.Controls.Add(this.check_userDefaultSettings);
- this.tab_general.Controls.Add(this.label2);
this.tab_general.Controls.Add(this.label1);
this.tab_general.Location = new System.Drawing.Point(4, 22);
this.tab_general.Name = "tab_general";
this.tab_general.Padding = new System.Windows.Forms.Padding(3);
- this.tab_general.Size = new System.Drawing.Size(374, 202);
+ this.tab_general.Size = new System.Drawing.Size(411, 172);
this.tab_general.TabIndex = 0;
- this.tab_general.Text = "General";
+ this.tab_general.Text = "Startup";
+ this.tab_general.UseVisualStyleBackColor = true;
//
// check_updatePresets
//
this.check_updatePresets.AutoSize = true;
this.check_updatePresets.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.check_updatePresets.Location = new System.Drawing.Point(16, 125);
+ this.check_updatePresets.Location = new System.Drawing.Point(16, 102);
this.check_updatePresets.Name = "check_updatePresets";
this.check_updatePresets.Size = new System.Drawing.Size(112, 17);
this.check_updatePresets.TabIndex = 59;
@@ -236,23 +235,11 @@ namespace Handbrake this.check_updatePresets.UseVisualStyleBackColor = true;
this.check_updatePresets.CheckedChanged += new System.EventHandler(this.check_updatePresets_CheckedChanged);
//
- // check_showPreset
- //
- this.check_showPreset.AutoSize = true;
- this.check_showPreset.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.check_showPreset.Location = new System.Drawing.Point(16, 56);
- this.check_showPreset.Name = "check_showPreset";
- this.check_showPreset.Size = new System.Drawing.Size(136, 17);
- this.check_showPreset.TabIndex = 58;
- this.check_showPreset.Text = "Hide the preset bar";
- this.check_showPreset.UseVisualStyleBackColor = true;
- this.check_showPreset.CheckedChanged += new System.EventHandler(this.check_showPreset_CheckedChanged);
- //
// check_tooltip
//
this.check_tooltip.AutoSize = true;
this.check_tooltip.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.check_tooltip.Location = new System.Drawing.Point(16, 79);
+ this.check_tooltip.Location = new System.Drawing.Point(16, 56);
this.check_tooltip.Name = "check_tooltip";
this.check_tooltip.Size = new System.Drawing.Size(135, 17);
this.check_tooltip.TabIndex = 57;
@@ -276,7 +263,7 @@ namespace Handbrake //
this.check_userDefaultSettings.AutoSize = true;
this.check_userDefaultSettings.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.check_userDefaultSettings.Location = new System.Drawing.Point(16, 102);
+ this.check_userDefaultSettings.Location = new System.Drawing.Point(16, 79);
this.check_userDefaultSettings.Name = "check_userDefaultSettings";
this.check_userDefaultSettings.Size = new System.Drawing.Size(166, 17);
this.check_userDefaultSettings.TabIndex = 56;
@@ -284,16 +271,6 @@ namespace Handbrake this.check_userDefaultSettings.UseVisualStyleBackColor = true;
this.check_userDefaultSettings.CheckedChanged += new System.EventHandler(this.check_userDefaultSettings_CheckedChanged);
//
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label2.Location = new System.Drawing.Point(13, 156);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(80, 13);
- this.label2.TabIndex = 54;
- this.label2.Text = "When Done";
- //
// label1
//
this.label1.AutoSize = true;
@@ -304,6 +281,55 @@ namespace Handbrake this.label1.TabIndex = 0;
this.label1.Text = "On Startup";
//
+ // tabPage1
+ //
+ this.tabPage1.Controls.Add(this.btn_browse);
+ this.tabPage1.Controls.Add(this.label10);
+ this.tabPage1.Controls.Add(this.text_an_path);
+ this.tabPage1.Controls.Add(this.check_autoNaming);
+ this.tabPage1.Controls.Add(this.label9);
+ this.tabPage1.Controls.Add(this.label2);
+ this.tabPage1.Controls.Add(this.drp_completeOption);
+ this.tabPage1.Controls.Add(this.label5);
+ this.tabPage1.Location = new System.Drawing.Point(4, 22);
+ this.tabPage1.Name = "tabPage1";
+ this.tabPage1.Size = new System.Drawing.Size(411, 210);
+ this.tabPage1.TabIndex = 3;
+ this.tabPage1.Text = "General";
+ this.tabPage1.UseVisualStyleBackColor = true;
+ //
+ // check_autoNaming
+ //
+ this.check_autoNaming.AutoSize = true;
+ this.check_autoNaming.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.check_autoNaming.Location = new System.Drawing.Point(17, 103);
+ this.check_autoNaming.Name = "check_autoNaming";
+ this.check_autoNaming.Size = new System.Drawing.Size(340, 17);
+ this.check_autoNaming.TabIndex = 56;
+ this.check_autoNaming.Text = "Use Auto Naming (uses source name and title number)";
+ this.check_autoNaming.UseVisualStyleBackColor = true;
+ this.check_autoNaming.CheckedChanged += new System.EventHandler(this.check_autoNaming_CheckedChanged);
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label9.Location = new System.Drawing.Point(14, 78);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(90, 13);
+ this.label9.TabIndex = 55;
+ this.label9.Text = "Auto Naming";
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label2.Location = new System.Drawing.Point(14, 19);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(80, 13);
+ this.label2.TabIndex = 54;
+ this.label2.Text = "When Done";
+ //
// tab_debug
//
this.tab_debug.BackColor = System.Drawing.SystemColors.ControlLight;
@@ -312,9 +338,10 @@ namespace Handbrake this.tab_debug.Controls.Add(this.label6);
this.tab_debug.Location = new System.Drawing.Point(4, 22);
this.tab_debug.Name = "tab_debug";
- this.tab_debug.Size = new System.Drawing.Size(374, 202);
+ this.tab_debug.Size = new System.Drawing.Size(411, 210);
this.tab_debug.TabIndex = 2;
this.tab_debug.Text = "Debug Options";
+ this.tab_debug.UseVisualStyleBackColor = true;
//
// label6
//
@@ -337,9 +364,10 @@ namespace Handbrake this.tab_advanced.Location = new System.Drawing.Point(4, 22);
this.tab_advanced.Name = "tab_advanced";
this.tab_advanced.Padding = new System.Windows.Forms.Padding(3);
- this.tab_advanced.Size = new System.Drawing.Size(374, 202);
+ this.tab_advanced.Size = new System.Drawing.Size(411, 210);
this.tab_advanced.TabIndex = 1;
this.tab_advanced.Text = "Advanced";
+ this.tab_advanced.UseVisualStyleBackColor = true;
//
// label3
//
@@ -379,10 +407,44 @@ namespace Handbrake this.label7.TabIndex = 59;
this.label7.Text = "Modify program options.";
//
+ // text_an_path
+ //
+ this.text_an_path.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.text_an_path.Location = new System.Drawing.Point(17, 147);
+ this.text_an_path.Name = "text_an_path";
+ this.text_an_path.Size = new System.Drawing.Size(303, 21);
+ this.text_an_path.TabIndex = 60;
+ this.text_an_path.TextChanged += new System.EventHandler(this.text_an_path_TextChanged);
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label10.Location = new System.Drawing.Point(14, 131);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(145, 13);
+ this.label10.TabIndex = 61;
+ this.label10.Text = "Default AutoName Path:";
+ //
+ // btn_browse
+ //
+ this.btn_browse.BackColor = System.Drawing.SystemColors.ControlLight;
+ this.btn_browse.FlatAppearance.BorderColor = System.Drawing.Color.Black;
+ this.btn_browse.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btn_browse.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btn_browse.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
+ this.btn_browse.Location = new System.Drawing.Point(326, 146);
+ this.btn_browse.Name = "btn_browse";
+ this.btn_browse.Size = new System.Drawing.Size(68, 22);
+ this.btn_browse.TabIndex = 62;
+ this.btn_browse.Text = "Browse";
+ this.btn_browse.UseVisualStyleBackColor = false;
+ this.btn_browse.Click += new System.EventHandler(this.btn_browse_Click);
+ //
// frmOptions
//
this.BackColor = System.Drawing.SystemColors.ControlLight;
- this.ClientSize = new System.Drawing.Size(407, 328);
+ this.ClientSize = new System.Drawing.Size(443, 339);
this.Controls.Add(this.label7);
this.Controls.Add(this.label8);
this.Controls.Add(this.pictureBox2);
@@ -399,6 +461,8 @@ namespace Handbrake this.tab_options.ResumeLayout(false);
this.tab_general.ResumeLayout(false);
this.tab_general.PerformLayout();
+ this.tabPage1.ResumeLayout(false);
+ this.tabPage1.PerformLayout();
this.tab_debug.ResumeLayout(false);
this.tab_debug.PerformLayout();
this.tab_advanced.ResumeLayout(false);
@@ -415,7 +479,6 @@ namespace Handbrake internal System.Windows.Forms.Label Label4;
internal System.Windows.Forms.CheckBox check_verbose;
internal System.Windows.Forms.ComboBox drp_processors;
- internal System.Windows.Forms.SaveFileDialog File_Save;
internal System.Windows.Forms.Label Label11;
internal System.Windows.Forms.Button btn_close;
internal System.Windows.Forms.CheckBox check_guiDebug;
@@ -426,7 +489,6 @@ namespace Handbrake private System.Windows.Forms.TabPage tab_advanced;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
- internal System.Windows.Forms.CheckBox check_showPreset;
internal System.Windows.Forms.CheckBox check_tooltip;
internal System.Windows.Forms.CheckBox check_updateCheck;
internal System.Windows.Forms.CheckBox check_userDefaultSettings;
@@ -437,5 +499,12 @@ namespace Handbrake private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.Label label7;
internal System.Windows.Forms.CheckBox check_updatePresets;
+ private System.Windows.Forms.TabPage tabPage1;
+ private System.Windows.Forms.Label label9;
+ internal System.Windows.Forms.CheckBox check_autoNaming;
+ private System.Windows.Forms.TextBox text_an_path;
+ internal System.Windows.Forms.Button btn_browse;
+ internal System.Windows.Forms.Label label10;
+ private System.Windows.Forms.FolderBrowserDialog pathFinder;
}
}
\ No newline at end of file diff --git a/win/C#/frmOptions.cs b/win/C#/frmOptions.cs index 75796ddd2..7d12e1d97 100644 --- a/win/C#/frmOptions.cs +++ b/win/C#/frmOptions.cs @@ -44,17 +44,23 @@ namespace Handbrake check_tooltip.CheckState = CheckState.Checked;
}
- if (Properties.Settings.Default.hidePresets == "Checked")
+ if (Properties.Settings.Default.updatePresets == "Checked")
{
- check_showPreset.CheckState = CheckState.Checked;
+ check_updatePresets.CheckState = CheckState.Checked;
}
- if (Properties.Settings.Default.updatePresets == "Checked")
+ if (Properties.Settings.Default.autoNaming == "Checked")
{
- check_updatePresets.CheckState = CheckState.Checked;
+ check_autoNaming.CheckState = CheckState.Checked;
}
+
+ if (Properties.Settings.Default.autoNamePath != "")
+ text_an_path.Text = Properties.Settings.Default.autoNamePath;
+ else
+ text_an_path.Text = "Click 'Browse' to set the default location";
}
+ #region Options
private void check_updateCheck_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.updateStatus = check_updateCheck.CheckState.ToString();
@@ -101,16 +107,36 @@ namespace Handbrake Properties.Settings.Default.CompletionOption = drp_completeOption.Text;
}
- private void check_showPreset_CheckedChanged(object sender, EventArgs e)
+ private void check_updatePresets_CheckedChanged(object sender, EventArgs e)
{
- Properties.Settings.Default.hidePresets = check_showPreset.CheckState.ToString();
+ Properties.Settings.Default.updatePresets = check_updatePresets.CheckState.ToString();
}
- private void check_updatePresets_CheckedChanged(object sender, EventArgs e)
+ private void check_autoNaming_CheckedChanged(object sender, EventArgs e)
{
- Properties.Settings.Default.updatePresets = check_updatePresets.CheckState.ToString();
+ Properties.Settings.Default.autoNaming = check_autoNaming.CheckState.ToString();
}
+ private void btn_browse_Click(object sender, EventArgs e)
+ {
+ pathFinder.ShowDialog();
+ text_an_path.Text = pathFinder.SelectedPath;
+ }
+
+ private void text_an_path_TextChanged(object sender, EventArgs e)
+ {
+ if (text_an_path.Text == "")
+ Properties.Settings.Default.autoNamePath = null;
+ else
+ Properties.Settings.Default.autoNamePath = text_an_path.Text;
+ }
+ #endregion
+
+
+
+
+
+
}
}
\ No newline at end of file diff --git a/win/C#/frmOptions.resx b/win/C#/frmOptions.resx index 771d71723..49352476c 100644 --- a/win/C#/frmOptions.resx +++ b/win/C#/frmOptions.resx @@ -117,7 +117,7 @@ <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <metadata name="File_Save.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=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|