diff options
author | Robin Jarry <robin@jarry.cc> | 2023-10-09 13:52:20 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-10-10 11:37:56 +0200 |
commit | 598e4a5803578ab3e291f232d6aad31b4efd8ea4 (patch) | |
tree | c55e16d60e2c3eea2d6de27d1bac18db5670ec77 /commands/msg/pipe.go | |
parent | 61bca76423ee87bd59084a146eca71c6bae085e1 (diff) | |
download | aerc-598e4a5803578ab3e291f232d6aad31b4efd8ea4.tar.gz |
widgets: rename package to app
This is the central point of all aerc. Having it named widgets is
confusing. Rename it to app. It will make a cleaner transition when
making the app.Aerc object available globally in the next commit.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'commands/msg/pipe.go')
-rw-r--r-- | commands/msg/pipe.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/commands/msg/pipe.go b/commands/msg/pipe.go index fc1ac8f8..e8c1e277 100644 --- a/commands/msg/pipe.go +++ b/commands/msg/pipe.go @@ -9,9 +9,9 @@ import ( "sort" "time" + "git.sr.ht/~rjarry/aerc/app" "git.sr.ht/~rjarry/aerc/commands" "git.sr.ht/~rjarry/aerc/log" - "git.sr.ht/~rjarry/aerc/widgets" mboxer "git.sr.ht/~rjarry/aerc/worker/mbox" "git.sr.ht/~rjarry/aerc/worker/types" @@ -28,11 +28,11 @@ func (Pipe) Aliases() []string { return []string{"pipe"} } -func (Pipe) Complete(aerc *widgets.Aerc, args []string) []string { +func (Pipe) Complete(aerc *app.Aerc, args []string) []string { return nil } -func (Pipe) Execute(aerc *widgets.Aerc, args []string) error { +func (Pipe) Execute(aerc *app.Aerc, args []string) error { var ( background bool pipeFull bool @@ -64,11 +64,11 @@ func (Pipe) Execute(aerc *widgets.Aerc, args []string) error { return errors.New("Usage: pipe [-mp] <cmd> [args...]") } - provider := aerc.SelectedTabContent().(widgets.ProvidesMessage) + provider := aerc.SelectedTabContent().(app.ProvidesMessage) if !pipeFull && !pipePart { - if _, ok := provider.(*widgets.MessageViewer); ok { + if _, ok := provider.(*app.MessageViewer); ok { pipePart = true - } else if _, ok := provider.(*widgets.AccountView); ok { + } else if _, ok := provider.(*app.AccountView); ok { pipeFull = true } else { return errors.New( @@ -123,7 +123,7 @@ func (Pipe) Execute(aerc *widgets.Aerc, args []string) error { h := newHelper(aerc) store, err := h.store() if err != nil { - if mv, ok := provider.(*widgets.MessageViewer); ok { + if mv, ok := provider.(*app.MessageViewer); ok { mv.MessageView().FetchFull(func(reader io.Reader) { if background { doExec(reader) @@ -209,7 +209,7 @@ func (Pipe) Execute(aerc *widgets.Aerc, args []string) error { } }() } else if pipePart { - mv, ok := provider.(*widgets.MessageViewer) + mv, ok := provider.(*app.MessageViewer) if !ok { return fmt.Errorf("can only pipe message part from a message view") } |