summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-07-20 13:29:01 +0000
committersr55 <[email protected]>2013-07-20 13:29:01 +0000
commitc28c8dd123d13e08b85a29745f440cf024b1c5ba (patch)
treea03b3f03d9a82a4c76c028ea79b60fea4819aa33 /win/CS/HandBrakeWPF/ViewModels
parent5aeff5b7f02a26fa3d20c124322c61c34b0e3b8c (diff)
WinGui: Misc fixes and improvements
- Added "Open This Directory" right click context menu on the destination box. - Fixed the av_mp4/mkv file extension bug. - Add new autoname options {time} {bitrate} {quality} git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5653 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs21
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs8
2 files changed, 24 insertions, 5 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 74f11abf2..8fdb4577c 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -879,7 +879,7 @@ namespace HandBrakeWPF.ViewModels
this.NotifyOfPropertyChange(() => SelectedOutputFormat);
this.NotifyOfPropertyChange(() => this.CurrentTask.OutputFormat);
this.NotifyOfPropertyChange(() => IsMkv);
- this.SetExtension(string.Format(".{0}", this.selectedOutputFormat.ToString().ToLower())); // TODO, tidy up
+ this.SetExtension(string.Format(".{0}", this.selectedOutputFormat.ToString().Replace("av_", string.Empty).ToLower())); // TODO, tidy up
this.VideoViewModel.RefreshTask();
this.AudioViewModel.RefreshTask();
@@ -1450,6 +1450,25 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
+ /// The open destination directory.
+ /// </summary>
+ public void OpenDestinationDirectory()
+ {
+ if (!string.IsNullOrEmpty(this.Destination))
+ {
+ string directory = Path.GetDirectoryName(this.Destination);
+ if (!string.IsNullOrEmpty(directory))
+ {
+ Process.Start(directory);
+ }
+ else
+ {
+ Process.Start(AppDomain.CurrentDomain.BaseDirectory);
+ }
+ }
+ }
+
+ /// <summary>
/// Add a Preset
/// </summary>
public void PresetAdd()
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
index a91dc4d3d..743a9c561 100644
--- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
@@ -823,7 +823,7 @@ namespace HandBrakeWPF.ViewModels
case Anamorphic.Custom:
double dispWidth = Math.Round((result.OutputWidth * result.OutputParWidth / result.OutputParHeight), 0);
this.DisplaySize = this.sourceResolution.IsEmpty
- ? "No Title Selected"
+ ? string.Empty
: string.Format("Storage: {0}x{1}, Display: {2}x{3}", result.OutputWidth, result.OutputHeight, dispWidth, result.OutputHeight);
break;
}
@@ -1023,14 +1023,14 @@ namespace HandBrakeWPF.ViewModels
double dispWidth = Math.Round((result.OutputWidth * result.OutputParWidth / result.OutputParHeight), 0);
this.DisplaySize = this.sourceResolution.IsEmpty
- ? "No Title Selected"
+ ? string.Empty
: string.Format("Output: {0}x{1}, Anamorphic: {2}x{3}", result.OutputWidth, result.OutputHeight, dispWidth, result.OutputHeight);
}
else
{
this.DisplaySize = this.sourceResolution.IsEmpty
- ? "No Title Selected"
- : string.Format("Output: {0}x{1}, Anamorphic: {2}x{3}", this.Width, this.Height, this.Width, this.Height);
+ ? string.Empty
+ : string.Format("Output: {0}x{1}", this.Width, this.Height);
}
}