From b8238f76de25707da2d9e480d265c94d3d7d1ada Mon Sep 17 00:00:00 2001 From: sr55 Date: Thu, 27 Nov 2014 20:32:56 +0000 Subject: WinGui: Remove the option to enable the static preview window. Window is now always available. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6560 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../HandBrakeInterop/HandBrakeInstance.cs | 28 +++++++++++----------- win/CS/HandBrakeWPF/HandBrakeWPF.csproj | 2 +- win/CS/HandBrakeWPF/UserSettingConstants.cs | 5 ---- win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | 26 +------------------- .../ViewModels/PictureSettingsViewModel.cs | 11 --------- win/CS/HandBrakeWPF/Views/OptionsView.xaml | 3 +-- win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml | 3 +-- 7 files changed, 18 insertions(+), 60 deletions(-) (limited to 'win/CS') diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs index 6c4e26ede..1bc9445f3 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs @@ -829,13 +829,13 @@ namespace HandBrake.Interop IntPtr titleSetPtr = HBFunctions.hb_get_title_set(this.hbHandle); hb_title_set_s titleSet = InteropUtilities.ToStructureFromPtr(titleSetPtr); this.originalTitles = titleSet.list_title.ToListFromHandBrakeList(); - - foreach (hb_title_s title in this.originalTitles) - { - this.titles.Add(this.ConvertTitle(title)); - } - - if (this.originalTitles.Count > 0) + + foreach (hb_title_s title in this.originalTitles) + { + this.titles.Add(this.ConvertTitle(title)); + } + + if (this.originalTitles.Count > 0) { this.featureTitle = titleSet.feature; } @@ -1874,13 +1874,13 @@ namespace HandBrake.Interop AspectRatio = title.aspect, AngleCount = title.angle_count, VideoCodecName = title.video_codec_name, - Framerate = ((double)title.rate) / title.rate_base, - FramerateNumerator = title.rate, - FramerateDenominator = title.rate_base, - Path = Encoding.UTF8.GetString(title.path).TrimEnd('\0') - }; - - switch (title.type) + Framerate = ((double)title.rate) / title.rate_base, + FramerateNumerator = title.rate, + FramerateDenominator = title.rate_base, + Path = Encoding.UTF8.GetString(title.path).TrimEnd('\0') + }; + + switch (title.type) { case hb_title_type_anon.HB_STREAM_TYPE: newTitle.InputType = InputType.Stream; diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index 3eb9c9faa..4fd168aee 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -74,7 +74,7 @@ true - bin\x86\Debug31\ + bin\x86\Debug\ DEBUG;TRACE full x86 diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs index 77f45379f..80bebe4b3 100644 --- a/win/CS/HandBrakeWPF/UserSettingConstants.cs +++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs @@ -256,11 +256,6 @@ namespace HandBrakeWPF /// public const string ClearCompletedFromQueue = "ClearCompletedFromQueue"; - /// - /// The enable static preview. - /// - public const string EnableStaticPreview = "EnableStaticPreview"; - #endregion } } \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index 85e74ed20..bb303aef5 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -280,11 +280,6 @@ namespace HandBrakeWPF.ViewModels /// private bool showAdvancedTab; - /// - /// The enable static preview. - /// - private bool enableStaticPreview; - /// /// The remove punctuation. /// @@ -1134,22 +1129,6 @@ namespace HandBrakeWPF.ViewModels } } - /// - /// Gets or sets a value indicating whether enable static preview. - /// - public bool EnableStaticPreview - { - get - { - return this.enableStaticPreview; - } - set - { - this.enableStaticPreview = value; - this.NotifyOfPropertyChange(() => this.EnableStaticPreview); - } - } - #endregion #region Video @@ -1591,9 +1570,7 @@ namespace HandBrakeWPF.ViewModels this.MinLength = this.userSettingService.GetUserSetting(UserSettingConstants.MinScanDuration); // Use dvdnav - this.DisableLibdvdNav = userSettingService.GetUserSetting(UserSettingConstants.DisableLibDvdNav); - - this.EnableStaticPreview = userSettingService.GetUserSetting(UserSettingConstants.EnableStaticPreview); + this.DisableLibdvdNav = userSettingService.GetUserSetting(UserSettingConstants.DisableLibDvdNav); int port; int.TryParse(userSettingService.GetUserSetting(UserSettingConstants.ServerPort), out port); @@ -1652,7 +1629,6 @@ namespace HandBrakeWPF.ViewModels userSettingService.SetUserSetting(UserSettingConstants.PreviewScanCount, this.SelectedPreviewCount); userSettingService.SetUserSetting(UserSettingConstants.X264Step, double.Parse(this.SelectedGranulairty, CultureInfo.InvariantCulture)); userSettingService.SetUserSetting(UserSettingConstants.ShowAdvancedTab, this.ShowAdvancedTab); - userSettingService.SetUserSetting(UserSettingConstants.EnableStaticPreview, this.EnableStaticPreview); int value; if (int.TryParse(this.MinLength.ToString(CultureInfo.InvariantCulture), out value)) diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs index cc6421d28..d1ca9e65a 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs @@ -324,17 +324,6 @@ namespace HandBrakeWPF.ViewModels } } - /// - /// Gets a value indicating whether is picture preview enabled. - /// - public bool IsPicturePreviewEnabled - { - get - { - return this.UserSettingService.GetUserSetting(UserSettingConstants.EnableStaticPreview); - } - } - #endregion #region Task Properties diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index f891da8ee..20bea31e6 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -331,8 +331,7 @@ - - + diff --git a/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml index 65d6dc1af..23f9885c7 100644 --- a/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml +++ b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml @@ -153,8 +153,7 @@ - +