enhance: change the default action to deal with local changes on pull/checkout/create new branch to Do Nothing (#185)

This commit is contained in:
leo 2024-06-19 15:29:40 +08:00
parent a168b05ac6
commit a717e48a29
No known key found for this signature in database
7 changed files with 18 additions and 18 deletions

View file

@ -2,8 +2,8 @@
{
public enum DealWithLocalChanges
{
DoNothing,
StashAndReaply,
Discard,
DoNothing,
}
}

View file

@ -78,6 +78,6 @@ namespace SourceGit.ViewModels
}
private readonly Repository _repo = null;
private Models.DealWithLocalChanges _preAction = Models.DealWithLocalChanges.StashAndReaply;
private Models.DealWithLocalChanges _preAction = Models.DealWithLocalChanges.DoNothing;
}
}

View file

@ -138,6 +138,6 @@ namespace SourceGit.ViewModels
private readonly Repository _repo = null;
private string _name = null;
private readonly string _baseOnRevision = null;
private Models.DealWithLocalChanges _preAction = Models.DealWithLocalChanges.StashAndReaply;
private Models.DealWithLocalChanges _preAction = Models.DealWithLocalChanges.DoNothing;
}
}

View file

@ -162,6 +162,6 @@ namespace SourceGit.ViewModels
private Models.Remote _selectedRemote = null;
private List<Models.Branch> _remoteBranches = null;
private Models.Branch _selectedBranch = null;
private Models.DealWithLocalChanges _preAction = Models.DealWithLocalChanges.StashAndReaply;
private Models.DealWithLocalChanges _preAction = Models.DealWithLocalChanges.DoNothing;
}
}

View file

@ -32,17 +32,17 @@
<ac:EnumToBoolConverter x:Key="EnumToBoolConverter"/>
</StackPanel.Resources>
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.DoNothing}"
GroupName="LocalChanges"
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.DoNothing}}"/>
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.StashAndReply}"
GroupName="LocalChanges"
Margin="8,0,0,0"
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.StashAndReaply}}"/>
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.Discard}"
GroupName="LocalChanges"
Margin="8,0,0,0"
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.Discard}}"/>
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.DoNothing}"
GroupName="LocalChanges"
Margin="8,0,0,0"
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.DoNothing}}"/>
</StackPanel>
</Grid>
</StackPanel>

View file

@ -66,17 +66,17 @@
<ac:EnumToBoolConverter x:Key="EnumToBoolConverter"/>
</StackPanel.Resources>
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.DoNothing}"
GroupName="LocalChanges"
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.DoNothing}}"/>
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.StashAndReply}"
GroupName="LocalChanges"
Margin="8,0,0,0"
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.StashAndReaply}}"/>
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.Discard}"
GroupName="LocalChanges"
Margin="8,0,0,0"
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.Discard}}"/>
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.DoNothing}"
GroupName="LocalChanges"
Margin="8,0,0,0"
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.DoNothing}}"/>
</StackPanel>
<CheckBox Grid.Row="3" Grid.Column="1"

View file

@ -72,17 +72,17 @@
<ac:EnumToBoolConverter x:Key="EnumToBoolConverter"/>
</StackPanel.Resources>
<RadioButton Content="{DynamicResource Text.Pull.LocalChanges.DoNothing}"
GroupName="LocalChanges"
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.DoNothing}}"/>
<RadioButton Content="{DynamicResource Text.Pull.LocalChanges.StashAndReply}"
GroupName="LocalChanges"
Margin="8,0,0,0"
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.StashAndReaply}}"/>
<RadioButton Content="{DynamicResource Text.Pull.LocalChanges.Discard}"
GroupName="LocalChanges"
Margin="8,0,0,0"
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.Discard}}"/>
<RadioButton Content="{DynamicResource Text.Pull.LocalChanges.DoNothing}"
GroupName="LocalChanges"
Margin="8,0,0,0"
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.DoNothing}}"/>
</StackPanel>
<CheckBox Grid.Row="4" Grid.Column="1"