feature: supports custom actions (#638)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-11-01 17:23:31 +08:00
parent 7c5de7e48c
commit a36058ec51
No known key found for this signature in database
17 changed files with 478 additions and 2 deletions

View file

@ -91,6 +91,17 @@ namespace SourceGit.Views
e.Handled = true;
}
private void OpenCustomActionMenu(object sender, RoutedEventArgs e)
{
if (DataContext is ViewModels.Repository repo)
{
var menu = repo.CreateContextMenuForCustomAction();
(sender as Control)?.OpenContextMenu(menu);
}
e.Handled = true;
}
}
}