From 2c25917be527ffdb512a753a57681580fd3d72d8 Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 19 Sep 2008 16:50:52 +0000 Subject: [PATCH] WinGui: - 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 | 35 ++++++++++------------------------- win/C#/frmMain.Designer.cs | 7 +++---- 2 files changed, 13 insertions(+), 29 deletions(-) diff --git a/win/C#/Functions/Common.cs b/win/C#/Functions/Common.cs index 41f6e71f..b55c8e56 100644 --- a/win/C#/Functions/Common.cs +++ b/win/C#/Functions/Common.cs @@ -860,7 +860,7 @@ namespace Handbrake.Functions // This is for the queue. It allows different chapter name files for each title. string source_name = mainWindow.text_source.Text; string[] sourceName = source.Split('\\'); - source_name = sourceName[sourceName.Length - 1].Replace(".iso", "").Replace(".mpg", "").Replace(".ts", "").Replace(".ps", ""); + source_name = sourceName[sourceName.Length - 1]; source_name = source_name.Replace("\"", ""); string source_title = mainWindow.drp_dvdtitle.Text; @@ -869,36 +869,21 @@ namespace Handbrake.Functions if (mainWindow.Check_ChapterMarkers.Checked) { - if ((source_name.Trim().Replace("-i ", "") != "Click 'Browse' to continue") && (source_name.Trim().Replace("-i ", "") != "")) + if ((source_name.Trim() != "Click 'Source' to continue") && (source_name.Trim() != "")) { + string path = ""; if (source_title != "Automatic") - { - string filename = source_name + "-" + source_title + "-chapters.csv"; - string path = Path.Combine(Path.GetTempPath(), filename); - - Boolean saveCSV = chapterCSVSave(mainWindow, path); - if (saveCSV == false) - query += " -m "; - else - query += " --markers=" + "\"" + path + "\""; - } + path = Path.Combine(Path.GetTempPath(), source_name + "-" + source_title + "-chapters.csv"); else - { - string filename = source_name + "-chapters.csv"; - string path = Path.Combine(Path.GetTempPath(), filename); + path = Path.Combine(Path.GetTempPath(), source_name + "-chapters.csv"); - Boolean saveCSV = chapterCSVSave(mainWindow, path); - if (saveCSV == false) - query += " -m "; - else - query += " --markers=" + "\"" + path + "\""; - } + if (chapterCSVSave(mainWindow, path) == false) + query += " -m "; + else + query += " --markers=" + "\"" + path + "\""; } else - { - string path = Path.Combine(Path.GetTempPath(), "chapters.csv"); - query += " --markers=" + "\"" + path + "\""; - } + query += " -m"; } #endregion diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index 389e7156..5aa47962 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -1016,8 +1016,7 @@ namespace Handbrake // ISO_Open // this.ISO_Open.DefaultExt = "ISO"; - this.ISO_Open.Filter = "All Supported Files|*.iso;*.mpg;*.m2t;*.m2ts;*.vob;*.ts;*.mpeg;*.mpeg;*.avi;*.mp4;*.mkv;" + - ""; + this.ISO_Open.Filter = "All Files|*.*"; this.ISO_Open.RestoreDirectory = true; this.ISO_Open.SupportMultiDottedExtensions = true; // @@ -3311,8 +3310,6 @@ namespace Handbrake private System.Windows.Forms.ToolStripSeparator toolStripSeparator6; private System.Windows.Forms.SaveFileDialog DVD_Save; private System.Windows.Forms.OpenFileDialog File_Open; - private System.Windows.Forms.OpenFileDialog ISO_Open; - private System.Windows.Forms.FolderBrowserDialog DVD_Open; private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; private System.Windows.Forms.ToolStripMenuItem mnu_open; private System.Windows.Forms.ToolStripSeparator toolStripSeparator7; @@ -3458,6 +3455,8 @@ namespace Handbrake internal System.Windows.Forms.TrackBar slider_deblock; internal System.Windows.Forms.ComboBox drp_deNoise; internal System.Windows.Forms.Label label8; + internal System.Windows.Forms.OpenFileDialog ISO_Open; + internal System.Windows.Forms.FolderBrowserDialog DVD_Open; } } \ No newline at end of file -- 2.11.0