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

WTF-400 Common settings implemented

This commit is contained in:
Chris Cummer
2019-04-18 18:05:56 -07:00
parent 2ed3c087b8
commit f09d08bda2
52 changed files with 201 additions and 131 deletions

View File

@@ -42,19 +42,17 @@ func NewWidget(app *tview.Application, pages *tview.Pages, settings *Settings) *
widget := Widget{
HelpfulWidget: wtf.NewHelpfulWidget(app, pages, HelpText),
MultiSourceWidget: wtf.NewMultiSourceWidget(settings.common.ConfigKey, "filePath", "filePaths"),
TextWidget: wtf.NewTextWidget(app, settings.common.Name, settings.common.ConfigKey, true),
TextWidget: wtf.NewTextWidget(app, settings.common, true),
settings: settings,
}
// Don't use a timer for this widget, watch for filesystem changes instead
widget.RefreshInt = 0
widget.LoadSources()
widget.SetDisplayFunction(widget.display)
widget.settings.common.RefreshInterval = 0
widget.HelpfulWidget.SetView(widget.View)
widget.LoadSources()
widget.SetDisplayFunction(widget.display)
widget.View.SetWrap(true)
widget.View.SetWordWrap(true)
widget.View.SetInputCapture(widget.keyboardIntercept)