summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Converters
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-08-17 18:46:34 +0000
committersr55 <[email protected]>2013-08-17 18:46:34 +0000
commitcc66e149da034cffaa48284532eec7e5b7ca72e8 (patch)
tree7e9bd51cece372abf5fe42e7171e4ba84cb4fb68 /win/CS/HandBrakeWPF/Converters
parenta5f429773085c80b757649849ed69766fc2a4d34 (diff)
WinGui: Improved the Queue Tooltip and Added a new "Reset to 'Do nothing' when the app starts" option (for the when done dropdown) to preferences.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5704 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Converters')
-rw-r--r--win/CS/HandBrakeWPF/Converters/Audio/AudioQueueDisplayConverter.cs17
-rw-r--r--win/CS/HandBrakeWPF/Converters/Subtitles/SubtitlesQueueDisplayConverter.cs18
2 files changed, 15 insertions, 20 deletions
diff --git a/win/CS/HandBrakeWPF/Converters/Audio/AudioQueueDisplayConverter.cs b/win/CS/HandBrakeWPF/Converters/Audio/AudioQueueDisplayConverter.cs
index d081be1a6..c729fac82 100644
--- a/win/CS/HandBrakeWPF/Converters/Audio/AudioQueueDisplayConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/Audio/AudioQueueDisplayConverter.cs
@@ -13,6 +13,7 @@ namespace HandBrakeWPF.Converters.Audio
using System.Collections.ObjectModel;
using System.Globalization;
using System.Text;
+ using System.Threading.Tasks;
using System.Windows.Data;
using HandBrake.ApplicationServices.Model.Encoding;
@@ -39,18 +40,16 @@ namespace HandBrakeWPF.Converters.Audio
{
foreach (AudioTrack track in tracks)
{
- if (string.IsNullOrEmpty(audioTracks.ToString()))
- {
- audioTracks.Append(EnumHelper<AudioEncoder>.GetDisplay(track.Encoder));
- }
- else
- {
- audioTracks.Append(", " + EnumHelper<AudioEncoder>.GetDisplay(track.Encoder));
- }
+ string trackName = string.Format(
+ "{0} {1}",
+ track.ScannedTrack.TrackNumber,
+ track.ScannedTrack.Language);
+
+ audioTracks.Append(string.Format("{0} - {1} To {2}{3}", trackName, track.TrackName, EnumHelper<AudioEncoder>.GetDisplay(track.Encoder), Environment.NewLine));
}
}
- return audioTracks.ToString();
+ return audioTracks.ToString().Trim();
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/Converters/Subtitles/SubtitlesQueueDisplayConverter.cs b/win/CS/HandBrakeWPF/Converters/Subtitles/SubtitlesQueueDisplayConverter.cs
index e30967ae3..3e5f5d113 100644
--- a/win/CS/HandBrakeWPF/Converters/Subtitles/SubtitlesQueueDisplayConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/Subtitles/SubtitlesQueueDisplayConverter.cs
@@ -32,24 +32,20 @@ namespace HandBrakeWPF.Converters.Subtitles
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
ObservableCollection<SubtitleTrack> tracks = value as ObservableCollection<SubtitleTrack>;
- StringBuilder audioTracks = new StringBuilder();
+ StringBuilder sutitleTracks = new StringBuilder();
if (tracks != null)
{
foreach (SubtitleTrack track in tracks)
{
- string text = track.SourceTrack != null ? track.SourceTrack.ToString() : (track.SrtFileName + ".srt");
- if (string.IsNullOrEmpty(audioTracks.ToString()))
- {
- audioTracks.Append(text);
- }
- else
- {
- audioTracks.Append(", " + text);
- }
+ string text = track.SourceTrack != null
+ ? track.SourceTrack.ToString()
+ : (track.SrtFileName + ".srt");
+
+ sutitleTracks.AppendLine(text);
}
}
- return string.IsNullOrEmpty(audioTracks.ToString()) ? "None" : audioTracks.ToString();
+ return string.IsNullOrEmpty(sutitleTracks.ToString()) ? "None" : sutitleTracks.ToString().Trim();
}
/// <summary>