mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-25 06:04:59 +00:00
feature: add powershell support for Windows
This commit is contained in:
parent
8f70778ec2
commit
4ac705f8ca
13 changed files with 88 additions and 46 deletions
|
@ -231,7 +231,7 @@
|
|||
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.Git}"/>
|
||||
</TabItem.Header>
|
||||
|
||||
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32,32" ColumnDefinitions="Auto,*">
|
||||
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32,Auto,32" ColumnDefinitions="Auto,*">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
Text="{DynamicResource Text.Preference.Git.Path}"
|
||||
HorizontalAlignment="Right"
|
||||
|
@ -310,6 +310,12 @@
|
|||
</ComboBox>
|
||||
|
||||
<CheckBox Grid.Row="6" Grid.Column="1"
|
||||
Height="32"
|
||||
Content="{DynamicResource Text.Preference.Git.UsePowershellOnWindows}"
|
||||
IsChecked="{Binding UsePowershellOnWindows, Mode=TwoWay}"
|
||||
IsVisible="{OnPlatform False, Windows=True}"/>
|
||||
|
||||
<CheckBox Grid.Row="7" Grid.Column="1"
|
||||
Content="{DynamicResource Text.Preference.Git.AutoFetch}"
|
||||
IsChecked="{Binding GitAutoFetch, Mode=TwoWay}"/>
|
||||
</Grid>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<Path Width="13" Height="13" Data="{StaticResource Icons.Terminal}"/>
|
||||
</Button>
|
||||
|
||||
<Button Classes="icon_button" Width="32" Click="OnOpenWithExternalEditor" ToolTip.Tip="{DynamicResource Text.Repository.OpenWithExternalTools}">
|
||||
<Button Classes="icon_button" Width="32" Click="OnOpenWithExternalTools" ToolTip.Tip="{DynamicResource Text.Repository.OpenWithExternalTools}">
|
||||
<Path Width="13" Height="13" Data="{StaticResource Icons.OpenWith}"/>
|
||||
</Button>
|
||||
|
||||
|
|
|
@ -61,11 +61,11 @@ namespace SourceGit.Views
|
|||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void OnOpenWithExternalEditor(object sender, RoutedEventArgs e)
|
||||
private void OnOpenWithExternalTools(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is Button button && DataContext is ViewModels.Repository repo)
|
||||
{
|
||||
var menu = repo.CreateContextMenuForExternalEditors();
|
||||
var menu = repo.CreateContextMenuForExternalTools();
|
||||
if (menu != null)
|
||||
{
|
||||
menu.Open(button);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue