diff options
author | sr55 <[email protected]> | 2011-12-02 20:17:53 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-12-02 20:17:53 +0000 |
commit | d23ce1929a4711f9153a27f39ac30f07a1b66acd (patch) | |
tree | 67b79e33de643d150412e0a35d7fdb3ecc673145 /win/CS | |
parent | f12fe4521c0555e907caecf118b7539e03ea1b38 (diff) |
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
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/HandBrakeWPF/UserSettingConstants.cs | 1 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | 29 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/OptionsView.xaml | 4 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/defaultsettings.xml | 8 |
4 files changed, 39 insertions, 3 deletions
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,11 +239,16 @@ namespace HandBrakeWPF.ViewModels private BindingList<string> preferredLanguages = new BindingList<string>();
/// <summary>
- /// The selected preferreed langauge.
+ /// The selected preferred langauge.
/// </summary>
private string selectedPreferredLangauge;
/// <summary>
+ /// The selected preferred subtitle language
+ /// </summary>
+ private string selectedPreferredSubtitleLangauge;
+
+ /// <summary>
/// The selected preview count.
/// </summary>
private int selectedPreviewCount;
@@ -709,6 +714,23 @@ namespace HandBrakeWPF.ViewModels }
/// <summary>
+ /// Gets or sets SelectedPreferredSubtitleLangauge.
+ /// </summary>
+ public string SelectedPreferredSubtitleLangauge
+ {
+ get
+ {
+ return this.selectedPreferredSubtitleLangauge;
+ }
+
+ set
+ {
+ this.selectedPreferredSubtitleLangauge = value;
+ this.NotifyOfPropertyChange("SelectedPreferredSubtitleLangauge");
+ }
+ }
+
+ /// <summary>
/// Gets or sets AvailableLanguages.
/// </summary>
public BindingList<string> AvailableLanguages
@@ -1334,6 +1356,7 @@ namespace HandBrakeWPF.ViewModels }
this.selectedPreferredLangauge = this.userSettingService.GetUserSetting<string>(UserSettingConstants.NativeLanguage) ?? string.Empty;
+ this.selectedPreferredSubtitleLangauge = this.userSettingService.GetUserSetting<string>(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<int>(UserSettingConstants.DubModeAudio);
this.selectedAddSubtitleMode = this.userSettingService.GetUserSetting<int>(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 @@ <TextBlock Text="Preferred Language:" Grid.Column="0"/>
<StackPanel Orientation="Horizontal" Grid.Column="1">
+ <TextBlock VerticalAlignment="Center" Text="Audio: " FontSize="10" />
<ComboBox Name="primaryAudioLanguage" VerticalAlignment="Center" ItemsSource="{Binding PreferredLanguages}" SelectedItem="{Binding SelectedPreferredLangauge}" Width="120" />
- <TextBlock VerticalAlignment="Center" Text="Primary Audio Langauge" FontSize="10" />
+ <TextBlock VerticalAlignment="Center" Text="Subtitles: " FontSize="10" Margin="10,0,0,0" />
+ <ComboBox Name="primarySubtitleLanguage" VerticalAlignment="Center" ItemsSource="{Binding PreferredLanguages}" SelectedItem="{Binding SelectedPreferredSubtitleLangauge}" Width="120" />
</StackPanel>
</Grid>
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 @@ -274,6 +274,14 @@ </item>
<item>
<key>
+ <string>NativeLanguageForSubtitles</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">Any</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
<string>DubMode</string>
</key>
<value>
|