summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-05-19 21:02:08 +0000
committersr55 <[email protected]>2012-05-19 21:02:08 +0000
commita8c98d2da676d507a0754ec191d53a1122a40220 (patch)
treeae847166896db64e8e7c1d78b1962f909bc19a6c /win/CS/HandBrake.ApplicationServices
parentb5a8be6d070e651d475978e06459a1f565d855f5 (diff)
WinGui: When Changing the output format, limit to only valid choices in the video and audio encoder dropdowns.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4688 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs17
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs2
2 files changed, 17 insertions, 2 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs b/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs
index 0308069f9..9bbfc30d0 100644
--- a/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs
+++ b/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs
@@ -102,5 +102,22 @@ namespace HandBrake.ApplicationServices.Functions
strings.Add(GetDisplay(e));
return strings;
}
+
+ /// <summary>
+ /// Get a list of string names for each enum value passed in.
+ /// </summary>
+ /// <param name="items">
+ /// The items.
+ /// </param>
+ /// <typeparam name="T">
+ /// The type of the enum
+ /// </typeparam>
+ /// <returns>
+ /// A collection of strings that represent all the enum values
+ /// </returns>
+ public static IEnumerable<string> GetEnumDisplayValuesSubset(IEnumerable<T> items)
+ {
+ return items.Select(GetDisplay).ToList();
+ }
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs
index 14a87bd00..a9d42861a 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs
@@ -7,8 +7,6 @@
// </summary>
// --------------------------------------------------------------------------------------------------------------------
-using System.Collections.Generic;
-
namespace HandBrake.ApplicationServices.Model.Encoding
{
using System;