code_style: make geometry icon resources list in order

This commit is contained in:
leo 2024-06-26 15:51:49 +08:00
parent 773eb9501f
commit d2e3b683f1
No known key found for this signature in database
5 changed files with 117 additions and 117 deletions

View file

@ -796,6 +796,27 @@ namespace SourceGit.ViewModels
PopupHost.ShowAndStartPopup(new UpdateSubmodules(this));
}
public void OpenSubmodule(string submodule)
{
var root = Path.GetFullPath(Path.Combine(_fullpath, submodule));
var gitDir = new Commands.QueryGitDir(root).Result();
var repo = Preference.AddRepository(root, gitDir);
var node = new RepositoryNode()
{
Id = repo.FullPath,
Name = Path.GetFileName(repo.FullPath),
Bookmark = 0,
IsRepository = true,
};
var launcher = App.GetTopLevel().DataContext as Launcher;
if (launcher != null)
{
launcher.OpenRepositoryInTab(node, null);
}
}
public ContextMenu CreateContextMenuForGitFlow()
{
var menu = new ContextMenu();
@ -1155,7 +1176,7 @@ namespace SourceGit.ViewModels
{
var finish = new MenuItem();
finish.Header = new Views.NameHighlightedTextBlock("BranchCM.Finish", branch.Name);
finish.Icon = App.CreateMenuIcon("Icons.Flow");
finish.Icon = App.CreateMenuIcon("Icons.GitFlow");
finish.Click += (o, e) =>
{
if (PopupHost.CanCreatePopup())
@ -1576,27 +1597,6 @@ namespace SourceGit.ViewModels
return menu;
}
public void OpenSubmodule(string submodule)
{
var root = Path.GetFullPath(Path.Combine(_fullpath, submodule));
var gitDir = new Commands.QueryGitDir(root).Result();
var repo = Preference.AddRepository(root, gitDir);
var node = new RepositoryNode()
{
Id = repo.FullPath,
Name = Path.GetFileName(repo.FullPath),
Bookmark = 0,
IsRepository = true,
};
var launcher = App.GetTopLevel().DataContext as Launcher;
if (launcher != null)
{
launcher.OpenRepositoryInTab(node, null);
}
}
public ContextMenu CreateContextMenuForSubmodule(string submodule)
{
var open = new MenuItem();