diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | 46 |
1 files changed, 4 insertions, 42 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index ff402a9ed..bb2bff804 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -1393,6 +1393,7 @@ namespace HandBrakeWPF.ViewModels this.SelectedLangaugesToMove = new BindingList<string>();
IDictionary<string, string> langList = LanguageUtilities.MapLanguages();
+ langList = (from entry in langList orderby entry.Key ascending select entry).ToDictionary(pair => pair.Key, pair => pair.Value);
this.selectedLangauges.Clear();
foreach (string selectedItem in this.userSettingService.GetUserSetting<StringCollection>(UserSettingConstants.SelectedLanguages))
@@ -1553,7 +1554,7 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public void LanguageMoveLeft()
{
- if (this.SelectedLangauges.Count > 0)
+ if (this.SelectedAvailableToMove.Count > 0)
{
List<string> copiedList = SelectedAvailableToMove.ToList();
foreach (string item in copiedList)
@@ -1580,6 +1581,8 @@ namespace HandBrakeWPF.ViewModels this.AvailableLanguages.Add(item);
}
}
+
+ this.AvailableLanguages = new BindingList<string>(this.AvailableLanguages.OrderBy(o => o).ToList());
}
/// <summary>
@@ -1597,47 +1600,6 @@ namespace HandBrakeWPF.ViewModels }
/// <summary>
- /// Audio List Language Move UP
- /// </summary>
- public void LanguageMoveUp()
- {
- List<string> langauges = this.SelectedLangauges.ToList();
- foreach (string item in langauges)
- {
- if (this.SelectedLangaugesToMove.Contains(item))
- {
- int index = this.SelectedLangauges.IndexOf(item);
- if (index != 0)
- {
- this.SelectedLangauges.Remove(item);
- this.SelectedLangauges.Insert(index - 1, item);
- }
- }
- }
- }
-
- /// <summary>
- /// Audio List Language Move Down
- /// </summary>
- public void LanguageMoveDown()
- {
- List<string> langauges = this.SelectedLangauges.ToList();
- int count = this.SelectedLangauges.Count;
- foreach (string item in langauges)
- {
- if (this.SelectedLangaugesToMove.Contains(item))
- {
- int index = this.SelectedLangauges.IndexOf(item);
- if ((index + 1) != count)
- {
- this.SelectedLangauges.Remove(item);
- this.SelectedLangauges.Insert(index + 1, item);
- }
- }
- }
- }
-
- /// <summary>
/// Browse - Log Path
/// </summary>
public void BrowseLogPath()
|