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() {
widget.execute()
title := widget.settings.common.Title
if title == "" {
title = widget.String()
}
widget.View.SetTitle(tview.TranslateANSI(title))
widget.CommonSettings.Title = widget.String()
widget.View.SetTitle(tview.TranslateANSI(widget.CommonSettings.Title))
widget.View.SetText(widget.result)
}

View File

@ -32,7 +32,7 @@ func (widget *Widget) display() {
widget.mutex.Lock()
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))
}