aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/account.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-05-28 10:32:42 -0400
committerDrew DeVault <sir@cmpwn.com>2020-05-28 10:32:42 -0400
commitcaad1b2c06a0446059ee5ee916e3dce1794b159b (patch)
treeee81255485234137a5902d87d5960ac06618b341 /widgets/account.go
parent76a91813d8dc0f0011202f8120fc197097f022aa (diff)
downloadaerc-caad1b2c06a0446059ee5ee916e3dce1794b159b.tar.gz
Revert "Add Style configuration"
This reverts commit 0f78f06610c0e8887aba2ae50e99b86477a384b3.
Diffstat (limited to 'widgets/account.go')
-rw-r--r--widgets/account.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/widgets/account.go b/widgets/account.go
index 564a95d1..20ed3456 100644
--- a/widgets/account.go
+++ b/widgets/account.go
@@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"log"
- "time"
"github.com/gdamore/tcell"
@@ -55,7 +54,8 @@ func NewAccountView(aerc *Aerc, conf *config.AercConfig, acct *config.AccountCon
worker, err := worker.NewWorker(acct.Source, logger)
if err != nil {
- host.SetError(fmt.Sprintf("%s: %s", acct.Name, err))
+ host.SetStatus(fmt.Sprintf("%s: %s", acct.Name, err)).
+ Color(tcell.ColorDefault, tcell.ColorRed)
return &AccountView{
acct: acct,
aerc: aerc,
@@ -67,7 +67,7 @@ func NewAccountView(aerc *Aerc, conf *config.AercConfig, acct *config.AccountCon
dirlist := NewDirectoryList(conf, acct, logger, worker)
if acctUiConf.SidebarWidth > 0 {
- grid.AddChild(ui.NewBordered(dirlist, ui.BORDER_RIGHT, acctUiConf))
+ grid.AddChild(ui.NewBordered(dirlist, ui.BORDER_RIGHT))
}
msglist := NewMessageList(conf, logger, aerc)
@@ -280,7 +280,8 @@ func (acct *AccountView) onMessage(msg types.WorkerMessage) {
acct.labels = msg.Labels
case *types.Error:
acct.logger.Printf("%v", msg.Error)
- acct.host.SetError(fmt.Sprintf("%v", msg.Error))
+ acct.host.SetStatus(fmt.Sprintf("%v", msg.Error)).
+ Color(tcell.ColorDefault, tcell.ColorRed)
}
}
@@ -290,7 +291,7 @@ func (acct *AccountView) getSortCriteria() []*types.SortCriterion {
}
criteria, err := sort.GetSortCriteria(acct.UiConfig().Sort)
if err != nil {
- acct.aerc.PushError(" ui.sort: "+err.Error(), 10*time.Second)
+ acct.aerc.PushError(" ui.sort: " + err.Error())
return nil
}
return criteria