1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Gcal widget properly renders title again

This commit is contained in:
Chris Cummer 2019-04-19 19:10:22 -07:00
parent 6fd9430ef8
commit 79733145f4
2 changed files with 3 additions and 7 deletions

View File

@ -35,12 +35,8 @@ func NewWidget(app *tview.Application, settings *Settings) *Widget {
func (widget *Widget) Refresh() { func (widget *Widget) Refresh() {
widget.execute() widget.execute()
title := widget.settings.common.Title widget.CommonSettings.Title = widget.String()
if title == "" { widget.View.SetTitle(tview.TranslateANSI(widget.CommonSettings.Title))
title = widget.String()
}
widget.View.SetTitle(tview.TranslateANSI(title))
widget.View.SetText(widget.result) widget.View.SetText(widget.result)
} }

View File

@ -32,7 +32,7 @@ func (widget *Widget) display() {
widget.mutex.Lock() widget.mutex.Lock()
defer widget.mutex.Unlock() defer widget.mutex.Unlock()
widget.View.SetTitle(widget.ContextualTitle(widget.Name())) widget.View.SetTitle(widget.ContextualTitle(widget.settings.common.Title))
widget.View.SetText(widget.contentFrom(widget.calEvents)) widget.View.SetText(widget.contentFrom(widget.calEvents))
} }