summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views
diff options
context:
space:
mode:
authorsr55 <[email protected]>2019-04-19 22:15:26 +0100
committersr55 <[email protected]>2019-04-19 22:15:41 +0100
commit4f82301770f47c6601115d88c3ff5d69119ac1e2 (patch)
treeb4078ff42035c70c80835e9a6ead2281357be51b /win/CS/HandBrakeWPF/Views
parent97dabfbc19ebf3eaeb86337cc1114ab372a6c0ec (diff)
WinGui: Various fixes and improvements to validation handling and options in the UI.
- Fixed add to queue error handling on 2 code paths that ignored errors returned. - AutoName will now guarantee a unique filename rather than stop after the first attempt. - Options Pane now lists the available format and path variables that can be used in the UI (rather than the tooltip) - Ordering of validation rules changed to be more sensible, especially when handling paths that end up same as source.
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml.cs2
-rw-r--r--win/CS/HandBrakeWPF/Views/OptionsView.xaml22
2 files changed, 14 insertions, 10 deletions
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs
index 01acb6aa3..cdcbc65ef 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs
@@ -61,7 +61,7 @@ namespace HandBrakeWPF.Views
}
// Otherwise assume it's a main area click and add to queue.
- ((IMainViewModel)this.DataContext).AddToQueue();
+ ((IMainViewModel)this.DataContext).AddToQueueWithErrorHandling();
}
private void TabControl_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
index b98bf35c3..271b97421 100644
--- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml
+++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
@@ -218,25 +218,29 @@
<Grid Margin="0,5,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
- <RowDefinition Height="5"/>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="7"/>
<RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock VerticalAlignment="Center" Text="{x:Static Properties:Resources.Options_DefaultPath}" Grid.Column="0" Grid.Row="0" />
<TextBox Name="autoNameOutputPath" Text="{Binding AutoNameDefaultPath}" Width="380" Grid.Column="1" Grid.Row="0"
- ToolTip="{x:Static Properties:Resources.Options_DefaultPathAdditionalParams}" />
- <Button Content="Browse" Margin="5,0,0,0" Grid.Column="2" Grid.Row="0"
- cal:Message.Attach="[Event Click] = [Action BrowseAutoNamePath]" />
-
- <TextBlock VerticalAlignment="Center" Text="{x:Static Properties:Resources.Options_Format}" Grid.Column="0" Grid.Row="2" Margin="0,5,0,0" />
- <TextBox Name="autoNameFormat" Text="{Binding AutonameFormat, UpdateSourceTrigger=PropertyChanged}" Width="380" Grid.Column="1" Grid.Row="2" Margin="0,0,0,0"
- ToolTip="{x:Static Properties:Resources.Options_AdditionalFormatOptions}" />
+ ToolTip="{x:Static Properties:Resources.Options_DefaultPathAdditionalParams}" HorizontalAlignment="Left" />
+ <Button Content="Browse" Margin="5,0,0,0" Grid.Column="2" Grid.Row="0" cal:Message.Attach="[Event Click] = [Action BrowseAutoNamePath]" HorizontalAlignment="Left" />
+ <TextBlock Text="{x:Static Properties:Resources.OptionsView_PathOptions}" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" FontStyle="Italic" FontSize="11" TextWrapping="Wrap" />
+
+ <TextBlock VerticalAlignment="Center" Text="{x:Static Properties:Resources.Options_Format}" Grid.Column="0" Grid.Row="3" Margin="0,5,0,0" />
+ <TextBox Name="autoNameFormat" Text="{Binding AutonameFormat, UpdateSourceTrigger=PropertyChanged}" Width="380" Grid.Column="1" Grid.Row="3" Margin="0,0,0,0"
+ ToolTip="{x:Static Properties:Resources.Options_AdditionalFormatOptions}" HorizontalAlignment="Left" />
+ <TextBlock Text="{x:Static Properties:Resources.OptionsView_FormatOptions}" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" FontStyle="Italic" FontSize="11" TextWrapping="Wrap" />
</Grid>
<StackPanel Orientation="Vertical" Margin="0,15,0,0">