From eff32e1a98421f42caab1a5bc418efb08b9aa3b5 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 27 Jul 2013 19:48:12 +0000 Subject: WinGui: - When switching between the video tab and advanced panel, set the advanced tab's advanced query string from the x264 preset. - Add a copy full query context menu to the "extra options" text box. - Auto set the Picture settings mode on the Add Preset window. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5673 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs') diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index 74c7a1f15..f273f3209 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -14,6 +14,7 @@ namespace HandBrakeWPF.ViewModels using System.ComponentModel; using System.Globalization; using System.Linq; + using System.Windows; using Caliburn.Micro; @@ -27,7 +28,6 @@ namespace HandBrakeWPF.ViewModels using HandBrake.Interop.Model.Encoding.x264; using HandBrakeWPF.Commands.Interfaces; - using HandBrakeWPF.Model; using HandBrakeWPF.Properties; using HandBrakeWPF.ViewModels.Interfaces; @@ -173,6 +173,12 @@ namespace HandBrakeWPF.ViewModels { if (!object.Equals(value, this.useAdvancedTab)) { + // Set the Advanced Tab up with the current settings, if we can. + if (value && !this.userSettingService.GetUserSetting(UserSettingConstants.DisableLibHbFeatures)) + { + this.Task.AdvancedEncoderOptions = this.GetActualx264Query(); + } + this.useAdvancedTab = value; this.Task.ShowAdvancedTab = value; this.NotifyOfPropertyChange(() => this.UseAdvancedTab); @@ -873,6 +879,14 @@ namespace HandBrakeWPF.ViewModels this.canClear = true; } + /// + /// The copy query. + /// + public void CopyQuery() + { + Clipboard.SetDataObject(this.SelectedVideoEncoder == VideoEncoder.X264 ? this.GetActualx264Query() : this.ExtraArguments); + } + #endregion /// -- cgit v1.2.3