From c841f36513ffdaffbf4b68e5f108c97a45745092 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Mon, 18 Jul 2022 12:54:55 +0200 Subject: tabs: rename SelectedTab to SelectedTabContent This function returns an ui.Drawable. Use a more explicit name. This prepares for adding a new SelectedTab function which will return an ui.Tab. Signed-off-by: Robin Jarry Acked-by: Koni Marti --- widgets/aerc.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'widgets/aerc.go') diff --git a/widgets/aerc.go b/widgets/aerc.go index 58956467..f480b34c 100644 --- a/widgets/aerc.go +++ b/widgets/aerc.go @@ -192,7 +192,7 @@ func (aerc *Aerc) getBindings() *config.KeyBindings { if aerc.SelectedAccount() != nil { selectedAccountName = aerc.SelectedAccount().acct.Name } - switch view := aerc.SelectedTab().(type) { + switch view := aerc.SelectedTabContent().(type) { case *AccountView: binds := aerc.conf.MergeContextualBinds(aerc.conf.Bindings.MessageList, config.BIND_CONTEXT_ACCOUNT, selectedAccountName, "messages") return aerc.conf.MergeContextualBinds(binds, config.BIND_CONTEXT_FOLDER, view.SelectedDirectory(), "messages") @@ -310,7 +310,7 @@ func (aerc *Aerc) Logger() *log.Logger { } func (aerc *Aerc) SelectedAccount() *AccountView { - return aerc.account(aerc.SelectedTab()) + return aerc.account(aerc.SelectedTabContent()) } func (aerc *Aerc) account(d ui.Drawable) *AccountView { @@ -333,7 +333,7 @@ func (aerc *Aerc) SelectedAccountUiConfig() *config.UIConfig { return acct.UiConfig() } -func (aerc *Aerc) SelectedTab() ui.Drawable { +func (aerc *Aerc) SelectedTabContent() ui.Drawable { if aerc.NumTabs() == 0 || aerc.SelectedTabIndex() >= aerc.NumTabs() { return nil } -- cgit