diff options
author | sr55 <[email protected]> | 2016-03-21 12:57:48 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2016-03-21 12:57:48 +0000 |
commit | a3e695dd5c0d23692ed0e99624723e39305cdd8d (patch) | |
tree | f0e35b49e53372022af3a78245668a76193230b4 /win/CS/HandBrakeWPF/Views | |
parent | 9e9167bb63f14f176913cc42521d45639512c15a (diff) |
WinGui: Some fixes and tidyup of the new logging code.
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r-- | win/CS/HandBrakeWPF/Views/LogView.xaml | 22 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/LogView.xaml.cs | 6 |
2 files changed, 26 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/Views/LogView.xaml b/win/CS/HandBrakeWPF/Views/LogView.xaml index 878fd430a..4745203ba 100644 --- a/win/CS/HandBrakeWPF/Views/LogView.xaml +++ b/win/CS/HandBrakeWPF/Views/LogView.xaml @@ -17,6 +17,7 @@ <RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
+
<ToolBar Grid.Row="0"
ToolBar.OverflowMode="Never"
ToolBarTray.IsLocked="True"
@@ -38,7 +39,26 @@ </ToolBar>
- <TextBox Grid.Row="2" ScrollViewer.VerticalScrollBarVisibility="Visible" TextWrapping="Wrap" x:Name="logText" />
+ <TextBox Grid.Row="2" ScrollViewer.VerticalScrollBarVisibility="Visible" TextWrapping="Wrap" x:Name="logText">
+
+ <TextBox.ContextMenu>
+ <ContextMenu>
+ <MenuItem Header="{x:Static Properties:ResourcesUI.LogView_CopyClipboard}" cal:Message.Attach="[Event Click] = [Action CopyLog]" >
+ <MenuItem.Icon>
+ <Image Width="16" Source="Images/copy.png" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="{x:Static Properties:ResourcesUI.LogView_OpenLogDir}" cal:Message.Attach="[Event Click] = [Action OpenLogDirectory]">
+ <MenuItem.Icon>
+ <Image Width="16" Source="Images/folder.png" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <Separator />
+ <MenuItem Header="Auto Scroll" IsCheckable="True" IsChecked="True" x:Name="AutoScroll" />
+
+ </ContextMenu>
+ </TextBox.ContextMenu>
+ </TextBox>
</Grid>
diff --git a/win/CS/HandBrakeWPF/Views/LogView.xaml.cs b/win/CS/HandBrakeWPF/Views/LogView.xaml.cs index af07ae509..2ab427752 100644 --- a/win/CS/HandBrakeWPF/Views/LogView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/LogView.xaml.cs @@ -77,7 +77,11 @@ namespace HandBrakeWPF.Views {
// This works better than Data Binding because of the scroll.
this.logText.AppendText(Environment.NewLine + e.Log.Content);
- this.logText.ScrollToEnd();
+
+ if (this.AutoScroll.IsChecked)
+ {
+ this.logText.ScrollToEnd();
+ }
}
}
|