summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs6
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs56
-rw-r--r--win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml13
-rw-r--r--win/CS/HandBrakeWPF/Views/VideoView.xaml2
4 files changed, 71 insertions, 6 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;
diff --git a/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml
index d9ed6cef2..fa537e178 100644
--- a/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml
+++ b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml
@@ -45,10 +45,13 @@
</Grid.ColumnDefinitions>
<Label Content="Anamorphic:" Grid.Row="0" Grid.Column="0" />
- <Label Content="Modulus:" Grid.Row="1" Grid.Column="0" />
+ <Label Content="Modulus:" Grid.Row="1" Grid.Column="0"
+ Visibility="{Binding ShowModulus, Converter={StaticResource boolToVisConverter}}" />
<ComboBox Width="110" Grid.Row="0" ItemsSource="{Binding AnamorphicModes}" SelectedItem="{Binding SelectedAnamorphicMode}" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
- <ComboBox Width="110" Grid.Row="1" ItemsSource="{Binding ModulusValues}" SelectedItem="{Binding SelectedModulus}" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <ComboBox Width="110" Grid.Row="1" ItemsSource="{Binding ModulusValues}" SelectedItem="{Binding SelectedModulus}"
+ Visibility="{Binding ShowModulus, Converter={StaticResource boolToVisConverter}}"
+ Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
</Grid>
<!-- Row 4-->
@@ -84,9 +87,11 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
- <Label Content="Display Size:" Grid.Row="0" Grid.Column="0" />
+ <Label Content="Display Size:" Grid.Row="0" Grid.Column="0"
+ Visibility="{Binding ShowDisplaySize, Converter={StaticResource boolToVisConverter}}" />
- <Label Content="{Binding DisplaySize}" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <Label Content="{Binding DisplaySize}" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5"
+ Visibility="{Binding ShowDisplaySize, Converter={StaticResource boolToVisConverter}}" />
</Grid>
</StackPanel>
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml
index 153c36fec..8b6d8cff3 100644
--- a/win/CS/HandBrakeWPF/Views/VideoView.xaml
+++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml
@@ -50,7 +50,7 @@
</StackPanel>
<StackPanel Orientation="Horizontal">
- <TextBlock Text="Franerate (FPS):" Width="100"/>
+ <TextBlock Text="Framerate (FPS):" Width="100"/>
<StackPanel Orientation="Vertical">
<ComboBox Width="120" ItemsSource="{Binding Framerates}" SelectedItem="{Binding SelectedFramerate}" />
<RadioButton Content="Constant Framerate" IsChecked="{Binding IsConstantFramerate}" Margin="0,10,0,0" />