OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 19 Sep 2008 16:50:52 +0000 (16:50 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 19 Sep 2008 16:50:52 +0000 (16:50 +0000)
- Just allow ISO_Open to open all files. Will save adding all the ffmpeg options available.
- Re-factored the chapter marker creation/query generation code.

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

win/C#/Functions/Common.cs
win/C#/frmMain.Designer.cs

index 41f6e71..b55c8e5 100644 (file)
@@ -860,7 +860,7 @@ namespace Handbrake.Functions
             // This is for the queue. It allows different chapter name files for each title.\r
             string source_name = mainWindow.text_source.Text;\r
             string[] sourceName = source.Split('\\');\r
-            source_name = sourceName[sourceName.Length - 1].Replace(".iso", "").Replace(".mpg", "").Replace(".ts", "").Replace(".ps", "");\r
+            source_name = sourceName[sourceName.Length - 1];\r
             source_name = source_name.Replace("\"", "");\r
 \r
             string source_title = mainWindow.drp_dvdtitle.Text;\r
@@ -869,36 +869,21 @@ namespace Handbrake.Functions
 \r
             if (mainWindow.Check_ChapterMarkers.Checked)\r
             {\r
-                if ((source_name.Trim().Replace("-i ", "") != "Click 'Browse' to continue") && (source_name.Trim().Replace("-i ", "") != ""))\r
+                if ((source_name.Trim() != "Click 'Source' to continue") && (source_name.Trim() != ""))\r
                 {\r
+                    string path = "";\r
                     if (source_title != "Automatic")\r
-                    {\r
-                        string filename = source_name + "-" + source_title + "-chapters.csv";\r
-                        string path = Path.Combine(Path.GetTempPath(), filename);\r
-\r
-                        Boolean saveCSV = chapterCSVSave(mainWindow, path);\r
-                        if (saveCSV == false)\r
-                            query += " -m ";\r
-                        else\r
-                            query += " --markers=" + "\"" + path + "\"";\r
-                    }\r
+                        path = Path.Combine(Path.GetTempPath(), source_name + "-" + source_title + "-chapters.csv");\r
                     else\r
-                    {\r
-                        string filename = source_name + "-chapters.csv";\r
-                        string path = Path.Combine(Path.GetTempPath(), filename);\r
+                        path = Path.Combine(Path.GetTempPath(), source_name + "-chapters.csv");\r
 \r
-                        Boolean saveCSV = chapterCSVSave(mainWindow, path);\r
-                        if (saveCSV == false)\r
-                            query += " -m ";\r
-                        else\r
-                            query += " --markers=" + "\"" + path + "\"";\r
-                    }\r
+                    if (chapterCSVSave(mainWindow, path) == false)\r
+                        query += " -m ";\r
+                    else\r
+                        query += " --markers=" + "\"" + path + "\"";\r
                 }\r
                 else\r
-                {\r
-                    string path = Path.Combine(Path.GetTempPath(), "chapters.csv");\r
-                    query += " --markers=" + "\"" + path + "\"";\r
-                }\r
+                    query += " -m";\r
             }\r
             #endregion\r
 \r
index 389e715..5aa4796 100644 (file)
@@ -1016,8 +1016,7 @@ namespace Handbrake
             // ISO_Open\r
             // \r
             this.ISO_Open.DefaultExt = "ISO";\r
-            this.ISO_Open.Filter = "All Supported Files|*.iso;*.mpg;*.m2t;*.m2ts;*.vob;*.ts;*.mpeg;*.mpeg;*.avi;*.mp4;*.mkv;" +\r
-                "";\r
+            this.ISO_Open.Filter = "All Files|*.*";\r
             this.ISO_Open.RestoreDirectory = true;\r
             this.ISO_Open.SupportMultiDottedExtensions = true;\r
             // \r
@@ -3311,8 +3310,6 @@ namespace Handbrake
         private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;\r
         private System.Windows.Forms.SaveFileDialog DVD_Save;\r
         private System.Windows.Forms.OpenFileDialog File_Open;\r
-        private System.Windows.Forms.OpenFileDialog ISO_Open;\r
-        private System.Windows.Forms.FolderBrowserDialog DVD_Open;\r
         private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;\r
         private System.Windows.Forms.ToolStripMenuItem mnu_open;\r
         private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;\r
@@ -3458,6 +3455,8 @@ namespace Handbrake
         internal System.Windows.Forms.TrackBar slider_deblock;\r
         internal System.Windows.Forms.ComboBox drp_deNoise;\r
         internal System.Windows.Forms.Label label8;\r
+        internal System.Windows.Forms.OpenFileDialog ISO_Open;\r
+        internal System.Windows.Forms.FolderBrowserDialog DVD_Open;\r
 \r
     }\r
 }
\ No newline at end of file