summaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/account-wizard.go10
-rw-r--r--widgets/aerc.go9
2 files changed, 6 insertions, 13 deletions
diff --git a/widgets/account-wizard.go b/widgets/account-wizard.go
index d7b46b9..e9bd843 100644
--- a/widgets/account-wizard.go
+++ b/widgets/account-wizard.go
@@ -10,7 +10,6 @@ import (
"path"
"strconv"
"strings"
- "time"
"github.com/gdamore/tcell"
"github.com/go-ini/ini"
@@ -415,8 +414,7 @@ func (wizard *AccountWizard) ConfigureTemporaryAccount(temporary bool) {
func (wizard *AccountWizard) errorFor(d ui.Interactive, err error) {
if d == nil {
- wizard.aerc.PushStatus(" "+err.Error(), 10*time.Second).
- Color(tcell.ColorDefault, tcell.ColorRed)
+ wizard.aerc.PushError(" "+err.Error())
wizard.Invalidate()
return
}
@@ -431,8 +429,7 @@ func (wizard *AccountWizard) errorFor(d ui.Interactive, err error) {
wizard.step = step
wizard.focus = focus
wizard.Focus(true)
- wizard.aerc.PushStatus(" "+err.Error(), 10*time.Second).
- Color(tcell.ColorDefault, tcell.ColorRed)
+ wizard.aerc.PushError(" "+err.Error())
wizard.Invalidate()
return
}
@@ -543,8 +540,7 @@ func (wizard *AccountWizard) finish(tutorial bool) {
term.OnClose = func(err error) {
wizard.aerc.RemoveTab(term)
if err != nil {
- wizard.aerc.PushStatus(" "+err.Error(), 10*time.Second).
- Color(tcell.ColorDefault, tcell.ColorRed)
+ wizard.aerc.PushError(" "+err.Error())
}
}
}
diff --git a/widgets/aerc.go b/widgets/aerc.go
index 4c8d09d..1d45696 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -408,13 +408,11 @@ func (aerc *Aerc) BeginExCommand(cmd string) {
exline := NewExLine(aerc.conf, cmd, func(cmd string) {
parts, err := shlex.Split(cmd)
if err != nil {
- aerc.PushStatus(" "+err.Error(), 10*time.Second).
- Color(tcell.ColorDefault, tcell.ColorRed)
+ aerc.PushError(" "+err.Error())
}
err = aerc.cmd(parts)
if err != nil {
- aerc.PushStatus(" "+err.Error(), 10*time.Second).
- Color(tcell.ColorDefault, tcell.ColorRed)
+ aerc.PushError(" "+err.Error())
}
// only add to history if this is an unsimulated command,
// ie one not executed from a keybinding
@@ -438,8 +436,7 @@ func (aerc *Aerc) RegisterPrompt(prompt string, cmd []string) {
}
err := aerc.cmd(cmd)
if err != nil {
- aerc.PushStatus(" "+err.Error(), 10*time.Second).
- Color(tcell.ColorDefault, tcell.ColorRed)
+ aerc.PushError(" "+err.Error())
}
}, func(cmd string) []string {
return nil // TODO: completions