mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00:00
code_review: PR #98
* remove the `Leave` option (it may lead to an undefined behaviour), so user can only choose `Stash & reapply` or `Discard`. * re-design the UI * remove unused resources
This commit is contained in:
parent
927a1cab24
commit
776605cb68
7 changed files with 75 additions and 89 deletions
|
@ -447,10 +447,7 @@ namespace SourceGit.ViewModels
|
|||
checkout.Icon = App.CreateMenuIcon("Icons.Check");
|
||||
checkout.Click += (o, e) =>
|
||||
{
|
||||
if (PopupHost.CanCreatePopup())
|
||||
{
|
||||
Checkout.ShowPopup(_repo, branch.Name);
|
||||
}
|
||||
_repo.CheckoutLocalBranch(branch.Name);
|
||||
e.Handled = true;
|
||||
};
|
||||
submenu.Items.Add(checkout);
|
||||
|
@ -526,16 +523,16 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
if (b.IsLocal && b.Upstream == branch.FullName)
|
||||
{
|
||||
if (b.IsCurrent)
|
||||
return;
|
||||
if (PopupHost.CanCreatePopup())
|
||||
Checkout.ShowPopup(_repo, b.Name);
|
||||
if (!b.IsCurrent)
|
||||
_repo.CheckoutLocalBranch(b.Name);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (PopupHost.CanCreatePopup())
|
||||
PopupHost.ShowPopup(new CreateBranch(_repo, branch));
|
||||
|
||||
e.Handled = true;
|
||||
};
|
||||
submenu.Items.Add(checkout);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue