diff options
author | Wagner Riffel <wgrriffel@gmail.com> | 2019-09-12 23:16:37 -0300 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-09-12 23:42:08 -0400 |
commit | ecc26b53c985963f0a3aa5f71232ab56a552d0e3 (patch) | |
tree | 9b4b73e4fa813c207a26a33fce0eec5f77c33f04 | |
parent | e2d5c456dc27f958d79fdf740c7b0852b2af4160 (diff) | |
download | aerc-ecc26b53c985963f0a3aa5f71232ab56a552d0e3.tar.gz |
widgets: remove duplicate import
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
-rw-r--r-- | widgets/aerc.go | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go index 8671c87..16fe8b7 100644 --- a/widgets/aerc.go +++ b/widgets/aerc.go @@ -14,7 +14,6 @@ import ( "git.sr.ht/~sircmpwn/aerc/config" "git.sr.ht/~sircmpwn/aerc/lib" "git.sr.ht/~sircmpwn/aerc/lib/ui" - libui "git.sr.ht/~sircmpwn/aerc/lib/ui" ) type Aerc struct { @@ -23,15 +22,15 @@ type Aerc struct { cmdHistory lib.History complete func(cmd string) []string conf *config.AercConfig - focused libui.Interactive - grid *libui.Grid + focused ui.Interactive + grid *ui.Grid logger *log.Logger simulating int - statusbar *libui.Stack + statusbar *ui.Stack statusline *StatusLine pendingKeys []config.KeyStroke - prompts *libui.Stack - tabs *libui.Tabs + prompts *ui.Stack + tabs *ui.Tabs beep func() error } @@ -39,18 +38,18 @@ func NewAerc(conf *config.AercConfig, logger *log.Logger, cmd func(cmd []string) error, complete func(cmd string) []string, cmdHistory lib.History) *Aerc { - tabs := libui.NewTabs() + tabs := ui.NewTabs() statusbar := ui.NewStack() statusline := NewStatusLine() statusbar.Push(statusline) - grid := libui.NewGrid().Rows([]libui.GridSpec{ - {libui.SIZE_EXACT, 1}, - {libui.SIZE_WEIGHT, 1}, - {libui.SIZE_EXACT, 1}, - }).Columns([]libui.GridSpec{ - {libui.SIZE_WEIGHT, 1}, + grid := ui.NewGrid().Rows([]ui.GridSpec{ + {ui.SIZE_EXACT, 1}, + {ui.SIZE_WEIGHT, 1}, + {ui.SIZE_EXACT, 1}, + }).Columns([]ui.GridSpec{ + {ui.SIZE_WEIGHT, 1}, }) grid.AddChild(tabs.TabStrip) grid.AddChild(tabs.TabContent).At(1, 0) @@ -66,7 +65,7 @@ func NewAerc(conf *config.AercConfig, logger *log.Logger, logger: logger, statusbar: statusbar, statusline: statusline, - prompts: libui.NewStack(), + prompts: ui.NewStack(), tabs: tabs, } @@ -144,8 +143,8 @@ func (aerc *Aerc) Children() []ui.Drawable { return aerc.grid.Children() } -func (aerc *Aerc) OnInvalidate(onInvalidate func(d libui.Drawable)) { - aerc.grid.OnInvalidate(func(_ libui.Drawable) { +func (aerc *Aerc) OnInvalidate(onInvalidate func(d ui.Drawable)) { + aerc.grid.OnInvalidate(func(_ ui.Drawable) { onInvalidate(aerc) }) } @@ -158,7 +157,7 @@ func (aerc *Aerc) Focus(focus bool) { // who cares } -func (aerc *Aerc) Draw(ctx *libui.Context) { +func (aerc *Aerc) Draw(ctx *ui.Context) { aerc.grid.Draw(ctx) } @@ -348,7 +347,7 @@ func (aerc *Aerc) PushError(text string) { aerc.PushStatus(text, 10*time.Second).Color(tcell.ColorDefault, tcell.ColorRed) } -func (aerc *Aerc) focus(item libui.Interactive) { +func (aerc *Aerc) focus(item ui.Interactive) { if aerc.focused == item { return } |