mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -08:00
ux: re-order context menu items for selected multiple branches
This commit is contained in:
parent
fec13cdc87
commit
50892f7401
1 changed files with 11 additions and 9 deletions
|
@ -399,15 +399,6 @@ namespace SourceGit.Views
|
||||||
else if (branches.Find(x => x.IsCurrent) == null)
|
else if (branches.Find(x => x.IsCurrent) == null)
|
||||||
{
|
{
|
||||||
var menu = new ContextMenu();
|
var menu = new ContextMenu();
|
||||||
var deleteMulti = new MenuItem();
|
|
||||||
deleteMulti.Header = App.Text("BranchCM.DeleteMultiBranches", branches.Count);
|
|
||||||
deleteMulti.Icon = App.CreateMenuIcon("Icons.Clear");
|
|
||||||
deleteMulti.Click += (_, ev) =>
|
|
||||||
{
|
|
||||||
repo.DeleteMultipleBranches(branches, branches[0].IsLocal);
|
|
||||||
ev.Handled = true;
|
|
||||||
};
|
|
||||||
menu.Items.Add(deleteMulti);
|
|
||||||
|
|
||||||
var mergeMulti = new MenuItem();
|
var mergeMulti = new MenuItem();
|
||||||
mergeMulti.Header = App.Text("BranchCM.MergeMultiBranches", branches.Count);
|
mergeMulti.Header = App.Text("BranchCM.MergeMultiBranches", branches.Count);
|
||||||
|
@ -418,6 +409,17 @@ namespace SourceGit.Views
|
||||||
ev.Handled = true;
|
ev.Handled = true;
|
||||||
};
|
};
|
||||||
menu.Items.Add(mergeMulti);
|
menu.Items.Add(mergeMulti);
|
||||||
|
menu.Items.Add(new MenuItem() { Header = "-" });
|
||||||
|
|
||||||
|
var deleteMulti = new MenuItem();
|
||||||
|
deleteMulti.Header = App.Text("BranchCM.DeleteMultiBranches", branches.Count);
|
||||||
|
deleteMulti.Icon = App.CreateMenuIcon("Icons.Clear");
|
||||||
|
deleteMulti.Click += (_, ev) =>
|
||||||
|
{
|
||||||
|
repo.DeleteMultipleBranches(branches, branches[0].IsLocal);
|
||||||
|
ev.Handled = true;
|
||||||
|
};
|
||||||
|
menu.Items.Add(deleteMulti);
|
||||||
|
|
||||||
menu?.Open(this);
|
menu?.Open(this);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue