feature<PageTabBar>: add context menu to close tabs and modify bookmarks

This commit is contained in:
Jai 2021-08-19 08:58:41 +08:00
parent 232c209079
commit 602f934fae
6 changed files with 107 additions and 1 deletions

View file

@ -15,6 +15,14 @@ namespace SourceGit.Views {
Models.Watcher.Opened += OpenRepository;
InitializeComponent();
tabs.Add();
tabs.OnTabEdited += (t) => {
foreach (var tab in tabs.Tabs) {
if (!tab.IsWelcomePage) continue;
var page = container.Get(tab.Id) as Widgets.Welcome;
if (page != null) page.UpdateNodes(t.Id, t.Bookmark);
}
};
}
private void OnClosing(object sender, CancelEventArgs e) {