diff options
author | Jeffas <dev@jeffas.io> | 2020-03-02 19:54:42 +0000 |
---|---|---|
committer | Reto Brunner <reto@labrat.space> | 2020-03-03 20:08:29 +0100 |
commit | 68f179021d304d6edf939ecf5fc7d0d073b16152 (patch) | |
tree | 0ba86642579bfc7fa87ce38473ce234208277336 /widgets/aerc.go | |
parent | 2e381fa42d64442262335101fe3b7bf76ab50b92 (diff) | |
download | aerc-68f179021d304d6edf939ecf5fc7d0d073b16152.tar.gz |
Add move-tab command
Diffstat (limited to 'widgets/aerc.go')
-rw-r--r-- | widgets/aerc.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go index a0e356ad..a9be47ec 100644 --- a/widgets/aerc.go +++ b/widgets/aerc.go @@ -283,6 +283,14 @@ func (aerc *Aerc) SelectedTab() ui.Drawable { return aerc.tabs.Tabs[aerc.tabs.Selected].Content } +func (aerc *Aerc) SelectedTabIndex() int { + return aerc.tabs.Selected +} + +func (aerc *Aerc) NumTabs() int { + return len(aerc.tabs.Tabs) +} + func (aerc *Aerc) NewTab(clickable ui.Drawable, name string) *ui.Tab { tab := aerc.tabs.Add(clickable, name) aerc.tabs.Select(len(aerc.tabs.Tabs) - 1) @@ -297,6 +305,10 @@ func (aerc *Aerc) ReplaceTab(tabSrc ui.Drawable, tabTarget ui.Drawable, name str aerc.tabs.Replace(tabSrc, tabTarget, name) } +func (aerc *Aerc) MoveTab(i int) { + aerc.tabs.MoveTab(i) +} + func (aerc *Aerc) NextTab() { aerc.tabs.NextTab() } |