summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-06-03 20:54:33 +0000
committersr55 <[email protected]>2012-06-03 20:54:33 +0000
commit455407f09c31dcfd9785a15b82f86cb8b322726f (patch)
treeba4b3ae7a633a8a60aceaf349facbdb270854675 /win/CS/HandBrakeWPF/ViewModels
parentb89d9987440e08807238a5ec77ca59d1d4cce7c0 (diff)
WinGui: Numerous fixes to the picture settings tab. Fixed framerate typo on the Video tab and fixed an issue on the main window when changing back to Chapters mode. (Start and End points were not set correctly)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4710 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs6
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs56
2 files changed, 61 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index df13c1482..5bc79dec7 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -726,6 +726,12 @@ namespace HandBrakeWPF.ViewModels
this.CurrentTask.PointToPointMode = value;
this.NotifyOfPropertyChange(() => SelectedPointToPoint);
this.NotifyOfPropertyChange(() => ShowTextEntryForPointToPointMode);
+
+ if (value == PointToPointMode.Chapters && this.SelectedTitle != null)
+ {
+ this.SelectedStartPoint = 1;
+ this.SelectedEndPoint = selectedTitle.Chapters.Last().ChapterNumber;
+ }
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
index cbed5a1bc..f5612df2e 100644
--- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
@@ -78,6 +78,16 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
private bool widthControlEnabled = true;
+ /// <summary>
+ /// Backing field for the show modulus field
+ /// </summary>
+ private bool showModulus;
+
+ /// <summary>
+ /// Backing field for showing display size.
+ /// </summary>
+ private bool showDisplaySize;
+
#endregion
#region Constructors and Destructors
@@ -127,6 +137,7 @@ namespace HandBrakeWPF.ViewModels
{
this.Task.Cropping.Bottom = this.CorrectForModulus(this.Task.Cropping.Bottom, value);
this.NotifyOfPropertyChange(() => this.CropBottom);
+ this.SetDisplaySize();
}
}
@@ -144,6 +155,7 @@ namespace HandBrakeWPF.ViewModels
{
this.Task.Cropping.Left = this.CorrectForModulus(this.Task.Cropping.Left, value);
this.NotifyOfPropertyChange(() => this.CropLeft);
+ this.SetDisplaySize();
}
}
@@ -161,6 +173,7 @@ namespace HandBrakeWPF.ViewModels
{
this.Task.Cropping.Right = this.CorrectForModulus(this.Task.Cropping.Right, value);
this.NotifyOfPropertyChange(() => this.CropRight);
+ this.SetDisplaySize();
}
}
@@ -178,6 +191,7 @@ namespace HandBrakeWPF.ViewModels
{
this.Task.Cropping.Top = this.CorrectForModulus(this.Task.Cropping.Top, value);
this.NotifyOfPropertyChange(() => this.CropTop);
+ this.SetDisplaySize();
}
}
@@ -389,6 +403,38 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
+ /// Gets or sets a value indicating whether ShowModulus.
+ /// </summary>
+ public bool ShowModulus
+ {
+ get
+ {
+ return this.showModulus;
+ }
+ set
+ {
+ this.showModulus = value;
+ this.NotifyOfPropertyChange(() => this.ShowModulus);
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether ShowDisplaySize.
+ /// </summary>
+ public bool ShowDisplaySize
+ {
+ get
+ {
+ return this.showDisplaySize;
+ }
+ set
+ {
+ this.showDisplaySize = value;
+ this.NotifyOfPropertyChange(() => this.ShowDisplaySize);
+ }
+ }
+
+ /// <summary>
/// Gets or sets SourceInfo.
/// </summary>
public string SourceInfo
@@ -580,12 +626,16 @@ namespace HandBrakeWPF.ViewModels
this.CalculateAnamorphicSizes().Width,
this.CalculateAnamorphicSizes().Height);
+ this.ShowDisplaySize = true;
switch (this.SelectedAnamorphicMode)
{
case Anamorphic.None:
this.WidthControlEnabled = true;
this.HeightControlEnabled = true;
this.ShowCustomAnamorphicControls = false;
+ this.ShowModulus = false;
+ this.ShowDisplaySize = false;
+ this.SelectedModulus = 16; // Reset
this.Width = this.sourceResolution.Width;
this.SetDisplaySize();
break;
@@ -593,6 +643,8 @@ namespace HandBrakeWPF.ViewModels
this.WidthControlEnabled = false;
this.HeightControlEnabled = false;
this.ShowCustomAnamorphicControls = false;
+ this.ShowModulus = false;
+ this.SelectedModulus = 16; // Reset
this.Width = 0;
this.Height = 0;
@@ -605,6 +657,7 @@ namespace HandBrakeWPF.ViewModels
this.WidthControlEnabled = true;
this.HeightControlEnabled = false;
this.ShowCustomAnamorphicControls = false;
+ this.ShowModulus = true;
this.Width = this.sourceResolution.Width;
this.Height = 0;
@@ -617,6 +670,7 @@ namespace HandBrakeWPF.ViewModels
this.WidthControlEnabled = true;
this.HeightControlEnabled = true;
this.ShowCustomAnamorphicControls = true;
+ this.ShowModulus = true;
this.Width = this.sourceResolution.Width;
this.Height = 0;
@@ -861,7 +915,7 @@ namespace HandBrakeWPF.ViewModels
this.Task.Height = (int)Math.Round(this.GetModulusValue(newHeight), 0);
this.NotifyOfPropertyChange(() => this.Height);
}
-
+ this.SetDisplaySize();
break;
case Anamorphic.Strict:
this.Task.Width = 0;