widget: Add ProvidesMessage interface
Consists of 3 functions * Store: Access to MessageStore type * SelectedAccount: Access to Account widget that the target widget belongs to * SelectedMessage: Current message (selected in msglist or the one we are viewing) Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
This commit is contained in:
parent
2be985fecb
commit
753adb9069
10 changed files with 93 additions and 18 deletions
3
aerc.go
3
aerc.go
|
@ -13,6 +13,7 @@ import (
|
|||
"git.sr.ht/~sircmpwn/aerc/commands"
|
||||
"git.sr.ht/~sircmpwn/aerc/commands/account"
|
||||
"git.sr.ht/~sircmpwn/aerc/commands/compose"
|
||||
"git.sr.ht/~sircmpwn/aerc/commands/msg"
|
||||
"git.sr.ht/~sircmpwn/aerc/commands/msgview"
|
||||
"git.sr.ht/~sircmpwn/aerc/commands/terminal"
|
||||
"git.sr.ht/~sircmpwn/aerc/config"
|
||||
|
@ -25,6 +26,7 @@ func getCommands(selected libui.Drawable) []*commands.Commands {
|
|||
case *widgets.AccountView:
|
||||
return []*commands.Commands{
|
||||
account.AccountCommands,
|
||||
msg.MessageCommands,
|
||||
commands.GlobalCommands,
|
||||
}
|
||||
case *widgets.Composer:
|
||||
|
@ -35,6 +37,7 @@ func getCommands(selected libui.Drawable) []*commands.Commands {
|
|||
case *widgets.MessageViewer:
|
||||
return []*commands.Commands{
|
||||
msgview.MessageViewCommands,
|
||||
msg.MessageCommands,
|
||||
commands.GlobalCommands,
|
||||
}
|
||||
case *widgets.Terminal:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue