From 20ff4c1c7f0e888400aecef0c6cf7355abba8ae4 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 30 Aug 2009 16:15:01 +0000 Subject: WinGui: - Set use m4v option enabled by default. - Fix some issues with auto setting m4v when use m4v is disabled. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2795 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/Functions/PresetLoader.cs | 14 ++++++++++++-- win/C#/Functions/QueryGenerator.cs | 6 +++--- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'win/C#/Functions') diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs index fae48ee46..f0ac81c3c 100644 --- a/win/C#/Functions/PresetLoader.cs +++ b/win/C#/Functions/PresetLoader.cs @@ -47,9 +47,19 @@ namespace Handbrake.Functions if (presetQuery.Format != null) { if (presetQuery.Format == "mp4" || presetQuery.Format == "m4v") - mainWindow.drop_format.SelectedIndex = 0; + { + if (mainWindow.drop_format.SelectedIndex == 0) + mainWindow.SetExtension(".mp4"); + else + mainWindow.drop_format.SelectedIndex = 0; + } else if (presetQuery.Format == "mkv") - mainWindow.drop_format.SelectedIndex = 1; + { + if(mainWindow.drop_format.SelectedIndex == 1) + mainWindow.SetExtension(".mkv"); + else + mainWindow.drop_format.SelectedIndex = 1; + } } mainWindow.check_iPodAtom.CheckState = presetQuery.IpodAtom ? CheckState.Checked : CheckState.Unchecked; diff --git a/win/C#/Functions/QueryGenerator.cs b/win/C#/Functions/QueryGenerator.cs index 4d0033415..15dfc0f70 100644 --- a/win/C#/Functions/QueryGenerator.cs +++ b/win/C#/Functions/QueryGenerator.cs @@ -21,7 +21,7 @@ namespace Handbrake.Functions /// /// /// - public string generateCLIQuery(frmMain mainWindow, int duration, string preview) + public string GenerateCLIQuery(frmMain mainWindow, int duration, string preview) { string query = ""; @@ -61,7 +61,7 @@ namespace Handbrake.Functions query += " -o " + '"' + mainWindow.text_destination.Text + '"'; } - query += generateTabbedComponentsQuery(mainWindow); + query += GenerateTabbedComponentsQuery(mainWindow); return query; } @@ -71,7 +71,7 @@ namespace Handbrake.Functions /// /// /// - public static string generateTabbedComponentsQuery(frmMain mainWindow) + public static string GenerateTabbedComponentsQuery(frmMain mainWindow) { string query = ""; -- cgit v1.2.3