summary refs log tree commit diff stats
path: root/widgets/aerc.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-03-30 14:12:04 -0400
committerDrew DeVault <sir@cmpwn.com>2019-03-30 14:12:04 -0400
commitfa04a1e036a418258451466d99de34a9546a9965 (patch)
treeec409d99e9a306488c6ffb9b71683e171a2ec007 /widgets/aerc.go
parent2958579ee75359dacfabb6d1b36664468011113c (diff)
downloadaerc-fa04a1e036a418258451466d99de34a9546a9965.tar.gz
Add basic message viewer mockup
Diffstat (limited to 'widgets/aerc.go')
-rw-r--r--widgets/aerc.go18
1 files changed, 6 insertions, 12 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index 3ba4e0d..a36db23 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -39,19 +39,11 @@ func NewAerc(conf *config.AercConfig, logger *log.Logger,
 		{libui.SIZE_WEIGHT, 1},
 		{libui.SIZE_EXACT, 1},
 	}).Columns([]libui.GridSpec{
-		{libui.SIZE_EXACT, conf.Ui.SidebarWidth},
 		{libui.SIZE_WEIGHT, 1},
 	})
-	grid.AddChild(statusbar).At(2, 1)
-	// Minor hack
-	grid.AddChild(libui.NewBordered(
-		libui.NewFill(' '), libui.BORDER_RIGHT)).At(2, 0)
-
-	grid.AddChild(libui.NewText("aerc").
-		Strategy(libui.TEXT_CENTER).
-		Reverse(true))
-	grid.AddChild(tabs.TabStrip).At(0, 1)
-	grid.AddChild(tabs.TabContent).At(1, 0).Span(1, 2)
+	grid.AddChild(tabs.TabStrip)
+	grid.AddChild(tabs.TabContent).At(1, 0)
+	grid.AddChild(statusbar).At(2, 0)
 
 	aerc := &Aerc{
 		accounts:   make(map[string]*AccountView),
@@ -70,6 +62,8 @@ func NewAerc(conf *config.AercConfig, logger *log.Logger,
 		tabs.Add(view, acct.Name)
 	}
 
+	tabs.Add(NewMessageViewer(), "[PATCH todo.sr.ht v2 …")
+
 	return aerc
 }
 
@@ -99,7 +93,7 @@ func (aerc *Aerc) getBindings() *config.KeyBindings {
 	switch aerc.SelectedTab().(type) {
 	case *AccountView:
 		return aerc.conf.Bindings.MessageList
-	case *TermHost:
+	case *Terminal:
 		return aerc.conf.Bindings.Terminal
 	default:
 		return aerc.conf.Bindings.Global