From: sr55 Date: Tue, 18 Mar 2008 16:35:28 +0000 (+0000) Subject: WinGui: X-Git-Url: http://git.osdn.jp/view?a=commitdiff_plain;h=4308cfc24f31233e2d5e61c8d3693491eb36f6d4;p=handbrake-jp%2Fhandbrake-jp-git.git WinGui: - Few bug fixes in the preset system - File > open is now Import preset. Loads in old presets into the preset bar. git-svn-id: svn://localhost/HandBrake/trunk@1345 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/win/C#/Functions/Common.cs b/win/C#/Functions/Common.cs index 8d70523c..7100eb58 100644 --- a/win/C#/Functions/Common.cs +++ b/win/C#/Functions/Common.cs @@ -143,7 +143,7 @@ namespace Handbrake.Functions if (presetQuery.DVDChapterFinish != 0) mainWindow.drop_chapterFinish.Text = presetQuery.DVDChapterFinish.ToString(); - if (presetQuery.Format != "") + if (presetQuery.Format != null) { string destination = mainWindow.text_destination.Text; destination = destination.Replace(".mp4", "." + presetQuery.Format); @@ -345,8 +345,10 @@ namespace Handbrake.Functions int totalChapters = mainWindow.drop_chapterFinish.Items.Count - 1; string dvdChapter = ""; - if ((source != "") || (source != "Click 'Browse' to continue")) + if ((source != "") && (source.Trim() != "Click 'Browse' to continue")) source = " -i " + '"' + source + '"'; + else + source = ""; if (dvdTitle == "Automatic") dvdTitle = ""; @@ -738,7 +740,7 @@ namespace Handbrake.Functions if (mainWindow.Check_ChapterMarkers.Checked) { - if (source_name.Trim().Replace("-i ", "") != "Click \'Browse\' to continue") + if ((source_name.Trim().Replace("-i ", "") != "Click 'Browse' to continue") && (source_name.Trim().Replace("-i ", "") != "")) { if (source_title != "Automatic") { diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index 331271fe..f722d180 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -760,8 +760,8 @@ namespace Handbrake this.mnu_open.ImageTransparentColor = System.Drawing.Color.Magenta; this.mnu_open.Name = "mnu_open"; this.mnu_open.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); - this.mnu_open.Size = new System.Drawing.Size(201, 22); - this.mnu_open.Text = "&Open Preset"; + this.mnu_open.Size = new System.Drawing.Size(210, 22); + this.mnu_open.Text = "&Import Preset"; this.mnu_open.Click += new System.EventHandler(this.mnu_open_Click); // // mnu_save @@ -770,19 +770,20 @@ namespace Handbrake this.mnu_save.ImageTransparentColor = System.Drawing.Color.Magenta; this.mnu_save.Name = "mnu_save"; this.mnu_save.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); - this.mnu_save.Size = new System.Drawing.Size(201, 22); + this.mnu_save.Size = new System.Drawing.Size(210, 22); this.mnu_save.Text = "&Save Preset"; + this.mnu_save.Visible = false; this.mnu_save.Click += new System.EventHandler(this.mnu_save_Click); // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(198, 6); + this.toolStripSeparator2.Size = new System.Drawing.Size(207, 6); // // mnu_exit // this.mnu_exit.Name = "mnu_exit"; - this.mnu_exit.Size = new System.Drawing.Size(201, 22); + this.mnu_exit.Size = new System.Drawing.Size(210, 22); this.mnu_exit.Text = "E&xit"; this.mnu_exit.Click += new System.EventHandler(this.mnu_exit_Click); // diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index b8313727..a9ddbbd0 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -195,6 +195,10 @@ namespace Handbrake // Close the stream line.Close(); + + Form preset = new frmAddPreset(this); + preset.ShowDialog(); + } catch (Exception exc) {