diff options
author | Kevin Kuehler <kkuehler@brave.com> | 2019-06-10 22:05:56 -0700 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-06-11 09:34:45 -0400 |
commit | a54f4adb8f28855e7a8e5f24072f4d969b3b674d (patch) | |
tree | d93d13caac01d4b5a90e9742b947fa590b3d2fbd /widgets | |
parent | 32f970e0531a0811392d2836773870acf649cf26 (diff) | |
download | aerc-a54f4adb8f28855e7a8e5f24072f4d969b3b674d.tar.gz |
lib/ui/tab: Add Replace method
Also expose a light wrapper method in aerc.go for tab replacement
Signed-off-by: Kevin Kuehler <kkuehler@brave.com>
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/aerc.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go index 5b1b151f..ae8319bc 100644 --- a/widgets/aerc.go +++ b/widgets/aerc.go @@ -218,6 +218,10 @@ func (aerc *Aerc) RemoveTab(tab ui.Drawable) { aerc.tabs.Remove(tab) } +func (aerc *Aerc) ReplaceTab(tabSrc ui.Drawable, tabTarget ui.Drawable, name string) { + aerc.tabs.Replace(tabSrc, tabTarget, name) +} + func (aerc *Aerc) NextTab() { next := aerc.tabs.Selected + 1 if next >= len(aerc.tabs.Tabs) { |