aboutsummaryrefslogtreecommitdiff
path: root/widgets/aerc.go
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/aerc.go')
-rw-r--r--widgets/aerc.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index a968ab1..49a61bd 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -139,12 +139,20 @@ func (aerc *Aerc) SelectedAccount() *AccountView {
return acct
}
+func (aerc *Aerc) SelectedTab() ui.Drawable {
+ return aerc.tabs.Tabs[aerc.tabs.Selected].Content
+}
+
func (aerc *Aerc) NewTab(drawable ui.Drawable, name string) *ui.Tab {
tab := aerc.tabs.Add(drawable, name)
aerc.tabs.Select(len(aerc.tabs.Tabs) - 1)
return tab
}
+func (aerc *Aerc) RemoveTab(tab ui.Drawable) {
+ aerc.tabs.Remove(tab)
+}
+
func (aerc *Aerc) NextTab() {
next := aerc.tabs.Selected + 1
if next >= len(aerc.tabs.Tabs) {