diff options
author | sr55 <[email protected]> | 2012-06-30 17:37:25 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-06-30 17:37:25 +0000 |
commit | 02b77f3bc692e0d059c29ea907393fda31a3790b (patch) | |
tree | 2ace8eeb52e34d1f181d834e2392f859d6751cb0 /win/CS/HandBrakeWPF/Views | |
parent | ca023df6b2119d7bf29ade5c07f644fdf2de8731 (diff) |
WinGui: Assorted fixes.
- Implementation of CanBeBurned and CanBeForced on the subtitles panel.
- Save updates to user presets from the Presets Options Menu. (Can use Add Preset to overwrite preset configuration instead also)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4800 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-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 |
5 files changed, 52 insertions, 13 deletions
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}">
|