From d23ce1929a4711f9153a27f39ac30f07a1b66acd Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 2 Dec 2011 20:17:53 +0000 Subject: WinGui: (WPF) Update with options panel with the latest WinForm changes. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4371 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrakeWPF/UserSettingConstants.cs | 1 + win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | 29 ++++++++++++++++++++-- win/CS/HandBrakeWPF/Views/OptionsView.xaml | 4 ++- win/CS/HandBrakeWPF/defaultsettings.xml | 8 ++++++ 4 files changed, 39 insertions(+), 3 deletions(-) (limited to 'win/CS') diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs index 575a65678..067a3e367 100644 --- a/win/CS/HandBrakeWPF/UserSettingConstants.cs +++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs @@ -32,6 +32,7 @@ namespace HandBrakeWPF public const string UseM4v = "useM4v"; public const string PromptOnUnmatchingQueries = "PromptOnUnmatchingQueries"; public const string NativeLanguage = "NativeLanguage"; + public const string NativeLanguageForSubtitles = "NativeLanguageSubtitles"; public const string DubMode = "DubMode"; public const string CliExeHash = "CliExeHash"; public const string ClearOldLogs = "clearOldLogs"; diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index eedd247ce..dd683b7c8 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -239,10 +239,15 @@ namespace HandBrakeWPF.ViewModels private BindingList preferredLanguages = new BindingList(); /// - /// The selected preferreed langauge. + /// The selected preferred langauge. /// private string selectedPreferredLangauge; + /// + /// The selected preferred subtitle language + /// + private string selectedPreferredSubtitleLangauge; + /// /// The selected preview count. /// @@ -708,6 +713,23 @@ namespace HandBrakeWPF.ViewModels } } + /// + /// Gets or sets SelectedPreferredSubtitleLangauge. + /// + public string SelectedPreferredSubtitleLangauge + { + get + { + return this.selectedPreferredSubtitleLangauge; + } + + set + { + this.selectedPreferredSubtitleLangauge = value; + this.NotifyOfPropertyChange("SelectedPreferredSubtitleLangauge"); + } + } + /// /// Gets or sets AvailableLanguages. /// @@ -1334,6 +1356,7 @@ namespace HandBrakeWPF.ViewModels } this.selectedPreferredLangauge = this.userSettingService.GetUserSetting(UserSettingConstants.NativeLanguage) ?? string.Empty; + this.selectedPreferredSubtitleLangauge = this.userSettingService.GetUserSetting(UserSettingConstants.NativeLanguageForSubtitles) ?? string.Empty; this.AddAudioModeOptions.Add("None"); this.AddAudioModeOptions.Add("All Remaining Tracks"); @@ -1343,7 +1366,8 @@ namespace HandBrakeWPF.ViewModels this.AddSubtitleModeOptions.Add("All"); this.AddSubtitleModeOptions.Add("First"); this.AddSubtitleModeOptions.Add("Selected"); - this.AddSubtitleModeOptions.Add("Preferred Only"); + this.AddSubtitleModeOptions.Add("Prefered Only (First)"); + this.AddSubtitleModeOptions.Add("Prefered Only (All)"); this.selectedAddAudioMode = this.userSettingService.GetUserSetting(UserSettingConstants.DubModeAudio); this.selectedAddSubtitleMode = this.userSettingService.GetUserSetting(UserSettingConstants.DubModeSubtitle); @@ -1608,6 +1632,7 @@ namespace HandBrakeWPF.ViewModels /* Audio and Subtitles */ this.userSettingService.SetUserSetting(UserSettingConstants.NativeLanguage, this.SelectedPreferredLangauge); + this.userSettingService.SetUserSetting(UserSettingConstants.NativeLanguageForSubtitles, this.SelectedPreferredSubtitleLangauge); StringCollection collection = new StringCollection(); collection.AddRange(this.SelectedLangauges.ToArray()); this.userSettingService.SetUserSetting(UserSettingConstants.SelectedLanguages, collection); diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index 36df30219..4976800f8 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -163,8 +163,10 @@ + - + + diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml index 6fea12dc4..bff3307a4 100644 --- a/win/CS/HandBrakeWPF/defaultsettings.xml +++ b/win/CS/HandBrakeWPF/defaultsettings.xml @@ -272,6 +272,14 @@ Any + + + NativeLanguageForSubtitles + + + Any + + DubMode -- cgit v1.2.3