diff options
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.Designer.cs | 31 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.resx | 13 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Services/UserSettingService.cs | 3 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | 19 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 24 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/X264ViewModel.cs | 14 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/OptionsView.xaml | 1 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/VideoView.xaml | 3 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/X264View.xaml | 10 |
9 files changed, 31 insertions, 87 deletions
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index 5c7732428..0badf3c9e 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -365,19 +365,6 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
- /// Looks up a localized string similar to The x264 Preset / Tune / Profile and Level options are currently in use on the Video Tab.
- ///
- ///To enable this tab, check the "Use Advanced Tab instead" option on the Video Tab.
- ///
- ///If you do not use this tab, it can be hidden from: Tools Menu > Options > Advanced..
- /// </summary>
- public static string Advanced_NotInUse {
- get {
- return ResourceManager.GetString("Advanced_NotInUse", resourceCulture);
- }
- }
-
- /// <summary>
/// Looks up a localized string similar to Psychovisual Rate Distortion means x264 tries to retain detail, for better quality to the human eye,
///as opposed to trying to maximize quality the way a computer understands it, through signal-to-noise ratios that have trouble telling apart fine detail and noise..
/// </summary>
@@ -2493,15 +2480,6 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
- /// Looks up a localized string similar to Allow use of 'Advanced' Tab for x264 options. (Deprecated).
- /// </summary>
- public static string Options_AdvancedTab {
- get {
- return ResourceManager.GetString("Options_AdvancedTab", resourceCulture);
- }
- }
-
- /// <summary>
/// Looks up a localized string similar to Arguments:.
/// </summary>
public static string Options_Arguments {
@@ -5073,15 +5051,6 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
- /// Looks up a localized string similar to Use Advanced Tab instead.
- /// </summary>
- public static string VideoView_UseAdvancedTab {
- get {
- return ResourceManager.GetString("VideoView_UseAdvancedTab", resourceCulture);
- }
- }
-
- /// <summary>
/// Looks up a localized string similar to Variable Framerate.
/// </summary>
public static string VideoView_VariableFramerate {
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index 69aa2a76b..2ce55d5f1 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -284,13 +284,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</value>
</data>
- <data name="Advanced_NotInUse" xml:space="preserve">
- <value>The x264 Preset / Tune / Profile and Level options are currently in use on the Video Tab.
-
-To enable this tab, check the "Use Advanced Tab instead" option on the Video Tab.
-
-If you do not use this tab, it can be hidden from: Tools Menu > Options > Advanced.</value>
- </data>
<data name="QueueSelection_AutoNameWarning" xml:space="preserve">
<value>WARNING: You do not have automatic file naming turned on. Please enable this in options.</value>
</data>
@@ -1329,9 +1322,6 @@ Would you like to overwrite it?</value> <data name="Options_AdvancedOptions" xml:space="preserve">
<value>Advanced Options</value>
</data>
- <data name="Options_AdvancedTab" xml:space="preserve">
- <value>Allow use of 'Advanced' Tab for x264 options. (Deprecated)</value>
- </data>
<data name="Options_Arguments" xml:space="preserve">
<value>Arguments:</value>
</data>
@@ -1898,9 +1888,6 @@ This will not affect your current settings in the Subtitle tab.</value> <data name="VideoView_TurboFirstPass" xml:space="preserve">
<value>Turbo first pass</value>
</data>
- <data name="VideoView_UseAdvancedTab" xml:space="preserve">
- <value>Use Advanced Tab instead</value>
- </data>
<data name="VideoView_VariableFramerate" xml:space="preserve">
<value>Variable Framerate</value>
</data>
diff --git a/win/CS/HandBrakeWPF/Services/UserSettingService.cs b/win/CS/HandBrakeWPF/Services/UserSettingService.cs index 8bd70f509..bcadcadb4 100644 --- a/win/CS/HandBrakeWPF/Services/UserSettingService.cs +++ b/win/CS/HandBrakeWPF/Services/UserSettingService.cs @@ -211,6 +211,9 @@ namespace HandBrakeWPF.Services this.userSettings.Add(item.Key, item.Value);
this.Save();
}
+
+ // Legacy Settings forced Reset.
+ this.userSettings[UserSettingConstants.ShowAdvancedTab] = false;
}
catch (Exception exc)
{
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index e915663c8..36034f0d2 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -85,7 +85,6 @@ namespace HandBrakeWPF.ViewModels private bool updateAvailable;
private int downloadProgressPercentage;
private UpdateCheckInformation updateInfo;
- private bool showAdvancedTab;
private bool removePunctuation;
private bool resetWhenDoneAction;
private bool enableQuickSyncDecoding;
@@ -979,22 +978,6 @@ namespace HandBrakeWPF.ViewModels }
}
- /// <summary>
- /// Gets or sets a value indicating whether enable lib hb.
- /// </summary>
- public bool ShowAdvancedTab
- {
- get
- {
- return this.showAdvancedTab;
- }
- set
- {
- this.showAdvancedTab = value;
- this.NotifyOfPropertyChange(() => this.ShowAdvancedTab);
- }
- }
-
#endregion
#region Video
@@ -1454,7 +1437,6 @@ namespace HandBrakeWPF.ViewModels // Minimise to Tray
this.MinimiseToTray = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.MainWindowMinimize);
this.ClearQueueOnEncodeCompleted = userSettingService.GetUserSetting<bool>(UserSettingConstants.ClearCompletedFromQueue);
- this.ShowAdvancedTab = userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAdvancedTab);
// Set the preview count
this.PreviewPicturesToScan.Clear();
@@ -1574,7 +1556,6 @@ namespace HandBrakeWPF.ViewModels userSettingService.SetUserSetting(UserSettingConstants.ClearCompletedFromQueue, this.ClearQueueOnEncodeCompleted);
userSettingService.SetUserSetting(UserSettingConstants.PreviewScanCount, this.SelectedPreviewCount);
userSettingService.SetUserSetting(UserSettingConstants.X264Step, double.Parse(this.SelectedGranulairty, CultureInfo.InvariantCulture));
- userSettingService.SetUserSetting(UserSettingConstants.ShowAdvancedTab, this.ShowAdvancedTab);
int value;
if (int.TryParse(this.MinLength.ToString(CultureInfo.InvariantCulture), out value))
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index 53f410356..92bf9677f 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -14,6 +14,7 @@ namespace HandBrakeWPF.ViewModels using System.ComponentModel;
using System.Globalization;
using System.Linq;
+ using System.Windows;
using Caliburn.Micro;
@@ -51,6 +52,7 @@ namespace HandBrakeWPF.ViewModels private const string SameAsSource = "Same as source";
private readonly IUserSettingService userSettingService;
+ private readonly IErrorService errorService;
private bool displayOptimiseOptions;
private int qualityMax;
@@ -78,10 +80,11 @@ namespace HandBrakeWPF.ViewModels /// <param name="userSettingService">
/// The user Setting Service.
/// </param>
- public VideoViewModel(IUserSettingService userSettingService)
+ public VideoViewModel(IUserSettingService userSettingService, IErrorService errorService)
{
this.Task = new EncodeTask { VideoEncoder = VideoEncoder.X264 };
this.userSettingService = userSettingService;
+ this.errorService = errorService;
this.QualityMin = 0;
this.QualityMax = 51;
this.IsConstantQuantity = true;
@@ -1153,6 +1156,25 @@ namespace HandBrakeWPF.ViewModels Clipboard.SetDataObject(this.SelectedVideoEncoder == VideoEncoder.X264 || this.SelectedVideoEncoder == VideoEncoder.X264_10 ? this.GetActualx264Query() : this.ExtraArguments);
}
+ public void ToggleAdvancedTab()
+ {
+ if (!this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAdvancedTab))
+ {
+ this.errorService.ShowMessageBox(
+ "The 'Advanced' tab is no longer supported and will be removed in an upcoming release. We strongly recommend using the video tab instead.",
+ "Advanced Tab Deprecated",
+ MessageBoxButton.OK,
+ MessageBoxImage.Information);
+ this.userSettingService.SetUserSetting(UserSettingConstants.ShowAdvancedTab, true);
+ this.UseAdvancedTab = true;
+ }
+ else
+ {
+ this.userSettingService.SetUserSetting(UserSettingConstants.ShowAdvancedTab, false);
+ this.UseAdvancedTab = false;
+ }
+ }
+
#endregion
protected virtual void OnTabStatusChanged(TabStatusEventArgs e)
diff --git a/win/CS/HandBrakeWPF/ViewModels/X264ViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/X264ViewModel.cs index f0600981f..41cfb1ef1 100644 --- a/win/CS/HandBrakeWPF/ViewModels/X264ViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/X264ViewModel.cs @@ -178,11 +178,9 @@ namespace HandBrakeWPF.ViewModels {
if (e.PropertyName == UserSettingConstants.ShowAdvancedTab)
{
- ShowX264AdvancedOptions = this.Task.ShowAdvancedTab;
- this.NotifyOfPropertyChange(() => ShowX264AdvancedOptions);
this.NotifyOfPropertyChange(() => this.AdvancedOptionsString);
- if (ShowX264AdvancedOptions)
+ if (this.Task.ShowAdvancedTab)
{
this.UpdateUIFromAdvancedOptions();
}
@@ -195,10 +193,6 @@ namespace HandBrakeWPF.ViewModels #region Properties
- /// <summary>
- /// Gets or sets a value indicating whether show x 264 advanced options.
- /// </summary>
- public bool ShowX264AdvancedOptions { get; set; }
/// <summary>
/// Gets or sets AdaptiveBFrames.
@@ -936,12 +930,6 @@ namespace HandBrakeWPF.ViewModels this.Task = task;
this.Task.PropertyChanged += this.Task_PropertyChanged;
this.AdvancedOptionsString = preset.Task.AdvancedEncoderOptions;
-
- if (task.ShowAdvancedTab && (task.VideoEncoder == VideoEncoder.X264 || task.VideoEncoder == VideoEncoder.X264_10))
- {
- this.ShowX264AdvancedOptions = true;
- this.NotifyOfPropertyChange(() => ShowX264AdvancedOptions);
- }
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index be4f98cff..ae403147b 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -172,7 +172,6 @@ <StackPanel Orientation="Vertical" Margin="20,0,0,0">
<CheckBox Content="{x:Static Properties:Resources.Options_MinimiseTray}" IsChecked="{Binding MinimiseToTray}" />
<CheckBox Content="{x:Static Properties:Resources.Options_ClearCompleted}" IsChecked="{Binding ClearQueueOnEncodeCompleted}" />
- <CheckBox Content="{x:Static Properties:Resources.Options_AdvancedTab}" IsChecked="{Binding ShowAdvancedTab}" />
<CheckBox Content="{x:Static Properties:Resources.OptionsView_ShowStatusInTitleBar}" IsChecked="{Binding ShowStatusInTitleBar}" />
<CheckBox Content="{x:Static Properties:Resources.OptionsView_ShowPreviewOnSummaryTab}" IsChecked="{Binding ShowPreviewOnSummaryTab}" />
</StackPanel>
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml index 92ab11d65..cfe3b9990 100644 --- a/win/CS/HandBrakeWPF/Views/VideoView.xaml +++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml @@ -131,7 +131,7 @@ <TextBlock Text="{x:Static Properties:Resources.VideoView_OptimiseVideo}" Margin="0,0,0,0" Grid.Row="0" Grid.ColumnSpan="2" FontWeight="Bold" VerticalAlignment="Center" />
- <CheckBox Content="{x:Static Properties:Resources.VideoView_UseAdvancedTab}" Grid.Row="1" IsChecked="{Binding UseAdvancedTab}" Margin="0,5,0,0"
+ <CheckBox Content="Use Legacy Advanced Tab" Grid.Row="1" IsChecked="{Binding UseAdvancedTab}" Margin="0,5,0,0"
Visibility="{Binding IsAdvancedTabOptionEnabled, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}"
ToolTip="{x:Static Properties:ResourcesTooltips.Video_AdvancedOptions}" />
@@ -193,6 +193,7 @@ <TextBox.ContextMenu>
<ContextMenu>
<MenuItem Header="Copy Full Query" cal:Message.Attach="[Event Click] = [Action CopyQuery]" />
+ <MenuItem Header="Toggle Advanced Tab (Deprecated)" cal:Message.Attach="[Event Click] = [Action ToggleAdvancedTab]" />
</ContextMenu>
</TextBox.ContextMenu>
</TextBox>
diff --git a/win/CS/HandBrakeWPF/Views/X264View.xaml b/win/CS/HandBrakeWPF/Views/X264View.xaml index 504bca3db..9fecd494b 100644 --- a/win/CS/HandBrakeWPF/Views/X264View.xaml +++ b/win/CS/HandBrakeWPF/Views/X264View.xaml @@ -38,11 +38,7 @@ <!-- X264 Query -->
- <TextBlock Text="{x:Static Properties:Resources.Advanced_NotInUse}" Grid.Row="0"
- TextWrapping="Wrap" Width="480" Margin="0, 100, 0, 0" FontSize="12"
- Visibility="{Binding ShowX264AdvancedOptions, Converter={StaticResource BooleanVisibilityConverter}, ConverterParameter=true}" />
-
- <Grid Grid.Row="1" Visibility="{Binding ShowX264AdvancedOptions, Converter={StaticResource BooleanVisibilityConverter}, ConverterParameter=false}">
+ <Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
@@ -521,8 +517,7 @@ <TextBlock Grid.Row="2" Margin="10,5,10,0"
VerticalAlignment="Center"
FontWeight="Bold"
- Text="x264 Encoder Options:"
- Visibility="{Binding ShowX264AdvancedOptions, Converter={StaticResource BooleanVisibilityConverter}, ConverterParameter=false}" />
+ Text="x264 Encoder Options:" />
<TextBox Grid.Row="3"
Margin="10,2,10, 2"
@@ -533,7 +528,6 @@ ToolTip="{x:Static Properties:Resources.Advanced_EncoderOptions}"
Text="{Binding AdvancedOptionsString, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap"
- Visibility="{Binding ShowX264AdvancedOptions, Converter={StaticResource BooleanVisibilityConverter}, ConverterParameter=false}"
/>
</Grid>
</UserControl>
\ No newline at end of file |