diff options
Diffstat (limited to 'commands/msgview')
-rw-r--r-- | commands/msgview/close.go | 8 | ||||
-rw-r--r-- | commands/msgview/next-part.go | 8 | ||||
-rw-r--r-- | commands/msgview/next.go | 10 | ||||
-rw-r--r-- | commands/msgview/open-link.go | 8 | ||||
-rw-r--r-- | commands/msgview/open.go | 8 | ||||
-rw-r--r-- | commands/msgview/save.go | 14 | ||||
-rw-r--r-- | commands/msgview/toggle-headers.go | 8 | ||||
-rw-r--r-- | commands/msgview/toggle-key-passthrough.go | 8 |
8 files changed, 36 insertions, 36 deletions
diff --git a/commands/msgview/close.go b/commands/msgview/close.go index 5e4f3e92..428dc51f 100644 --- a/commands/msgview/close.go +++ b/commands/msgview/close.go @@ -3,7 +3,7 @@ package msgview import ( "errors" - "git.sr.ht/~rjarry/aerc/widgets" + "git.sr.ht/~rjarry/aerc/app" ) type Close struct{} @@ -16,15 +16,15 @@ func (Close) Aliases() []string { return []string{"close"} } -func (Close) Complete(aerc *widgets.Aerc, args []string) []string { +func (Close) Complete(aerc *app.Aerc, args []string) []string { return nil } -func (Close) Execute(aerc *widgets.Aerc, args []string) error { +func (Close) Execute(aerc *app.Aerc, args []string) error { if len(args) != 1 { return errors.New("Usage: close") } - mv, _ := aerc.SelectedTabContent().(*widgets.MessageViewer) + mv, _ := aerc.SelectedTabContent().(*app.MessageViewer) aerc.RemoveTab(mv, true) return nil } diff --git a/commands/msgview/next-part.go b/commands/msgview/next-part.go index 652dccb6..6f314991 100644 --- a/commands/msgview/next-part.go +++ b/commands/msgview/next-part.go @@ -4,7 +4,7 @@ import ( "fmt" "strconv" - "git.sr.ht/~rjarry/aerc/widgets" + "git.sr.ht/~rjarry/aerc/app" ) type NextPrevPart struct{} @@ -17,11 +17,11 @@ func (NextPrevPart) Aliases() []string { return []string{"next-part", "prev-part"} } -func (NextPrevPart) Complete(aerc *widgets.Aerc, args []string) []string { +func (NextPrevPart) Complete(aerc *app.Aerc, args []string) []string { return nil } -func (NextPrevPart) Execute(aerc *widgets.Aerc, args []string) error { +func (NextPrevPart) Execute(aerc *app.Aerc, args []string) error { if len(args) > 2 { return nextPrevPartUsage(args[0]) } @@ -35,7 +35,7 @@ func (NextPrevPart) Execute(aerc *widgets.Aerc, args []string) error { return nextPrevPartUsage(args[0]) } } - mv, _ := aerc.SelectedTabContent().(*widgets.MessageViewer) + mv, _ := aerc.SelectedTabContent().(*app.MessageViewer) for ; n > 0; n-- { if args[0] == "prev-part" { mv.PreviousPart() diff --git a/commands/msgview/next.go b/commands/msgview/next.go index cc7a5479..e647cc0d 100644 --- a/commands/msgview/next.go +++ b/commands/msgview/next.go @@ -4,10 +4,10 @@ import ( "errors" "fmt" + "git.sr.ht/~rjarry/aerc/app" "git.sr.ht/~rjarry/aerc/commands/account" "git.sr.ht/~rjarry/aerc/lib" "git.sr.ht/~rjarry/aerc/models" - "git.sr.ht/~rjarry/aerc/widgets" "git.sr.ht/~rjarry/aerc/worker/types" ) @@ -21,16 +21,16 @@ func (NextPrevMsg) Aliases() []string { return []string{"next", "next-message", "prev", "prev-message"} } -func (NextPrevMsg) Complete(aerc *widgets.Aerc, args []string) []string { +func (NextPrevMsg) Complete(aerc *app.Aerc, args []string) []string { return nil } -func (NextPrevMsg) Execute(aerc *widgets.Aerc, args []string) error { +func (NextPrevMsg) Execute(aerc *app.Aerc, args []string) error { n, pct, err := account.ParseNextPrevMessage(args) if err != nil { return err } - mv, _ := aerc.SelectedTabContent().(*widgets.MessageViewer) + mv, _ := aerc.SelectedTabContent().(*app.MessageViewer) acct := mv.SelectedAccount() if acct == nil { return errors.New("No account selected") @@ -51,7 +51,7 @@ func (NextPrevMsg) Execute(aerc *widgets.Aerc, args []string) error { aerc.PushError(err.Error()) return } - nextMv := widgets.NewMessageViewer(acct, view) + nextMv := app.NewMessageViewer(acct, view) aerc.ReplaceTab(mv, nextMv, nextMsg.Envelope.Subject, true) }) diff --git a/commands/msgview/open-link.go b/commands/msgview/open-link.go index da58b717..4052e3a6 100644 --- a/commands/msgview/open-link.go +++ b/commands/msgview/open-link.go @@ -5,10 +5,10 @@ import ( "fmt" "net/url" + "git.sr.ht/~rjarry/aerc/app" "git.sr.ht/~rjarry/aerc/commands" "git.sr.ht/~rjarry/aerc/lib" "git.sr.ht/~rjarry/aerc/log" - "git.sr.ht/~rjarry/aerc/widgets" ) type OpenLink struct{} @@ -21,8 +21,8 @@ func (OpenLink) Aliases() []string { return []string{"open-link"} } -func (OpenLink) Complete(aerc *widgets.Aerc, args []string) []string { - mv := aerc.SelectedTabContent().(*widgets.MessageViewer) +func (OpenLink) Complete(aerc *app.Aerc, args []string) []string { + mv := aerc.SelectedTabContent().(*app.MessageViewer) if mv != nil { if p := mv.SelectedMessagePart(); p != nil { return commands.CompletionFromList(aerc, p.Links, args) @@ -31,7 +31,7 @@ func (OpenLink) Complete(aerc *widgets.Aerc, args []string) []string { return nil } -func (OpenLink) Execute(aerc *widgets.Aerc, args []string) error { +func (OpenLink) Execute(aerc *app.Aerc, args []string) error { if len(args) < 2 { return errors.New("Usage: open-link <url> [program [args...]]") } diff --git a/commands/msgview/open.go b/commands/msgview/open.go index b66456cc..1f74bc7a 100644 --- a/commands/msgview/open.go +++ b/commands/msgview/open.go @@ -9,9 +9,9 @@ import ( "git.sr.ht/~sircmpwn/getopt" + "git.sr.ht/~rjarry/aerc/app" "git.sr.ht/~rjarry/aerc/lib" "git.sr.ht/~rjarry/aerc/log" - "git.sr.ht/~rjarry/aerc/widgets" ) type Open struct{} @@ -28,11 +28,11 @@ func (Open) Aliases() []string { return []string{"open"} } -func (Open) Complete(aerc *widgets.Aerc, args []string) []string { +func (Open) Complete(aerc *app.Aerc, args []string) []string { return nil } -func (o Open) Execute(aerc *widgets.Aerc, args []string) error { +func (o Open) Execute(aerc *app.Aerc, args []string) error { opts, optind, err := getopt.Getopts(args, o.Options()) if err != nil { return err @@ -46,7 +46,7 @@ func (o Open) Execute(aerc *widgets.Aerc, args []string) error { } } - mv := aerc.SelectedTabContent().(*widgets.MessageViewer) + mv := aerc.SelectedTabContent().(*app.MessageViewer) if mv == nil { return errors.New("open only supported selected message parts") } diff --git a/commands/msgview/save.go b/commands/msgview/save.go index 1ffdaf92..4d914e3e 100644 --- a/commands/msgview/save.go +++ b/commands/msgview/save.go @@ -11,12 +11,12 @@ import ( "git.sr.ht/~sircmpwn/getopt" + "git.sr.ht/~rjarry/aerc/app" "git.sr.ht/~rjarry/aerc/commands" "git.sr.ht/~rjarry/aerc/config" "git.sr.ht/~rjarry/aerc/lib/xdg" "git.sr.ht/~rjarry/aerc/log" "git.sr.ht/~rjarry/aerc/models" - "git.sr.ht/~rjarry/aerc/widgets" ) type Save struct{} @@ -33,7 +33,7 @@ func (Save) Aliases() []string { return []string{"save"} } -func (s Save) Complete(aerc *widgets.Aerc, args []string) []string { +func (s Save) Complete(aerc *app.Aerc, args []string) []string { trimmed := commands.Operands(args, s.Options()) path := strings.Join(trimmed, " ") defaultPath := config.General.DefaultSavePath @@ -51,7 +51,7 @@ type saveParams struct { allAttachments bool } -func (s Save) Execute(aerc *widgets.Aerc, args []string) error { +func (s Save) Execute(aerc *app.Aerc, args []string) error { opts, optind, err := getopt.Getopts(args, s.Options()) if err != nil { return err @@ -100,7 +100,7 @@ func (s Save) Execute(aerc *widgets.Aerc, args []string) error { path = xdg.ExpandHome(path) - mv, ok := aerc.SelectedTabContent().(*widgets.MessageViewer) + mv, ok := aerc.SelectedTabContent().(*app.MessageViewer) if !ok { return fmt.Errorf("SelectedTabContent is not a MessageViewer") } @@ -125,10 +125,10 @@ func (s Save) Execute(aerc *widgets.Aerc, args []string) error { } func savePart( - pi *widgets.PartInfo, + pi *app.PartInfo, path string, - mv *widgets.MessageViewer, - aerc *widgets.Aerc, + mv *app.MessageViewer, + aerc *app.Aerc, params *saveParams, names map[string]struct{}, ) error { diff --git a/commands/msgview/toggle-headers.go b/commands/msgview/toggle-headers.go index 1a593494..0bb834a9 100644 --- a/commands/msgview/toggle-headers.go +++ b/commands/msgview/toggle-headers.go @@ -3,7 +3,7 @@ package msgview import ( "fmt" - "git.sr.ht/~rjarry/aerc/widgets" + "git.sr.ht/~rjarry/aerc/app" ) type ToggleHeaders struct{} @@ -16,15 +16,15 @@ func (ToggleHeaders) Aliases() []string { return []string{"toggle-headers"} } -func (ToggleHeaders) Complete(aerc *widgets.Aerc, args []string) []string { +func (ToggleHeaders) Complete(aerc *app.Aerc, args []string) []string { return nil } -func (ToggleHeaders) Execute(aerc *widgets.Aerc, args []string) error { +func (ToggleHeaders) Execute(aerc *app.Aerc, args []string) error { if len(args) > 1 { return toggleHeadersUsage(args[0]) } - mv, _ := aerc.SelectedTabContent().(*widgets.MessageViewer) + mv, _ := aerc.SelectedTabContent().(*app.MessageViewer) mv.ToggleHeaders() return nil } diff --git a/commands/msgview/toggle-key-passthrough.go b/commands/msgview/toggle-key-passthrough.go index 00a39559..7e24329a 100644 --- a/commands/msgview/toggle-key-passthrough.go +++ b/commands/msgview/toggle-key-passthrough.go @@ -3,8 +3,8 @@ package msgview import ( "errors" + "git.sr.ht/~rjarry/aerc/app" "git.sr.ht/~rjarry/aerc/lib/state" - "git.sr.ht/~rjarry/aerc/widgets" ) type ToggleKeyPassthrough struct{} @@ -17,15 +17,15 @@ func (ToggleKeyPassthrough) Aliases() []string { return []string{"toggle-key-passthrough"} } -func (ToggleKeyPassthrough) Complete(aerc *widgets.Aerc, args []string) []string { +func (ToggleKeyPassthrough) Complete(aerc *app.Aerc, args []string) []string { return nil } -func (ToggleKeyPassthrough) Execute(aerc *widgets.Aerc, args []string) error { +func (ToggleKeyPassthrough) Execute(aerc *app.Aerc, args []string) error { if len(args) != 1 { return errors.New("Usage: toggle-key-passthrough") } - mv, _ := aerc.SelectedTabContent().(*widgets.MessageViewer) + mv, _ := aerc.SelectedTabContent().(*app.MessageViewer) keyPassthroughEnabled := mv.ToggleKeyPassthrough() if acct := mv.SelectedAccount(); acct != nil { acct.SetStatus(state.Passthrough(keyPassthroughEnabled)) |