diff options
author | Reto Brunner <reto@labrat.space> | 2020-07-30 23:22:32 +0200 |
---|---|---|
committer | Reto Brunner <reto@labrat.space> | 2020-07-30 23:22:32 +0200 |
commit | 3d784c5d8c7d037e38159fc1753773a2e81aa43e (patch) | |
tree | 2c062c9f4b4641a59e3f4f3ff3317f636bfd49cf /widgets/aerc.go | |
parent | 6ee7b1c3fd40b0e2f93dcaa7ffb3b0bdd56ac285 (diff) | |
download | aerc-3d784c5d8c7d037e38159fc1753773a2e81aa43e.tar.gz |
Revert "Implement style configuration."
This reverts commit 1ff687ca2b0821c2cacc1fa725abb3302d2af9da.
Diffstat (limited to 'widgets/aerc.go')
-rw-r--r-- | widgets/aerc.go | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go index 692e00d2..4913be34 100644 --- a/widgets/aerc.go +++ b/widgets/aerc.go @@ -51,8 +51,8 @@ func NewAerc(conf *config.AercConfig, logger *log.Logger, tabs := ui.NewTabs(&conf.Ui) - statusbar := ui.NewStack(conf.Ui) - statusline := NewStatusLine(conf.Ui) + statusbar := ui.NewStack() + statusline := NewStatusLine() statusbar.Push(statusline) grid := ui.NewGrid().Rows([]ui.GridSpec{ @@ -76,7 +76,7 @@ func NewAerc(conf *config.AercConfig, logger *log.Logger, logger: logger, statusbar: statusbar, statusline: statusline, - prompts: ui.NewStack(conf.Ui), + prompts: ui.NewStack(), tabs: tabs, } @@ -382,20 +382,12 @@ func (aerc *Aerc) SetStatus(status string) *StatusMessage { return aerc.statusline.Set(status) } -func (aerc *Aerc) SetError(status string) *StatusMessage { - return aerc.statusline.SetError(status) -} - func (aerc *Aerc) PushStatus(text string, expiry time.Duration) *StatusMessage { return aerc.statusline.Push(text, expiry) } -func (aerc *Aerc) PushError(text string) *StatusMessage { - return aerc.statusline.PushError(text) -} - -func (aerc *Aerc) PushSuccess(text string) *StatusMessage { - return aerc.statusline.PushSuccess(text) +func (aerc *Aerc) PushError(text string) { + aerc.PushStatus(text, 10*time.Second).Color(tcell.ColorDefault, tcell.ColorRed) } func (aerc *Aerc) focus(item ui.Interactive) { @@ -563,7 +555,7 @@ func (aerc *Aerc) CloseDialog() { func (aerc *Aerc) GetPassword(title string, prompt string) (chText chan string, chErr chan error) { chText = make(chan string, 1) chErr = make(chan error, 1) - getPasswd := NewGetPasswd(title, prompt, aerc.conf, func(pw string, err error) { + getPasswd := NewGetPasswd(title, prompt, func(pw string, err error) { defer func() { close(chErr) close(chText) |