OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 7 Dec 2007 22:03:24 +0000 (22:03 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 7 Dec 2007 22:03:24 +0000 (22:03 +0000)
- Implemented Auto File naming option. Can be enabled from Tools > Options
- Implemented Auto Select Subtitle feature for Forced Subtitles.

git-svn-id: svn://localhost/HandBrake/trunk@1107 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Functions/QueryParser.cs
win/C#/Properties/Settings.Designer.cs
win/C#/Properties/Settings.settings
win/C#/app.config
win/C#/frmMain.Designer.cs
win/C#/frmMain.cs
win/C#/frmMain.resx
win/C#/frmOptions.Designer.cs
win/C#/frmOptions.cs
win/C#/frmOptions.resx

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