diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs | 60 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/PresetService.cs | 3 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 29 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/AudioView.xaml | 4 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/LogView.xaml | 30 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/LogView.xaml.cs | 26 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 3 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/SubtitlesView.xaml | 2 |
8 files changed, 133 insertions, 24 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs index 334d636d6..42161a52d 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs @@ -151,17 +151,6 @@ namespace HandBrake.ApplicationServices.Model.Encoding }
/// <summary>
- /// Gets a value indicating whether this is an SRT subtitle.
- /// </summary>
- public bool IsSrtSubtitle
- {
- get
- {
- return this.SrtFileName != "-" && this.SrtFileName != null;
- }
- }
-
- /// <summary>
/// Gets or sets SourceTrack.
/// </summary>
public Subtitle SourceTrack
@@ -179,6 +168,9 @@ namespace HandBrake.ApplicationServices.Model.Encoding {
this.Track = this.sourceTrack.ToString();
}
+
+ this.NotifyOfPropertyChange(() => this.CanBeBurned);
+ this.NotifyOfPropertyChange(() => this.CanBeForced);
}
}
@@ -231,5 +223,51 @@ namespace HandBrake.ApplicationServices.Model.Encoding public string Track { get; set; }
#endregion
+
+ /// <summary>
+ /// Gets a value indicating whether CanForced.
+ /// </summary>
+ public bool CanBeForced
+ {
+ get
+ {
+ if (this.SourceTrack != null)
+ {
+ return this.SourceTrack.SubtitleType == SubtitleType.VobSub || this.SourceTrack.SubtitleType == SubtitleType.PGS
+ || this.SourceTrack.SubtitleType == SubtitleType.ForeignAudioSearch;
+ }
+
+ return false;
+ }
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether CanBeBurned.
+ /// </summary>
+ public bool CanBeBurned
+ {
+ get
+ {
+ if (this.SourceTrack != null)
+ {
+ return this.SourceTrack.SubtitleType == SubtitleType.VobSub || this.SourceTrack.SubtitleType == SubtitleType.PGS
+ || this.SourceTrack.SubtitleType == SubtitleType.ForeignAudioSearch || this.SourceTrack.SubtitleType == SubtitleType.SSA;
+ }
+
+ return false;
+ }
+ }
+
+
+ /// <summary>
+ /// Gets a value indicating whether this is an SRT subtitle.
+ /// </summary>
+ public bool IsSrtSubtitle
+ {
+ get
+ {
+ return this.SrtFileName != "-" && this.SrtFileName != null;
+ }
+ }
}
}
\ No newline at end of file diff --git a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs index bab41a9b8..8337ddd56 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs @@ -161,6 +161,9 @@ namespace HandBrake.ApplicationServices.Services {
preset.Task = update.Task;
preset.UsePictureFilters = update.UsePictureFilters;
+ preset.PictureSettingsMode = update.PictureSettingsMode;
+ preset.Category = update.Category;
+ preset.Description = update.Description;
// Update the presets file
this.UpdatePresetFiles();
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 0e508a7a2..7596919eb 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1227,6 +1227,33 @@ namespace HandBrakeWPF.ViewModels }
/// <summary>
+ /// Update a selected preset.
+ /// </summary>
+ public void PresetUpdate()
+ {
+ if (this.SelectedPreset == null)
+ {
+ this.errorService.ShowMessageBox(
+ "Please select a preset to update.", "No Preset selected", MessageBoxButton.OK, MessageBoxImage.Warning);
+
+ return;
+ }
+
+ if (this.SelectedPreset.IsBuildIn)
+ {
+ this.errorService.ShowMessageBox(
+ "You can not modify built in presets. Please select one of your own presets.", "No Preset selected", MessageBoxButton.OK, MessageBoxImage.Warning);
+ return;
+ }
+
+ this.SelectedPreset.Task = new EncodeTask(this.CurrentTask);
+ this.presetService.Update(this.SelectedPreset);
+
+ this.errorService.ShowMessageBox(
+ "The Preset has now been updated with your current settings.", "Preset Updated", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+
+ /// <summary>
/// Remove a Preset
/// </summary>
public void PresetRemove()
@@ -1475,6 +1502,8 @@ namespace HandBrakeWPF.ViewModels {
MessageBox.Show("There is no new updates at this time.", "No Update Available", MessageBoxButton.OK, MessageBoxImage.Information);
}
+
+ this.ProgramStatusLabel = "Ready";
}
#endregion
diff --git a/win/CS/HandBrakeWPF/Views/AudioView.xaml b/win/CS/HandBrakeWPF/Views/AudioView.xaml index ccc74e5cf..3741e3c07 100644 --- a/win/CS/HandBrakeWPF/Views/AudioView.xaml +++ b/win/CS/HandBrakeWPF/Views/AudioView.xaml @@ -116,7 +116,7 @@ <Grid Grid.Column="1" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="*" MaxWidth="300" />
+ <ColumnDefinition Width="*" MaxWidth="160" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
@@ -141,7 +141,7 @@ Text="Source" />
<ComboBox Grid.Column="1"
Height="22"
- MaxWidth="300"
+ MaxWidth="150"
Margin="5,0,5,0"
HorizontalAlignment="Stretch"
ItemsSource="{Binding DataContext.SourceTracks,
diff --git a/win/CS/HandBrakeWPF/Views/LogView.xaml b/win/CS/HandBrakeWPF/Views/LogView.xaml index 1d67ceae4..ec47ad556 100644 --- a/win/CS/HandBrakeWPF/Views/LogView.xaml +++ b/win/CS/HandBrakeWPF/Views/LogView.xaml @@ -14,7 +14,25 @@ <RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
- <ToolBar Grid.Row="0">
+ <ToolBar Grid.Row="0"
+ ToolBar.OverflowMode="Never"
+ ToolBarTray.IsLocked="True"
+ Loaded="ToolBarLoaded"
+ >
+
+
+ <TextBlock Margin="10,0,10,0"
+ VerticalAlignment="Center"
+ FontWeight="Bold"
+ Text="Choose Log:" />
+ <ComboBox Width="100"
+ HorizontalAlignment="Right"
+ ItemsSource="{Binding LogModes}"
+ SelectedIndex="{Binding SelectedMode}"
+ />
+
+ <Separator />
+
<Button cal:Message.Attach="[Event Click] = [Action CopyLog]">
<StackPanel Orientation="Horizontal">
<Image Width="16" Source="Images/copy.png" />
@@ -28,16 +46,6 @@ </StackPanel>
</Button>
- <Separator />
-
- <TextBlock Margin="10,0,10,0"
- VerticalAlignment="Center"
- FontWeight="Bold"
- Text="Choose Log:" />
- <ComboBox Width="100"
- HorizontalAlignment="Right"
- ItemsSource="{Binding LogModes}"
- SelectedIndex="{Binding SelectedMode}" />
</ToolBar>
<TextBox Grid.Row="1"
diff --git a/win/CS/HandBrakeWPF/Views/LogView.xaml.cs b/win/CS/HandBrakeWPF/Views/LogView.xaml.cs index 79a8986a9..d0bdaf0ee 100644 --- a/win/CS/HandBrakeWPF/Views/LogView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/LogView.xaml.cs @@ -10,15 +10,41 @@ namespace HandBrakeWPF.Views
{
using System.Windows;
+ using System.Windows.Controls;
/// <summary>
/// Interaction logic for LogView.xaml
/// </summary>
public partial class LogView : Window
{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="LogView"/> class.
+ /// </summary>
public LogView()
{
InitializeComponent();
}
+
+ /// <summary>
+ /// Hide the Toolbar Endplate.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void ToolBarLoaded(object sender, RoutedEventArgs e)
+ {
+ ToolBar toolBar = sender as ToolBar;
+ if (toolBar != null)
+ {
+ var overflowGrid = toolBar.Template.FindName("OverflowGrid", toolBar) as FrameworkElement;
+ if (overflowGrid != null)
+ {
+ overflowGrid.Visibility = Visibility.Collapsed;
+ }
+ }
+ }
}
}
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 1d00b3cf4..9efcf6dd7 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -530,6 +530,7 @@ SelectedItem="{Binding SelectedPreset, Mode=TwoWay}" BorderThickness="0,0,0,1"
BorderBrush="LightGray"
>
+
<ListBox.GroupStyle>
<GroupStyle ContainerStyle="{StaticResource ContainerStyle}"/>
</ListBox.GroupStyle>
@@ -600,6 +601,8 @@ </MenuItem.Header>
<MenuItem Header="Set Default" Micro:Message.Attach="[Event Click] = [Action PresetSetDefault]" />
<Separator />
+ <MenuItem Header="Update Selected Preset" Micro:Message.Attach="[Event Click] = [Action PresetUpdate]" />
+ <Separator />
<MenuItem Header="Import" Micro:Message.Attach="[Event Click] = [Action PresetImport]" />
<MenuItem Header="Export" Micro:Message.Attach="[Event Click] = [Action PresetExport]" />
<Separator />
diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml index 93f0ba7c5..d5a37afa6 100644 --- a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml +++ b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml @@ -134,6 +134,7 @@ <CheckBox Grid.Column="3"
Margin="5,0,5,0"
VerticalAlignment="Center"
+ IsEnabled="{Binding CanBeForced}"
IsChecked="{Binding Forced}"
Visibility="{Binding IsSrtSubtitle,
Converter={StaticResource booleanToVisConverter},
@@ -149,6 +150,7 @@ Margin="5,0,5,0"
VerticalAlignment="Center"
IsChecked="{Binding Burned}"
+ IsEnabled="{Binding CanBeBurned}"
Visibility="{Binding IsSrtSubtitle,
Converter={StaticResource booleanToVisConverter},
ConverterParameter=true}">
|