diff options
author | sr55 <[email protected]> | 2012-06-24 12:30:28 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-06-24 12:30:28 +0000 |
commit | 8644f55a4e49256e684f92a30d50cd70a32339b4 (patch) | |
tree | f3a06e23d139452159f762bc11bfe3d7d019befb /win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | |
parent | b652ba78ab983eebfbe1409b255101a2226f10c8 (diff) |
WinGui: Assorted Fixes
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4773 b64f7644-9d1e-0410-96f1-a4d463321fa5
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()
|