diff options
author | sr55 <[email protected]> | 2013-12-29 20:23:51 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-12-29 20:23:51 +0000 |
commit | a9cad63afe88581bf0ea5463e3199bd0d1b474c0 (patch) | |
tree | b10970d33a0a2e0f393507b1643354477f810581 /win/CS/HandBrakeWPF/Views | |
parent | 6be910a604b07801704fa4c48f40e0a949e7695c (diff) |
WinGui: Fix a few bugs:
- Advanced query getting nulled out for QSV due to some dead code.
- Updated the regex for the decomb value to accept unquoted value as well as quoted.
- Remapped Ctrl-F to Ctrl-O to be more standard.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5944 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r-- | win/CS/HandBrakeWPF/Views/ShellView.xaml.cs | 1 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/VideoView.xaml | 6 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/VideoView.xaml.cs | 72 |
3 files changed, 4 insertions, 75 deletions
diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs index fbf700b4a..35e1e0333 100644 --- a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs @@ -77,6 +77,7 @@ namespace HandBrakeWPF.Views this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.Q, ModifierKeys.Control)), new KeyGesture(Key.Q, ModifierKeys.Control)));
this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.A, ModifierKeys.Control)), new KeyGesture(Key.A, ModifierKeys.Control)));
this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.F, ModifierKeys.Control)), new KeyGesture(Key.F, ModifierKeys.Control)));
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.O, ModifierKeys.Control)), new KeyGesture(Key.O, ModifierKeys.Control)));
this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.R, ModifierKeys.Control)), new KeyGesture(Key.R, ModifierKeys.Control)));
this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.D, ModifierKeys.Control | ModifierKeys.Shift)), new KeyGesture(Key.D, ModifierKeys.Control | ModifierKeys.Shift)));
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml index fffbfd0b2..1f0b31764 100644 --- a/win/CS/HandBrakeWPF/Views/VideoView.xaml +++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml @@ -96,7 +96,7 @@ <TextBlock Text="Quality" FontWeight="Bold" Margin="0,0,0,10"/>
<StackPanel Orientation="Horizontal" Margin="0,0,0,10" >
- <RadioButton Content="Constant Quality:" IsChecked="{Binding IsConstantQuantity}" Margin="0,0,10,0" Checked="qsv_preset_radiobutton"/>
+ <RadioButton Content="Constant Quality:" IsChecked="{Binding IsConstantQuantity}" Margin="0,0,10,0" />
<TextBlock Text="{Binding DisplayRF}" MinWidth="30" />
<TextBlock Text="{Binding Rfqp}" FontWeight="Bold" Margin="5,0,0,0" />
@@ -119,7 +119,7 @@ </Grid>
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
- <RadioButton Content="Avg Bitrate (kbps):" IsChecked="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="0,0,10,0" Checked="qsv_preset_radiobutton"/>
+ <RadioButton Content="Avg Bitrate (kbps):" IsChecked="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="0,0,10,0"/>
<TextBox Width="75" Text="{Binding Task.VideoBitrate, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}" />
</StackPanel>
@@ -192,7 +192,7 @@ <StackPanel Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Orientation="Horizontal"
Visibility="{Binding DisplayQSVOptions, Converter={StaticResource boolToVisConverter}}" >
<Slider Minimum="0" Maximum="{Binding QsvSliderMax}" Width="150" Value="{Binding QsvPresetValue, Mode=Default, UpdateSourceTrigger=PropertyChanged}"
- IsSnapToTickEnabled="True" TickFrequency="1" TickPlacement="BottomRight" ValueChanged="qsv_preset_ValueChanged"/>
+ IsSnapToTickEnabled="True" TickFrequency="1" TickPlacement="BottomRight" />
<TextBlock Text="{Binding QsvPreset, Converter={StaticResource enumComboConverter}}" Margin="5,0,0,0" />
</StackPanel>
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml.cs b/win/CS/HandBrakeWPF/Views/VideoView.xaml.cs index 9f12972be..8a0842a96 100644 --- a/win/CS/HandBrakeWPF/Views/VideoView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml.cs @@ -9,14 +9,8 @@ namespace HandBrakeWPF.Views
{
- using System.Collections.Generic;
- using System.Windows;
using System.Windows.Controls;
- using HandBrake.ApplicationServices.Model;
-
- using HandBrakeWPF.ViewModels;
-
/// <summary>
/// Interaction logic for VideoView.xaml
/// </summary>
@@ -29,71 +23,5 @@ namespace HandBrakeWPF.Views {
InitializeComponent();
}
-
- /// <summary>
- /// The qsv_preset_radiobutton.
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void qsv_preset_radiobutton(object sender, System.Windows.RoutedEventArgs e)
- {
- qsv_preset_ValueChanged(sender, null);
- }
-
- /// <summary>
- /// The qsv_preset_ value changed.
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void qsv_preset_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
- {
- VideoViewModel mvm = ((VideoViewModel)this.DataContext);
- EncodeTask task = mvm.Task;
-
- string full_string = string.Empty;
-
- IDictionary<string, string> newOptions = new Dictionary<string, string>();
- string[] existingSegments = full_string.Split(':');
- foreach (string existingSegment in existingSegments)
- {
- string optionName = existingSegment;
- string optionValue = string.Empty;
- int equalsIndex = existingSegment.IndexOf('=');
- if (equalsIndex >= 0)
- {
- optionName = existingSegment.Substring(
- 0, existingSegment.IndexOf("=", System.StringComparison.Ordinal));
- optionValue = existingSegment.Substring(equalsIndex);
- }
-
- if (optionName != string.Empty)
- {
- if (newOptions.ContainsKey(optionName))
- newOptions.Remove(optionName);
- newOptions.Add(optionName, optionValue);
- }
- }
-
- full_string = string.Empty;
- foreach (KeyValuePair<string, string> entry in newOptions)
- {
- full_string += entry.Key;
- if (entry.Value != string.Empty)
- full_string += entry.Value;
- full_string += ":";
- }
- full_string = full_string.TrimEnd(':');
-
- task.AdvancedEncoderOptions = full_string;
- task.NotifyOfPropertyChange(() => task.AdvancedEncoderOptions);
- }
}
}
|